bin/md5/crc.c
101
CKSUM_Update(CKSUM_CTX *ctx, const unsigned char *buf, size_t len)
bin/md5/crc.c
106
UPDATE(ctx->crc, buf[i]);
bin/md5/crc.c
107
ctx->len += len;
bin/md5/crc.c
111
CKSUM_Final(CKSUM_CTX *ctx)
bin/md5/crc.c
113
off_t len = ctx->len;
bin/md5/crc.c
117
UPDATE(ctx->crc, len & 0xff);
bin/md5/crc.c
120
ctx->crc = ~ctx->crc;
bin/md5/crc.c
124
CKSUM_End(CKSUM_CTX *ctx, char *outstr)
bin/md5/crc.c
126
CKSUM_Final(ctx);
bin/md5/crc.c
129
if (asprintf(&outstr, "%u %lld", ctx->crc, ctx->len) == -1)
bin/md5/crc.c
133
"%u %lld", ctx->crc, ctx->len);
bin/md5/crc.c
90
CKSUM_Init(CKSUM_CTX *ctx)
bin/md5/crc.c
92
ctx->crc = 0;
bin/md5/crc.c
93
ctx->len = 0;
bin/md5/md5.c
100
MD5Update(&ctx->md5, data, len);
bin/md5/md5.c
104
md5_final(unsigned char *digest, union ANY_CTX *ctx)
bin/md5/md5.c
106
MD5Final(digest, &ctx->md5);
bin/md5/md5.c
110
md5_end(union ANY_CTX *ctx, char *digest)
bin/md5/md5.c
112
return MD5End(&ctx->md5, digest);
bin/md5/md5.c
116
rmd160_init(union ANY_CTX *ctx)
bin/md5/md5.c
118
RMD160Init(&ctx->rmd160);
bin/md5/md5.c
122
rmd160_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
bin/md5/md5.c
124
RMD160Update(&ctx->rmd160, data, len);
bin/md5/md5.c
128
rmd160_final(unsigned char *digest, union ANY_CTX *ctx)
bin/md5/md5.c
130
RMD160Final(digest, &ctx->rmd160);
bin/md5/md5.c
134
rmd160_end(union ANY_CTX *ctx, char *digest)
bin/md5/md5.c
136
return RMD160End(&ctx->rmd160, digest);
bin/md5/md5.c
140
sha1_init(union ANY_CTX *ctx)
bin/md5/md5.c
142
SHA1Init(&ctx->sha1);
bin/md5/md5.c
146
sha1_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
bin/md5/md5.c
148
SHA1Update(&ctx->sha1, data, len);
bin/md5/md5.c
152
sha1_final(unsigned char *digest, union ANY_CTX *ctx)
bin/md5/md5.c
154
SHA1Final(digest, &ctx->sha1);
bin/md5/md5.c
158
sha1_end(union ANY_CTX *ctx, char *digest)
bin/md5/md5.c
160
return SHA1End(&ctx->sha1, digest);
bin/md5/md5.c
164
sha224_init(union ANY_CTX *ctx)
bin/md5/md5.c
166
SHA224Init(&ctx->sha2);
bin/md5/md5.c
170
sha224_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
bin/md5/md5.c
172
SHA224Update(&ctx->sha2, data, len);
bin/md5/md5.c
176
sha224_final(unsigned char *digest, union ANY_CTX *ctx)
bin/md5/md5.c
178
SHA224Final(digest, &ctx->sha2);
bin/md5/md5.c
182
sha224_end(union ANY_CTX *ctx, char *digest)
bin/md5/md5.c
184
return SHA224End(&ctx->sha2, digest);
bin/md5/md5.c
189
sha256_init(union ANY_CTX *ctx)
bin/md5/md5.c
191
SHA256Init(&ctx->sha2);
bin/md5/md5.c
195
sha256_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
bin/md5/md5.c
197
SHA256Update(&ctx->sha2, data, len);
bin/md5/md5.c
201
sha256_final(unsigned char *digest, union ANY_CTX *ctx)
bin/md5/md5.c
203
SHA256Final(digest, &ctx->sha2);
bin/md5/md5.c
207
sha256_end(union ANY_CTX *ctx, char *digest)
bin/md5/md5.c
209
return SHA256End(&ctx->sha2, digest);
bin/md5/md5.c
214
sha384_init(union ANY_CTX *ctx)
bin/md5/md5.c
216
SHA384Init(&ctx->sha2);
bin/md5/md5.c
220
sha384_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
bin/md5/md5.c
222
SHA384Update(&ctx->sha2, data, len);
bin/md5/md5.c
226
sha384_final(unsigned char *digest, union ANY_CTX *ctx)
bin/md5/md5.c
228
SHA384Final(digest, &ctx->sha2);
bin/md5/md5.c
232
sha384_end(union ANY_CTX *ctx, char *digest)
bin/md5/md5.c
234
return SHA384End(&ctx->sha2, digest);
bin/md5/md5.c
238
sha512_256_init(union ANY_CTX *ctx)
bin/md5/md5.c
240
SHA512_256Init(&ctx->sha2);
bin/md5/md5.c
244
sha512_256_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
bin/md5/md5.c
246
SHA512_256Update(&ctx->sha2, data, len);
bin/md5/md5.c
250
sha512_256_final(unsigned char *digest, union ANY_CTX *ctx)
bin/md5/md5.c
252
SHA512_256Final(digest, &ctx->sha2);
bin/md5/md5.c
256
sha512_256_end(union ANY_CTX *ctx, char *digest)
bin/md5/md5.c
258
return SHA512_256End(&ctx->sha2, digest);
bin/md5/md5.c
263
sha512_init(union ANY_CTX *ctx)
bin/md5/md5.c
265
SHA512Init(&ctx->sha2);
bin/md5/md5.c
269
sha512_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
bin/md5/md5.c
271
SHA512Update(&ctx->sha2, data, len);
bin/md5/md5.c
275
sha512_final(unsigned char *digest, union ANY_CTX *ctx)
bin/md5/md5.c
277
SHA512Final(digest, &ctx->sha2);
bin/md5/md5.c
281
sha512_end(union ANY_CTX *ctx, char *digest)
bin/md5/md5.c
283
return SHA512End(&ctx->sha2, digest);
bin/md5/md5.c
291
void *ctx; /* XXX - only used by digest_file() */
bin/md5/md5.c
633
digest_end(const struct hash_function *hf, void *ctx, char *buf, size_t bsize,
bin/md5/md5.c
641
hf->final(digest, ctx);
bin/md5/md5.c
646
hf->end(ctx, buf);
bin/md5/md5.c
68
cksum_init(union ANY_CTX *ctx)
bin/md5/md5.c
70
CKSUM_Init(&ctx->cksum);
bin/md5/md5.c
721
if ((hf->ctx = malloc(sizeof(union ANY_CTX))) == NULL)
bin/md5/md5.c
723
hf->init(hf->ctx);
bin/md5/md5.c
733
hf->update(hf->ctx, data, nread);
bin/md5/md5.c
74
cksum_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
bin/md5/md5.c
740
free(hf->ctx);
bin/md5/md5.c
741
hf->ctx = NULL;
bin/md5/md5.c
748
digest_end(hf, hf->ctx, digest, sizeof(digest), hf->base64);
bin/md5/md5.c
749
free(hf->ctx);
bin/md5/md5.c
750
hf->ctx = NULL;
bin/md5/md5.c
76
CKSUM_Update(&ctx->cksum, data, len);
bin/md5/md5.c
80
cksum_final(unsigned char *digest, union ANY_CTX *ctx)
bin/md5/md5.c
82
CKSUM_Final(&ctx->cksum);
bin/md5/md5.c
86
cksum_end(union ANY_CTX *ctx, char *digest)
bin/md5/md5.c
88
return CKSUM_End(&ctx->cksum, digest);
bin/md5/md5.c
92
md5_init(union ANY_CTX *ctx)
bin/md5/md5.c
94
MD5Init(&ctx->md5);
bin/md5/md5.c
98
md5_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
lib/libc/hash/helper.c
111
HASH_CTX ctx;
lib/libc/hash/helper.c
113
HASHInit(&ctx);
lib/libc/hash/helper.c
114
HASHUpdate(&ctx, data, len);
lib/libc/hash/helper.c
115
return (HASHEnd(&ctx, buf));
lib/libc/hash/helper.c
39
HASHEnd(HASH_CTX *ctx, char *buf)
lib/libc/hash/helper.c
48
HASHFinal(digest, ctx);
lib/libc/hash/helper.c
64
HASH_CTX ctx;
lib/libc/hash/helper.c
68
HASHInit(&ctx);
lib/libc/hash/helper.c
89
HASHUpdate(&ctx, buffer, nr);
lib/libc/hash/helper.c
97
return (nr == -1 ? NULL : HASHEnd(&ctx, buf));
lib/libc/hash/md5.c
100
memcpy(ctx->buffer + have, input, len);
lib/libc/hash/md5.c
109
MD5Pad(MD5_CTX *ctx)
lib/libc/hash/md5.c
115
PUT_64BIT_LE(count, ctx->count);
lib/libc/hash/md5.c
119
((ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1));
lib/libc/hash/md5.c
122
MD5Update(ctx, PADDING, padlen - 8); /* padlen - 8 <= 64 */
lib/libc/hash/md5.c
123
MD5Update(ctx, count, 8);
lib/libc/hash/md5.c
131
MD5Final(unsigned char digest[MD5_DIGEST_LENGTH], MD5_CTX *ctx)
lib/libc/hash/md5.c
135
MD5Pad(ctx);
lib/libc/hash/md5.c
137
PUT_32BIT_LE(digest + i * 4, ctx->state[i]);
lib/libc/hash/md5.c
138
explicit_bzero(ctx, sizeof(*ctx));
lib/libc/hash/md5.c
51
MD5Init(MD5_CTX *ctx)
lib/libc/hash/md5.c
53
ctx->count = 0;
lib/libc/hash/md5.c
54
ctx->state[0] = 0x67452301;
lib/libc/hash/md5.c
55
ctx->state[1] = 0xefcdab89;
lib/libc/hash/md5.c
56
ctx->state[2] = 0x98badcfe;
lib/libc/hash/md5.c
57
ctx->state[3] = 0x10325476;
lib/libc/hash/md5.c
66
MD5Update(MD5_CTX *ctx, const unsigned char *input, size_t len)
lib/libc/hash/md5.c
75
have = (size_t)((ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1));
lib/libc/hash/md5.c
79
ctx->count += (u_int64_t)len << 3;
lib/libc/hash/md5.c
83
memcpy(ctx->buffer + have, input, need);
lib/libc/hash/md5.c
84
MD5Transform(ctx->state, ctx->buffer);
lib/libc/hash/md5.c
92
MD5Transform(ctx->state, input);
lib/libc/hash/rmd160.c
104
RMD160Update(RMD160_CTX *ctx, const u_int8_t *input, size_t len)
lib/libc/hash/rmd160.c
112
have = (ctx->count / 8) % RMD160_BLOCK_LENGTH;
lib/libc/hash/rmd160.c
114
ctx->count += 8 * len;
lib/libc/hash/rmd160.c
119
memcpy(ctx->buffer + have, input, need);
lib/libc/hash/rmd160.c
120
RMD160Transform(ctx->state, ctx->buffer);
lib/libc/hash/rmd160.c
126
RMD160Transform(ctx->state, input+off);
lib/libc/hash/rmd160.c
131
memcpy(ctx->buffer + have, input+off, len-off);
lib/libc/hash/rmd160.c
136
RMD160Pad(RMD160_CTX *ctx)
lib/libc/hash/rmd160.c
141
PUT_64BIT_LE(size, ctx->count);
lib/libc/hash/rmd160.c
147
padlen = RMD160_BLOCK_LENGTH - ((ctx->count / 8) % RMD160_BLOCK_LENGTH);
lib/libc/hash/rmd160.c
150
RMD160Update(ctx, PADDING, padlen - 8); /* padlen - 8 <= 64 */
lib/libc/hash/rmd160.c
151
RMD160Update(ctx, size, 8);
lib/libc/hash/rmd160.c
156
RMD160Final(u_int8_t digest[RMD160_DIGEST_LENGTH], RMD160_CTX *ctx)
lib/libc/hash/rmd160.c
160
RMD160Pad(ctx);
lib/libc/hash/rmd160.c
162
PUT_32BIT_LE(digest + i*4, ctx->state[i]);
lib/libc/hash/rmd160.c
163
explicit_bzero(ctx, sizeof (*ctx));
lib/libc/hash/rmd160.c
92
RMD160Init(RMD160_CTX *ctx)
lib/libc/hash/rmd160.c
94
ctx->count = 0;
lib/libc/hash/rmd160.c
95
ctx->state[0] = H0;
lib/libc/hash/rmd160.c
96
ctx->state[1] = H1;
lib/libc/hash/rmd160.c
97
ctx->state[2] = H2;
lib/libc/hash/rmd160.c
98
ctx->state[3] = H3;
lib/libc/hash/rmd160.c
99
ctx->state[4] = H4;
lib/libc/hash/siphash.c
100
SipHash_CRounds(ctx, rc);
lib/libc/hash/siphash.c
101
len -= sizeof(ctx->buf);
lib/libc/hash/siphash.c
102
ptr += sizeof(ctx->buf);
lib/libc/hash/siphash.c
106
memcpy(ctx->buf, ptr, len);
lib/libc/hash/siphash.c
111
SipHash_Final(void *dst, SIPHASH_CTX *ctx, int rc, int rf)
lib/libc/hash/siphash.c
115
r = htole64(SipHash_End(ctx, rc, rf));
lib/libc/hash/siphash.c
121
SipHash_End(SIPHASH_CTX *ctx, int rc, int rf)
lib/libc/hash/siphash.c
126
used = ctx->bytes % sizeof(ctx->buf);
lib/libc/hash/siphash.c
127
left = sizeof(ctx->buf) - used;
lib/libc/hash/siphash.c
128
memset(&ctx->buf[used], 0, left - 1);
lib/libc/hash/siphash.c
129
ctx->buf[7] = ctx->bytes;
lib/libc/hash/siphash.c
131
SipHash_CRounds(ctx, rc);
lib/libc/hash/siphash.c
132
ctx->v[2] ^= 0xff;
lib/libc/hash/siphash.c
133
SipHash_Rounds(ctx, rf);
lib/libc/hash/siphash.c
135
r = (ctx->v[0] ^ ctx->v[1]) ^ (ctx->v[2] ^ ctx->v[3]);
lib/libc/hash/siphash.c
136
explicit_bzero(ctx, sizeof(*ctx));
lib/libc/hash/siphash.c
144
SIPHASH_CTX ctx;
lib/libc/hash/siphash.c
146
SipHash_Init(&ctx, key);
lib/libc/hash/siphash.c
147
SipHash_Update(&ctx, rc, rf, src, len);
lib/libc/hash/siphash.c
148
return (SipHash_End(&ctx, rc, rf));
lib/libc/hash/siphash.c
155
SipHash_Rounds(SIPHASH_CTX *ctx, int rounds)
lib/libc/hash/siphash.c
158
ctx->v[0] += ctx->v[1];
lib/libc/hash/siphash.c
159
ctx->v[2] += ctx->v[3];
lib/libc/hash/siphash.c
160
ctx->v[1] = SIP_ROTL(ctx->v[1], 13);
lib/libc/hash/siphash.c
161
ctx->v[3] = SIP_ROTL(ctx->v[3], 16);
lib/libc/hash/siphash.c
163
ctx->v[1] ^= ctx->v[0];
lib/libc/hash/siphash.c
164
ctx->v[3] ^= ctx->v[2];
lib/libc/hash/siphash.c
165
ctx->v[0] = SIP_ROTL(ctx->v[0], 32);
lib/libc/hash/siphash.c
167
ctx->v[2] += ctx->v[1];
lib/libc/hash/siphash.c
168
ctx->v[0] += ctx->v[3];
lib/libc/hash/siphash.c
169
ctx->v[1] = SIP_ROTL(ctx->v[1], 17);
lib/libc/hash/siphash.c
170
ctx->v[3] = SIP_ROTL(ctx->v[3], 21);
lib/libc/hash/siphash.c
172
ctx->v[1] ^= ctx->v[2];
lib/libc/hash/siphash.c
173
ctx->v[3] ^= ctx->v[0];
lib/libc/hash/siphash.c
174
ctx->v[2] = SIP_ROTL(ctx->v[2], 32);
lib/libc/hash/siphash.c
179
SipHash_CRounds(SIPHASH_CTX *ctx, int rounds)
lib/libc/hash/siphash.c
181
uint64_t m = le64toh(*(uint64_t *)ctx->buf);
lib/libc/hash/siphash.c
183
ctx->v[3] ^= m;
lib/libc/hash/siphash.c
184
SipHash_Rounds(ctx, rounds);
lib/libc/hash/siphash.c
185
ctx->v[0] ^= m;
lib/libc/hash/siphash.c
55
SipHash_Init(SIPHASH_CTX *ctx, const SIPHASH_KEY *key)
lib/libc/hash/siphash.c
62
ctx->v[0] = 0x736f6d6570736575ULL ^ k0;
lib/libc/hash/siphash.c
63
ctx->v[1] = 0x646f72616e646f6dULL ^ k1;
lib/libc/hash/siphash.c
64
ctx->v[2] = 0x6c7967656e657261ULL ^ k0;
lib/libc/hash/siphash.c
65
ctx->v[3] = 0x7465646279746573ULL ^ k1;
lib/libc/hash/siphash.c
67
memset(ctx->buf, 0, sizeof(ctx->buf));
lib/libc/hash/siphash.c
68
ctx->bytes = 0;
lib/libc/hash/siphash.c
73
SipHash_Update(SIPHASH_CTX *ctx, int rc, int rf, const void *src, size_t len)
lib/libc/hash/siphash.c
81
used = ctx->bytes % sizeof(ctx->buf);
lib/libc/hash/siphash.c
82
ctx->bytes += len;
lib/libc/hash/siphash.c
85
left = sizeof(ctx->buf) - used;
lib/libc/hash/siphash.c
88
memcpy(&ctx->buf[used], ptr, left);
lib/libc/hash/siphash.c
89
SipHash_CRounds(ctx, rc);
lib/libc/hash/siphash.c
93
memcpy(&ctx->buf[used], ptr, len);
lib/libc/hash/siphash.c
98
while (len >= sizeof(ctx->buf)) {
lib/libc/hash/siphash.c
99
memcpy(ctx->buf, ptr, sizeof(ctx->buf));
lib/libcbor/src/cbor/internal/builder_callbacks.c
100
CBOR_ASSERT(ctx->stack->top->subitems == 1);
lib/libcbor/src/cbor/internal/builder_callbacks.c
101
cbor_tag_set_item(ctx->stack->top->item, item);
lib/libcbor/src/cbor/internal/builder_callbacks.c
103
cbor_item_t *tagged_item = ctx->stack->top->item;
lib/libcbor/src/cbor/internal/builder_callbacks.c
104
_cbor_stack_pop(ctx->stack);
lib/libcbor/src/cbor/internal/builder_callbacks.c
105
_cbor_builder_append(tagged_item, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
111
ctx->syntax_error = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
116
#define CHECK_RES(ctx, res) \
lib/libcbor/src/cbor/internal/builder_callbacks.c
119
ctx->creation_failed = true; \
lib/libcbor/src/cbor/internal/builder_callbacks.c
126
#define CHECK_LENGTH(ctx, length) \
lib/libcbor/src/cbor/internal/builder_callbacks.c
129
ctx->creation_failed = true; \
lib/libcbor/src/cbor/internal/builder_callbacks.c
134
#define PUSH_CTX_STACK(ctx, res, subitems) \
lib/libcbor/src/cbor/internal/builder_callbacks.c
136
if (_cbor_stack_push(ctx->stack, res, subitems) == NULL) { \
lib/libcbor/src/cbor/internal/builder_callbacks.c
138
ctx->creation_failed = true; \
lib/libcbor/src/cbor/internal/builder_callbacks.c
143
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
145
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
148
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
152
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
154
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
157
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
161
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
163
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
166
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
170
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
172
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
175
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
179
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
181
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
184
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
188
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
190
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
193
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
197
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
199
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
202
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
206
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
208
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
211
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
216
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
217
CHECK_LENGTH(ctx, length);
lib/libcbor/src/cbor/internal/builder_callbacks.c
220
ctx->creation_failed = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
229
ctx->creation_failed = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
237
if (ctx->stack->size > 0 && cbor_isa_bytestring(ctx->stack->top->item) &&
lib/libcbor/src/cbor/internal/builder_callbacks.c
238
cbor_bytestring_is_indefinite(ctx->stack->top->item)) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
239
if (!cbor_bytestring_add_chunk(ctx->stack->top->item, new_chunk)) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
240
ctx->creation_failed = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
244
_cbor_builder_append(new_chunk, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
249
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
25
struct _cbor_decoder_context *ctx) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
251
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
252
PUSH_CTX_STACK(ctx, res, 0);
lib/libcbor/src/cbor/internal/builder_callbacks.c
257
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
258
CHECK_LENGTH(ctx, length);
lib/libcbor/src/cbor/internal/builder_callbacks.c
26
if (ctx->stack->size == 0) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
264
ctx->syntax_error = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
272
ctx->creation_failed = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
28
ctx->root = item;
lib/libcbor/src/cbor/internal/builder_callbacks.c
280
ctx->creation_failed = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
288
if (ctx->stack->size > 0 && cbor_isa_string(ctx->stack->top->item) &&
lib/libcbor/src/cbor/internal/builder_callbacks.c
289
cbor_string_is_indefinite(ctx->stack->top->item)) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
290
if (!cbor_string_add_chunk(ctx->stack->top->item, new_chunk)) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
291
ctx->creation_failed = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
295
_cbor_builder_append(new_chunk, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
300
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
302
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
303
PUSH_CTX_STACK(ctx, res, 0);
lib/libcbor/src/cbor/internal/builder_callbacks.c
307
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
308
CHECK_LENGTH(ctx, size);
lib/libcbor/src/cbor/internal/builder_callbacks.c
310
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
312
PUSH_CTX_STACK(ctx, res, size);
lib/libcbor/src/cbor/internal/builder_callbacks.c
314
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
319
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
32
switch (ctx->stack->top->item->type) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
321
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
322
PUSH_CTX_STACK(ctx, res, 0);
lib/libcbor/src/cbor/internal/builder_callbacks.c
326
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
328
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
329
PUSH_CTX_STACK(ctx, res, 0);
lib/libcbor/src/cbor/internal/builder_callbacks.c
333
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
334
CHECK_LENGTH(ctx, size);
lib/libcbor/src/cbor/internal/builder_callbacks.c
336
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
338
PUSH_CTX_STACK(ctx, res, size * 2);
lib/libcbor/src/cbor/internal/builder_callbacks.c
340
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
363
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
365
if (ctx->stack->size > 0) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
366
cbor_item_t *item = ctx->stack->top->item;
lib/libcbor/src/cbor/internal/builder_callbacks.c
37
if (cbor_array_is_definite(ctx->stack->top->item)) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
371
(item->type != CBOR_TYPE_MAP || ctx->stack->top->subitems % 2 == 0)) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
372
_cbor_stack_pop(ctx->stack);
lib/libcbor/src/cbor/internal/builder_callbacks.c
373
_cbor_builder_append(item, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
378
ctx->syntax_error = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
382
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
384
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
386
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
390
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
392
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
394
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
398
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
400
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
402
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
406
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
408
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
409
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
41
CBOR_ASSERT(ctx->stack->top->subitems > 0);
lib/libcbor/src/cbor/internal/builder_callbacks.c
413
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
415
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
416
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
420
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
422
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
423
_cbor_builder_append(res, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
427
struct _cbor_decoder_context *ctx = context;
lib/libcbor/src/cbor/internal/builder_callbacks.c
429
CHECK_RES(ctx, res);
lib/libcbor/src/cbor/internal/builder_callbacks.c
430
PUSH_CTX_STACK(ctx, res, 1);
lib/libcbor/src/cbor/internal/builder_callbacks.c
44
if (!cbor_array_push(ctx->stack->top->item, item)) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
45
ctx->creation_failed = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
50
ctx->stack->top->subitems--;
lib/libcbor/src/cbor/internal/builder_callbacks.c
51
if (ctx->stack->top->subitems == 0) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
52
cbor_item_t *stack_item = ctx->stack->top->item;
lib/libcbor/src/cbor/internal/builder_callbacks.c
53
_cbor_stack_pop(ctx->stack);
lib/libcbor/src/cbor/internal/builder_callbacks.c
54
_cbor_builder_append(stack_item, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
58
if (!cbor_array_push(ctx->stack->top->item, item)) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
59
ctx->creation_failed = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
69
if (ctx->stack->top->subitems % 2) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
71
if (!_cbor_map_add_value(ctx->stack->top->item, item)) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
72
ctx->creation_failed = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
78
if (!_cbor_map_add_key(ctx->stack->top->item, item)) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
79
ctx->creation_failed = true;
lib/libcbor/src/cbor/internal/builder_callbacks.c
85
if (cbor_map_is_definite(ctx->stack->top->item)) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
86
CBOR_ASSERT(ctx->stack->top->subitems > 0);
lib/libcbor/src/cbor/internal/builder_callbacks.c
87
ctx->stack->top->subitems--;
lib/libcbor/src/cbor/internal/builder_callbacks.c
88
if (ctx->stack->top->subitems == 0) {
lib/libcbor/src/cbor/internal/builder_callbacks.c
89
cbor_item_t *map_entry = ctx->stack->top->item;
lib/libcbor/src/cbor/internal/builder_callbacks.c
90
_cbor_stack_pop(ctx->stack);
lib/libcbor/src/cbor/internal/builder_callbacks.c
91
_cbor_builder_append(map_entry, ctx);
lib/libcbor/src/cbor/internal/builder_callbacks.c
94
ctx->stack->top->subitems ^=
lib/libcbor/src/cbor/internal/builder_callbacks.h
31
void _cbor_builder_append(cbor_item_t *item, struct _cbor_decoder_context *ctx);
lib/libcrypto/arc4random/getentropy_aix.c
215
SHA512_CTX ctx;
lib/libcrypto/arc4random/getentropy_aix.c
232
SHA512_Init(&ctx);
lib/libcrypto/arc4random/getentropy_aix.c
394
SHA512_Final(results, &ctx);
lib/libcrypto/arc4random/getentropy_aix.c
398
explicit_bzero(&ctx, sizeof ctx);
lib/libcrypto/arc4random/getentropy_aix.c
57
#define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l)))
lib/libcrypto/arc4random/getentropy_aix.c
58
#define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x)))
lib/libcrypto/arc4random/getentropy_aix.c
59
#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*)))
lib/libcrypto/arc4random/getentropy_hpux.c
215
SHA512_CTX ctx;
lib/libcrypto/arc4random/getentropy_hpux.c
232
SHA512_Init(&ctx);
lib/libcrypto/arc4random/getentropy_hpux.c
388
SHA512_Final(results, &ctx);
lib/libcrypto/arc4random/getentropy_hpux.c
392
explicit_bzero(&ctx, sizeof ctx);
lib/libcrypto/arc4random/getentropy_hpux.c
61
#define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l)))
lib/libcrypto/arc4random/getentropy_hpux.c
62
#define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x)))
lib/libcrypto/arc4random/getentropy_hpux.c
63
#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*)))
lib/libcrypto/arc4random/getentropy_linux.c
312
SHA512_CTX *ctx = data;
lib/libcrypto/arc4random/getentropy_linux.c
314
SHA512_Update(ctx, &info->dlpi_addr, sizeof (info->dlpi_addr));
lib/libcrypto/arc4random/getentropy_linux.c
329
SHA512_CTX ctx;
lib/libcrypto/arc4random/getentropy_linux.c
346
SHA512_Init(&ctx);
lib/libcrypto/arc4random/getentropy_linux.c
354
dl_iterate_phdr(getentropy_phdr, &ctx);
lib/libcrypto/arc4random/getentropy_linux.c
517
SHA512_Final(results, &ctx);
lib/libcrypto/arc4random/getentropy_linux.c
521
explicit_bzero(&ctx, sizeof ctx);
lib/libcrypto/arc4random/getentropy_linux.c
70
#define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l)))
lib/libcrypto/arc4random/getentropy_linux.c
71
#define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x)))
lib/libcrypto/arc4random/getentropy_linux.c
72
#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*)))
lib/libcrypto/arc4random/getentropy_osx.c
215
SHA512_CTX ctx;
lib/libcrypto/arc4random/getentropy_osx.c
240
SHA512_Init(&ctx);
lib/libcrypto/arc4random/getentropy_osx.c
409
SHA512_Final(results, &ctx);
lib/libcrypto/arc4random/getentropy_osx.c
413
explicit_bzero(&ctx, sizeof ctx);
lib/libcrypto/arc4random/getentropy_osx.c
79
#define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l)))
lib/libcrypto/arc4random/getentropy_osx.c
80
#define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x)))
lib/libcrypto/arc4random/getentropy_osx.c
81
#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*)))
lib/libcrypto/arc4random/getentropy_solaris.c
231
SHA512_CTX *ctx = data;
lib/libcrypto/arc4random/getentropy_solaris.c
233
SHA512_Update(ctx, &info->dlpi_addr, sizeof (info->dlpi_addr));
lib/libcrypto/arc4random/getentropy_solaris.c
249
SHA512_CTX ctx;
lib/libcrypto/arc4random/getentropy_solaris.c
266
SHA512_Init(&ctx);
lib/libcrypto/arc4random/getentropy_solaris.c
274
dl_iterate_phdr(getentropy_phdr, &ctx);
lib/libcrypto/arc4random/getentropy_solaris.c
414
SHA512_Final(results, &ctx);
lib/libcrypto/arc4random/getentropy_solaris.c
418
explicit_bzero(&ctx, sizeof ctx);
lib/libcrypto/arc4random/getentropy_solaris.c
65
#define HR(x, l) (SHA512_Update(&ctx, (char *)(x), (l)))
lib/libcrypto/arc4random/getentropy_solaris.c
66
#define HD(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (x)))
lib/libcrypto/arc4random/getentropy_solaris.c
67
#define HF(x) (SHA512_Update(&ctx, (char *)&(x), sizeof (void*)))
lib/libcrypto/asn1/asn1_item.c
244
asn1_item_set_algorithm_identifiers(EVP_MD_CTX *ctx, X509_ALGOR *algor1,
lib/libcrypto/asn1/asn1_item.c
251
if ((pkey = EVP_PKEY_CTX_get0_pkey(ctx->pctx)) == NULL) {
lib/libcrypto/asn1/asn1_item.c
256
if ((md = EVP_MD_CTX_md(ctx)) == NULL) {
lib/libcrypto/asn1/asn1_item.c
284
asn1_item_sign(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
lib/libcrypto/asn1/asn1_item.c
297
if (!EVP_DigestSign(ctx, NULL, &out_len, in, in_len)) {
lib/libcrypto/asn1/asn1_item.c
305
if (!EVP_DigestSign(ctx, out, &out_len, in, in_len)) {
lib/libcrypto/asn1/asn1_item.c
335
ASN1_BIT_STRING *signature, void *asn, EVP_MD_CTX *ctx)
lib/libcrypto/asn1/asn1_item.c
341
if ((pkey = EVP_PKEY_CTX_get0_pkey(ctx->pctx)) == NULL) {
lib/libcrypto/asn1/asn1_item.c
359
rv = pkey->ameth->item_sign(ctx, it, asn, algor1, algor2,
lib/libcrypto/asn1/asn1_item.c
366
if (!asn1_item_set_algorithm_identifiers(ctx, algor1, algor2))
lib/libcrypto/asn1/asn1_item.c
370
if (!asn1_item_sign(ctx, it, asn, signature))
lib/libcrypto/asn1/asn1_item.c
377
EVP_MD_CTX_cleanup(ctx);
lib/libcrypto/asn1/asn1t.h
714
const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx);
lib/libcrypto/asn1/asn1t.h
989
const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx);
lib/libcrypto/asn1/bio_asn1.c
126
static int asn1_bio_flush_ex(BIO *b, BIO_ASN1_BUF_CTX *ctx,
lib/libcrypto/asn1/bio_asn1.c
128
static int asn1_bio_setup_ex(BIO *b, BIO_ASN1_BUF_CTX *ctx,
lib/libcrypto/asn1/bio_asn1.c
154
BIO_ASN1_BUF_CTX *ctx;
lib/libcrypto/asn1/bio_asn1.c
156
if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
lib/libcrypto/asn1/bio_asn1.c
159
if ((ctx->buf = malloc(DEFAULT_ASN1_BUF_SIZE)) == NULL) {
lib/libcrypto/asn1/bio_asn1.c
160
free(ctx);
lib/libcrypto/asn1/bio_asn1.c
163
ctx->bufsize = DEFAULT_ASN1_BUF_SIZE;
lib/libcrypto/asn1/bio_asn1.c
164
ctx->asn1_class = V_ASN1_UNIVERSAL;
lib/libcrypto/asn1/bio_asn1.c
165
ctx->asn1_tag = V_ASN1_OCTET_STRING;
lib/libcrypto/asn1/bio_asn1.c
166
ctx->state = ASN1_STATE_START;
lib/libcrypto/asn1/bio_asn1.c
169
b->ptr = ctx;
lib/libcrypto/asn1/bio_asn1.c
178
BIO_ASN1_BUF_CTX *ctx = b->ptr;
lib/libcrypto/asn1/bio_asn1.c
180
if (ctx == NULL)
lib/libcrypto/asn1/bio_asn1.c
183
if (ctx->prefix_free != NULL)
lib/libcrypto/asn1/bio_asn1.c
184
ctx->prefix_free(b, &ctx->ex_buf, &ctx->ex_len, &ctx->ex_arg);
lib/libcrypto/asn1/bio_asn1.c
185
if (ctx->suffix_free != NULL)
lib/libcrypto/asn1/bio_asn1.c
186
ctx->suffix_free(b, &ctx->ex_buf, &ctx->ex_len, &ctx->ex_arg);
lib/libcrypto/asn1/bio_asn1.c
188
free(ctx->buf);
lib/libcrypto/asn1/bio_asn1.c
189
free(ctx);
lib/libcrypto/asn1/bio_asn1.c
199
BIO_ASN1_BUF_CTX *ctx;
lib/libcrypto/asn1/bio_asn1.c
206
if ((ctx = b->ptr) == NULL)
lib/libcrypto/asn1/bio_asn1.c
213
switch (ctx->state) {
lib/libcrypto/asn1/bio_asn1.c
217
if (!asn1_bio_setup_ex(b, ctx, ctx->prefix,
lib/libcrypto/asn1/bio_asn1.c
224
ret = asn1_bio_flush_ex(b, ctx, ctx->prefix_free,
lib/libcrypto/asn1/bio_asn1.c
231
buflen = ASN1_object_size(0, inl, ctx->asn1_tag) - inl;
lib/libcrypto/asn1/bio_asn1.c
232
if (buflen <= 0 || buflen > ctx->bufsize)
lib/libcrypto/asn1/bio_asn1.c
234
ctx->buflen = buflen;
lib/libcrypto/asn1/bio_asn1.c
235
p = ctx->buf;
lib/libcrypto/asn1/bio_asn1.c
237
ctx->asn1_tag, ctx->asn1_class);
lib/libcrypto/asn1/bio_asn1.c
238
ctx->copylen = inl;
lib/libcrypto/asn1/bio_asn1.c
239
ctx->state = ASN1_STATE_HEADER_COPY;
lib/libcrypto/asn1/bio_asn1.c
244
ctx->buf + ctx->bufpos, ctx->buflen);
lib/libcrypto/asn1/bio_asn1.c
248
ctx->buflen -= ret;
lib/libcrypto/asn1/bio_asn1.c
249
if (ctx->buflen)
lib/libcrypto/asn1/bio_asn1.c
250
ctx->bufpos += ret;
lib/libcrypto/asn1/bio_asn1.c
252
ctx->bufpos = 0;
lib/libcrypto/asn1/bio_asn1.c
253
ctx->state = ASN1_STATE_DATA_COPY;
lib/libcrypto/asn1/bio_asn1.c
259
if (inl > ctx->copylen)
lib/libcrypto/asn1/bio_asn1.c
260
wrmax = ctx->copylen;
lib/libcrypto/asn1/bio_asn1.c
267
ctx->copylen -= ret;
lib/libcrypto/asn1/bio_asn1.c
271
if (ctx->copylen == 0)
lib/libcrypto/asn1/bio_asn1.c
272
ctx->state = ASN1_STATE_HEADER;
lib/libcrypto/asn1/bio_asn1.c
292
asn1_bio_flush_ex(BIO *b, BIO_ASN1_BUF_CTX *ctx, asn1_ps_func *cleanup,
lib/libcrypto/asn1/bio_asn1.c
297
if (ctx->ex_len <= 0)
lib/libcrypto/asn1/bio_asn1.c
300
ret = BIO_write(b->next_bio, ctx->ex_buf + ctx->ex_pos,
lib/libcrypto/asn1/bio_asn1.c
301
ctx->ex_len);
lib/libcrypto/asn1/bio_asn1.c
304
ctx->ex_len -= ret;
lib/libcrypto/asn1/bio_asn1.c
305
if (ctx->ex_len > 0)
lib/libcrypto/asn1/bio_asn1.c
306
ctx->ex_pos += ret;
lib/libcrypto/asn1/bio_asn1.c
309
cleanup(b, &ctx->ex_buf, &ctx->ex_len,
lib/libcrypto/asn1/bio_asn1.c
310
&ctx->ex_arg);
lib/libcrypto/asn1/bio_asn1.c
311
ctx->state = next;
lib/libcrypto/asn1/bio_asn1.c
312
ctx->ex_pos = 0;
lib/libcrypto/asn1/bio_asn1.c
320
asn1_bio_setup_ex(BIO *b, BIO_ASN1_BUF_CTX *ctx, asn1_ps_func *setup,
lib/libcrypto/asn1/bio_asn1.c
323
if (setup && !setup(b, &ctx->ex_buf, &ctx->ex_len, &ctx->ex_arg)) {
lib/libcrypto/asn1/bio_asn1.c
327
if (ctx->ex_len > 0)
lib/libcrypto/asn1/bio_asn1.c
328
ctx->state = ex_state;
lib/libcrypto/asn1/bio_asn1.c
330
ctx->state = other_state;
lib/libcrypto/asn1/bio_asn1.c
367
BIO_ASN1_BUF_CTX *ctx;
lib/libcrypto/asn1/bio_asn1.c
371
if ((ctx = b->ptr) == NULL)
lib/libcrypto/asn1/bio_asn1.c
377
ctx->prefix = ex_func->ex_func;
lib/libcrypto/asn1/bio_asn1.c
378
ctx->prefix_free = ex_func->ex_free_func;
lib/libcrypto/asn1/bio_asn1.c
383
ctx->suffix = ex_func->ex_func;
lib/libcrypto/asn1/bio_asn1.c
384
ctx->suffix_free = ex_func->ex_free_func;
lib/libcrypto/asn1/bio_asn1.c
388
ctx->ex_arg = arg2;
lib/libcrypto/asn1/bio_asn1.c
392
*(void **)arg2 = ctx->ex_arg;
lib/libcrypto/asn1/bio_asn1.c
400
if (ctx->state == ASN1_STATE_HEADER) {
lib/libcrypto/asn1/bio_asn1.c
401
if (!asn1_bio_setup_ex(b, ctx, ctx->suffix,
lib/libcrypto/asn1/bio_asn1.c
406
if (ctx->state == ASN1_STATE_POST_COPY) {
lib/libcrypto/asn1/bio_asn1.c
407
ret = asn1_bio_flush_ex(b, ctx, ctx->suffix_free,
lib/libcrypto/asn1/bio_asn1.c
413
if (ctx->state == ASN1_STATE_DONE)
lib/libcrypto/asn1/p5_pbev2.c
198
EVP_CIPHER_CTX ctx;
lib/libcrypto/asn1/p5_pbev2.c
224
EVP_CIPHER_CTX_legacy_clear(&ctx);
lib/libcrypto/asn1/p5_pbev2.c
227
if (!EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, iv, 0))
lib/libcrypto/asn1/p5_pbev2.c
229
if (EVP_CIPHER_param_to_asn1(&ctx, scheme->parameter) < 0) {
lib/libcrypto/asn1/p5_pbev2.c
231
EVP_CIPHER_CTX_cleanup(&ctx);
lib/libcrypto/asn1/p5_pbev2.c
234
EVP_CIPHER_CTX_cleanup(&ctx);
lib/libcrypto/asn1/tasn_dec.c
1245
ASN1_TLC *ctx)
lib/libcrypto/asn1/tasn_dec.c
917
ASN1_TLC ctx = { 0 };
lib/libcrypto/asn1/tasn_dec.c
926
tag_number, tag_class, optional, &ctx)) == 1) {
lib/libcrypto/asn1/x_name.c
300
const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx)
lib/libcrypto/asn1/x_name.c
318
&X509_NAME_INTERNAL_it, tag, aclass, opt, ctx);
lib/libcrypto/asn1/x_name.c
75
ASN1_TLC *ctx);
lib/libcrypto/asn1/x_pubkey.c
376
const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx)
lib/libcrypto/asn1/x_pubkey.c
476
const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx)
lib/libcrypto/asn1/x_pubkey.c
572
const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx)
lib/libcrypto/asn1/x_pubkey.c
669
const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx)
lib/libcrypto/bio/bf_buff.c
101
BIO_F_BUFFER_CTX *ctx;
lib/libcrypto/bio/bf_buff.c
103
ctx = malloc(sizeof(BIO_F_BUFFER_CTX));
lib/libcrypto/bio/bf_buff.c
104
if (ctx == NULL)
lib/libcrypto/bio/bf_buff.c
106
ctx->ibuf = malloc(DEFAULT_BUFFER_SIZE);
lib/libcrypto/bio/bf_buff.c
107
if (ctx->ibuf == NULL) {
lib/libcrypto/bio/bf_buff.c
108
free(ctx);
lib/libcrypto/bio/bf_buff.c
111
ctx->obuf = malloc(DEFAULT_BUFFER_SIZE);
lib/libcrypto/bio/bf_buff.c
112
if (ctx->obuf == NULL) {
lib/libcrypto/bio/bf_buff.c
113
free(ctx->ibuf);
lib/libcrypto/bio/bf_buff.c
114
free(ctx);
lib/libcrypto/bio/bf_buff.c
117
ctx->ibuf_size = DEFAULT_BUFFER_SIZE;
lib/libcrypto/bio/bf_buff.c
118
ctx->obuf_size = DEFAULT_BUFFER_SIZE;
lib/libcrypto/bio/bf_buff.c
119
ctx->ibuf_len = 0;
lib/libcrypto/bio/bf_buff.c
120
ctx->ibuf_off = 0;
lib/libcrypto/bio/bf_buff.c
121
ctx->obuf_len = 0;
lib/libcrypto/bio/bf_buff.c
122
ctx->obuf_off = 0;
lib/libcrypto/bio/bf_buff.c
125
bi->ptr = (char *)ctx;
lib/libcrypto/bio/bf_buff.c
151
BIO_F_BUFFER_CTX *ctx;
lib/libcrypto/bio/bf_buff.c
155
ctx = (BIO_F_BUFFER_CTX *)b->ptr;
lib/libcrypto/bio/bf_buff.c
157
if ((ctx == NULL) || (b->next_bio == NULL))
lib/libcrypto/bio/bf_buff.c
163
i = ctx->ibuf_len;
lib/libcrypto/bio/bf_buff.c
168
memcpy(out, &(ctx->ibuf[ctx->ibuf_off]), i);
lib/libcrypto/bio/bf_buff.c
169
ctx->ibuf_off += i;
lib/libcrypto/bio/bf_buff.c
170
ctx->ibuf_len -= i;
lib/libcrypto/bio/bf_buff.c
183
if (outl > ctx->ibuf_size) {
lib/libcrypto/bio/bf_buff.c
203
i = BIO_read(b->next_bio, ctx->ibuf, ctx->ibuf_size);
lib/libcrypto/bio/bf_buff.c
211
ctx->ibuf_off = 0;
lib/libcrypto/bio/bf_buff.c
212
ctx->ibuf_len = i;
lib/libcrypto/bio/bf_buff.c
222
BIO_F_BUFFER_CTX *ctx;
lib/libcrypto/bio/bf_buff.c
226
ctx = (BIO_F_BUFFER_CTX *)b->ptr;
lib/libcrypto/bio/bf_buff.c
227
if ((ctx == NULL) || (b->next_bio == NULL))
lib/libcrypto/bio/bf_buff.c
232
i = ctx->obuf_size - (ctx->obuf_len + ctx->obuf_off);
lib/libcrypto/bio/bf_buff.c
235
memcpy(&(ctx->obuf[ctx->obuf_off + ctx->obuf_len]), in, inl);
lib/libcrypto/bio/bf_buff.c
236
ctx->obuf_len += inl;
lib/libcrypto/bio/bf_buff.c
241
if (ctx->obuf_len != 0) {
lib/libcrypto/bio/bf_buff.c
244
memcpy(&(ctx->obuf[ctx->obuf_off + ctx->obuf_len]), in, i);
lib/libcrypto/bio/bf_buff.c
248
ctx->obuf_len += i;
lib/libcrypto/bio/bf_buff.c
252
i = BIO_write(b->next_bio, &(ctx->obuf[ctx->obuf_off]),
lib/libcrypto/bio/bf_buff.c
253
ctx->obuf_len);
lib/libcrypto/bio/bf_buff.c
262
ctx->obuf_off += i;
lib/libcrypto/bio/bf_buff.c
263
ctx->obuf_len -= i;
lib/libcrypto/bio/bf_buff.c
264
if (ctx->obuf_len == 0)
lib/libcrypto/bio/bf_buff.c
270
ctx->obuf_off = 0;
lib/libcrypto/bio/bf_buff.c
273
while (inl >= ctx->obuf_size) {
lib/libcrypto/bio/bf_buff.c
298
BIO_F_BUFFER_CTX *ctx;
lib/libcrypto/bio/bf_buff.c
304
ctx = (BIO_F_BUFFER_CTX *)b->ptr;
lib/libcrypto/bio/bf_buff.c
308
ctx->ibuf_off = 0;
lib/libcrypto/bio/bf_buff.c
309
ctx->ibuf_len = 0;
lib/libcrypto/bio/bf_buff.c
310
ctx->obuf_off = 0;
lib/libcrypto/bio/bf_buff.c
311
ctx->obuf_len = 0;
lib/libcrypto/bio/bf_buff.c
317
ret = (long)ctx->obuf_len;
lib/libcrypto/bio/bf_buff.c
321
p1 = ctx->ibuf;
lib/libcrypto/bio/bf_buff.c
322
for (i = 0; i < ctx->ibuf_len; i++) {
lib/libcrypto/bio/bf_buff.c
323
if (p1[ctx->ibuf_off + i] == '\n')
lib/libcrypto/bio/bf_buff.c
328
ret = (long)ctx->obuf_len;
lib/libcrypto/bio/bf_buff.c
336
ret = (long)ctx->ibuf_len;
lib/libcrypto/bio/bf_buff.c
344
if (num > ctx->ibuf_size) {
lib/libcrypto/bio/bf_buff.c
348
free(ctx->ibuf);
lib/libcrypto/bio/bf_buff.c
349
ctx->ibuf = p1;
lib/libcrypto/bio/bf_buff.c
351
ctx->ibuf_off = 0;
lib/libcrypto/bio/bf_buff.c
352
ctx->ibuf_len = (int)num;
lib/libcrypto/bio/bf_buff.c
353
memcpy(ctx->ibuf, ptr, num);
lib/libcrypto/bio/bf_buff.c
361
obs = ctx->obuf_size;
lib/libcrypto/bio/bf_buff.c
365
ibs = ctx->ibuf_size;
lib/libcrypto/bio/bf_buff.c
372
p1 = ctx->ibuf;
lib/libcrypto/bio/bf_buff.c
373
p2 = ctx->obuf;
lib/libcrypto/bio/bf_buff.c
374
if ((ibs > DEFAULT_BUFFER_SIZE) && (ibs != ctx->ibuf_size)) {
lib/libcrypto/bio/bf_buff.c
379
if ((obs > DEFAULT_BUFFER_SIZE) && (obs != ctx->obuf_size)) {
lib/libcrypto/bio/bf_buff.c
382
if (p1 != ctx->ibuf)
lib/libcrypto/bio/bf_buff.c
387
if (ctx->ibuf != p1) {
lib/libcrypto/bio/bf_buff.c
388
free(ctx->ibuf);
lib/libcrypto/bio/bf_buff.c
389
ctx->ibuf = p1;
lib/libcrypto/bio/bf_buff.c
390
ctx->ibuf_off = 0;
lib/libcrypto/bio/bf_buff.c
391
ctx->ibuf_len = 0;
lib/libcrypto/bio/bf_buff.c
392
ctx->ibuf_size = ibs;
lib/libcrypto/bio/bf_buff.c
394
if (ctx->obuf != p2) {
lib/libcrypto/bio/bf_buff.c
395
free(ctx->obuf);
lib/libcrypto/bio/bf_buff.c
396
ctx->obuf = p2;
lib/libcrypto/bio/bf_buff.c
397
ctx->obuf_off = 0;
lib/libcrypto/bio/bf_buff.c
398
ctx->obuf_len = 0;
lib/libcrypto/bio/bf_buff.c
399
ctx->obuf_size = obs;
lib/libcrypto/bio/bf_buff.c
413
if (ctx->obuf_len <= 0) {
lib/libcrypto/bio/bf_buff.c
420
if (ctx->obuf_len > 0) {
lib/libcrypto/bio/bf_buff.c
422
&(ctx->obuf[ctx->obuf_off]),
lib/libcrypto/bio/bf_buff.c
423
ctx->obuf_len);
lib/libcrypto/bio/bf_buff.c
427
ctx->obuf_off += r;
lib/libcrypto/bio/bf_buff.c
428
ctx->obuf_len -= r;
lib/libcrypto/bio/bf_buff.c
430
ctx->obuf_len = 0;
lib/libcrypto/bio/bf_buff.c
431
ctx->obuf_off = 0;
lib/libcrypto/bio/bf_buff.c
439
if (!BIO_set_read_buffer_size(dbio, ctx->ibuf_size) ||
lib/libcrypto/bio/bf_buff.c
440
!BIO_set_write_buffer_size(dbio, ctx->obuf_size))
lib/libcrypto/bio/bf_buff.c
473
BIO_F_BUFFER_CTX *ctx;
lib/libcrypto/bio/bf_buff.c
477
ctx = (BIO_F_BUFFER_CTX *)b->ptr;
lib/libcrypto/bio/bf_buff.c
482
if (ctx->ibuf_len > 0) {
lib/libcrypto/bio/bf_buff.c
483
p = &(ctx->ibuf[ctx->ibuf_off]);
lib/libcrypto/bio/bf_buff.c
485
for (i = 0; (i < ctx->ibuf_len) && (i < size); i++) {
lib/libcrypto/bio/bf_buff.c
495
ctx->ibuf_len -= i;
lib/libcrypto/bio/bf_buff.c
496
ctx->ibuf_off += i;
lib/libcrypto/bio/bf_buff.c
504
i = BIO_read(b->next_bio, ctx->ibuf, ctx->ibuf_size);
lib/libcrypto/bio/bf_buff.c
513
ctx->ibuf_len = i;
lib/libcrypto/bio/bf_buff.c
514
ctx->ibuf_off = 0;
lib/libcrypto/bn/bn.h
283
void BN_CTX_start(BN_CTX *ctx);
lib/libcrypto/bn/bn.h
284
BIGNUM *BN_CTX_get(BN_CTX *ctx);
lib/libcrypto/bn/bn.h
285
void BN_CTX_end(BN_CTX *ctx);
lib/libcrypto/bn/bn.h
307
int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
308
int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
314
BN_CTX *ctx);
lib/libcrypto/bn/bn.h
315
#define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx))
lib/libcrypto/bn/bn.h
317
int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
318
int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
320
int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
323
const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
324
int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
325
int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
327
int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
343
int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
346
const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
348
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
lib/libcrypto/bn/bn.h
350
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont);
lib/libcrypto/bn/bn.h
367
int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
368
int BN_kronecker(const BIGNUM *a,const BIGNUM *b,BN_CTX *ctx); /* returns -2 for error */
lib/libcrypto/bn/bn.h
370
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
372
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
380
int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
lib/libcrypto/bn/bn.h
381
int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
lib/libcrypto/bn/bn.h
386
BN_MONT_CTX *mont, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
388
BN_CTX *ctx);
lib/libcrypto/bn/bn.h
390
BN_MONT_CTX *mont, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
392
int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
lib/libcrypto/bn/bn.h
395
const BIGNUM *mod, BN_CTX *ctx);
lib/libcrypto/bn/bn_bpsw.c
100
if (!bn_div_by_two_mod_odd_n(U, n, ctx))
lib/libcrypto/bn/bn_bpsw.c
106
if (!bn_div_by_two_mod_odd_n(V, n, ctx))
lib/libcrypto/bn/bn_bpsw.c
113
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_bpsw.c
124
const BIGNUM *n, BN_CTX *ctx)
lib/libcrypto/bn/bn_bpsw.c
142
if (!bn_lucas_step(U, V, digit, D, n, ctx))
lib/libcrypto/bn/bn_bpsw.c
160
BN_CTX *ctx)
lib/libcrypto/bn/bn_bpsw.c
166
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_bpsw.c
168
if ((k = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_bpsw.c
170
if ((U = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_bpsw.c
172
if ((V = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_bpsw.c
193
if (!bn_lucas(U, V, k, D, n, ctx))
lib/libcrypto/bn/bn_bpsw.c
207
if (!bn_lucas_step(U, V, 0, D, n, ctx))
lib/libcrypto/bn/bn_bpsw.c
226
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_bpsw.c
238
bn_strong_lucas_selfridge(int *is_pseudoprime, const BIGNUM *n, BN_CTX *ctx)
lib/libcrypto/bn/bn_bpsw.c
244
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_bpsw.c
247
if (!bn_is_perfect_square(&is_perfect_square, n, ctx))
lib/libcrypto/bn/bn_bpsw.c
259
if ((D = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_bpsw.c
261
if ((two = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_bpsw.c
272
if ((jacobi_symbol = BN_kronecker(D, n, ctx)) == -2)
lib/libcrypto/bn/bn_bpsw.c
291
if (!bn_strong_lucas_test(is_pseudoprime, n, D, ctx))
lib/libcrypto/bn/bn_bpsw.c
298
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_bpsw.c
30
bn_div_by_two_mod_odd_n(BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
lib/libcrypto/bn/bn_bpsw.c
322
const BIGNUM *k, int s, const BIGNUM *base, BN_CTX *ctx, BN_MONT_CTX *mctx)
lib/libcrypto/bn/bn_bpsw.c
328
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_bpsw.c
330
if ((power = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_bpsw.c
337
if (!BN_mod_exp_mont_ct(power, base, k, n, ctx, mctx))
lib/libcrypto/bn/bn_bpsw.c
347
if (!BN_mod_sqr(power, power, n, ctx))
lib/libcrypto/bn/bn_bpsw.c
373
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_bpsw.c
384
bn_miller_rabin(int *is_pseudoprime, const BIGNUM *n, BN_CTX *ctx,
lib/libcrypto/bn/bn_bpsw.c
393
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_bpsw.c
395
if ((base = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_bpsw.c
397
if ((k = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_bpsw.c
399
if ((n_minus_one = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_bpsw.c
41
if (!BN_mod_ct(a, a, n, ctx))
lib/libcrypto/bn/bn_bpsw.c
429
if ((mctx = BN_MONT_CTX_create(n, ctx)) == NULL)
lib/libcrypto/bn/bn_bpsw.c
439
if (!bn_fermat(is_pseudoprime, n, n_minus_one, k, s, base, ctx, mctx))
lib/libcrypto/bn/bn_bpsw.c
453
if (!bn_fermat(is_pseudoprime, n, n_minus_one, k, s, base, ctx,
lib/libcrypto/bn/bn_bpsw.c
471
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_bpsw.c
485
BN_CTX *ctx = NULL;
lib/libcrypto/bn/bn_bpsw.c
510
if ((ctx = in_ctx) == NULL)
lib/libcrypto/bn/bn_bpsw.c
511
ctx = BN_CTX_new();
lib/libcrypto/bn/bn_bpsw.c
512
if (ctx == NULL)
lib/libcrypto/bn/bn_bpsw.c
515
if (!bn_miller_rabin(is_pseudoprime, n, ctx, rounds))
lib/libcrypto/bn/bn_bpsw.c
520
if (!bn_strong_lucas_selfridge(is_pseudoprime, n, ctx))
lib/libcrypto/bn/bn_bpsw.c
527
if (ctx != in_ctx)
lib/libcrypto/bn/bn_bpsw.c
528
BN_CTX_free(ctx);
lib/libcrypto/bn/bn_bpsw.c
64
const BIGNUM *n, BN_CTX *ctx)
lib/libcrypto/bn/bn_bpsw.c
69
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_bpsw.c
71
if ((tmp = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_bpsw.c
75
if (!BN_sqr(tmp, U, ctx))
lib/libcrypto/bn/bn_bpsw.c
77
if (!BN_mul(tmp, D, tmp, ctx))
lib/libcrypto/bn/bn_bpsw.c
81
if (!BN_mod_mul(U, U, V, n, ctx))
lib/libcrypto/bn/bn_bpsw.c
85
if (!BN_sqr(V, V, ctx))
lib/libcrypto/bn/bn_bpsw.c
89
if (!bn_div_by_two_mod_odd_n(V, n, ctx))
lib/libcrypto/bn/bn_bpsw.c
94
if (!BN_mul(tmp, D, U, ctx))
lib/libcrypto/bn/bn_div.c
227
const BIGNUM *divisor, BN_CTX *ctx, int ct)
lib/libcrypto/bn/bn_div.c
237
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_div.c
266
if ((tmp = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_div.c
268
if ((snum = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_div.c
270
if ((sdiv = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_div.c
273
if ((res = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_div.c
417
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_div.c
424
const BIGNUM *divisor, BN_CTX *ctx)
lib/libcrypto/bn/bn_div.c
431
return BN_div_internal(quotient, remainder, numerator, divisor, ctx, ct);
lib/libcrypto/bn/bn_div.c
437
const BIGNUM *divisor, BN_CTX *ctx)
lib/libcrypto/bn/bn_div.c
439
return BN_div_internal(quotient, remainder, numerator, divisor, ctx, 0);
lib/libcrypto/bn/bn_div.c
444
const BIGNUM *divisor, BN_CTX *ctx)
lib/libcrypto/bn/bn_div.c
446
return BN_div_internal(quotient, remainder, numerator, divisor, ctx, 1);
lib/libcrypto/bn/bn_exp.c
1003
if (!BN_mod_sqr_reciprocal(aa, val[0], recp, ctx))
lib/libcrypto/bn/bn_exp.c
1007
if (((val[i] = BN_CTX_get(ctx)) == NULL) ||
lib/libcrypto/bn/bn_exp.c
1009
aa, recp, ctx))
lib/libcrypto/bn/bn_exp.c
1027
if (!BN_mod_sqr_reciprocal(r, r, recp, ctx))
lib/libcrypto/bn/bn_exp.c
1056
if (!BN_mod_sqr_reciprocal(r, r, recp, ctx))
lib/libcrypto/bn/bn_exp.c
1061
if (!BN_mod_mul_reciprocal(r, r, val[wvalue >> 1], recp, ctx))
lib/libcrypto/bn/bn_exp.c
1076
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_exp.c
1084
BN_CTX *ctx, int ct)
lib/libcrypto/bn/bn_exp.c
1122
ret = BN_mod_exp_mont_word(r, A,p, m,ctx, NULL);
lib/libcrypto/bn/bn_exp.c
1124
ret = BN_mod_exp_mont_ct(r, a,p, m,ctx, NULL);
lib/libcrypto/bn/bn_exp.c
1126
ret = BN_mod_exp_reciprocal(r, a,p, m, ctx);
lib/libcrypto/bn/bn_exp.c
1134
BN_CTX *ctx)
lib/libcrypto/bn/bn_exp.c
1136
return BN_mod_exp_internal(r, a, p, m, ctx,
lib/libcrypto/bn/bn_exp.c
1143
BN_CTX *ctx)
lib/libcrypto/bn/bn_exp.c
1145
return BN_mod_exp_internal(r, a, p, m, ctx, 1);
lib/libcrypto/bn/bn_exp.c
1150
BN_CTX *ctx)
lib/libcrypto/bn/bn_exp.c
1152
return BN_mod_exp_internal(r, a, p, m, ctx, 0);
lib/libcrypto/bn/bn_exp.c
1157
const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m, BN_CTX *ctx,
lib/libcrypto/bn/bn_exp.c
1182
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_exp.c
1183
if ((d = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
1185
if ((r = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
1187
if ((val1[0] = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
1189
if ((val2[0] = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
1193
mont = BN_MONT_CTX_create(m, ctx);
lib/libcrypto/bn/bn_exp.c
1203
if (!BN_nnmod(val1[0], a1, m, ctx))
lib/libcrypto/bn/bn_exp.c
1212
if (!BN_to_montgomery(val1[0], a_mod_m, mont, ctx))
lib/libcrypto/bn/bn_exp.c
1215
if (!BN_mod_mul_montgomery(d, val1[0], val1[0], mont, ctx))
lib/libcrypto/bn/bn_exp.c
1220
if (((val1[i] = BN_CTX_get(ctx)) == NULL) ||
lib/libcrypto/bn/bn_exp.c
1222
d, mont, ctx))
lib/libcrypto/bn/bn_exp.c
1231
if (!BN_nnmod(val2[0], a2, m, ctx))
lib/libcrypto/bn/bn_exp.c
1239
if (!BN_to_montgomery(val2[0], a_mod_m, mont, ctx))
lib/libcrypto/bn/bn_exp.c
124
BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
lib/libcrypto/bn/bn_exp.c
1242
if (!BN_mod_mul_montgomery(d, val2[0], val2[0], mont, ctx))
lib/libcrypto/bn/bn_exp.c
1247
if (((val2[i] = BN_CTX_get(ctx)) == NULL) ||
lib/libcrypto/bn/bn_exp.c
1249
d, mont, ctx))
lib/libcrypto/bn/bn_exp.c
1262
if (!BN_to_montgomery(r, BN_value_one(), mont, ctx))
lib/libcrypto/bn/bn_exp.c
1266
if (!BN_mod_mul_montgomery(r, r,r, mont, ctx))
lib/libcrypto/bn/bn_exp.c
1303
mont, ctx))
lib/libcrypto/bn/bn_exp.c
1312
mont, ctx))
lib/libcrypto/bn/bn_exp.c
1318
if (!BN_from_montgomery(rr, r,mont, ctx))
lib/libcrypto/bn/bn_exp.c
1326
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_exp.c
135
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_exp.c
137
if ((v = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
142
rr = BN_CTX_get(ctx);
lib/libcrypto/bn/bn_exp.c
157
if (!BN_sqr(v, v, ctx))
lib/libcrypto/bn/bn_exp.c
161
if (!BN_mul(rr, rr, v, ctx))
lib/libcrypto/bn/bn_exp.c
171
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_exp.c
180
BN_CTX *ctx)
lib/libcrypto/bn/bn_exp.c
211
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_exp.c
212
if ((d = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
214
if ((q = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
216
if ((val[0] = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
219
if (!BN_nnmod(val[0], a, m, ctx))
lib/libcrypto/bn/bn_exp.c
230
if (!BN_mod_mul(d, val[0], val[0], m, ctx))
lib/libcrypto/bn/bn_exp.c
234
if (((val[i] = BN_CTX_get(ctx)) == NULL) ||
lib/libcrypto/bn/bn_exp.c
235
!BN_mod_mul(val[i], val[i - 1], d,m, ctx))
lib/libcrypto/bn/bn_exp.c
253
if (!BN_mod_mul(r, r, r, m, ctx))
lib/libcrypto/bn/bn_exp.c
282
if (!BN_mod_mul(r, r, r, m, ctx))
lib/libcrypto/bn/bn_exp.c
287
if (!BN_mod_mul(r, r, val[wvalue >> 1], m, ctx))
lib/libcrypto/bn/bn_exp.c
302
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_exp.c
395
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
lib/libcrypto/bn/bn_exp.c
425
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_exp.c
428
mont = BN_MONT_CTX_create(m, ctx);
lib/libcrypto/bn/bn_exp.c
460
if (!BN_to_montgomery(&tmp, BN_value_one(), mont, ctx))
lib/libcrypto/bn/bn_exp.c
470
if (!BN_nnmod(&am, a, m, ctx))
lib/libcrypto/bn/bn_exp.c
472
if (!BN_to_montgomery(&am, &am, mont, ctx))
lib/libcrypto/bn/bn_exp.c
579
if (!BN_mod_mul_montgomery(&tmp, &am, &am, mont, ctx))
lib/libcrypto/bn/bn_exp.c
587
mont, ctx))
lib/libcrypto/bn/bn_exp.c
611
mont, ctx))
lib/libcrypto/bn/bn_exp.c
622
if (!BN_mod_mul_montgomery(&tmp, &tmp, &am, mont, ctx))
lib/libcrypto/bn/bn_exp.c
628
if (!BN_from_montgomery(rr, &tmp, mont, ctx))
lib/libcrypto/bn/bn_exp.c
636
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_exp.c
645
BN_CTX *ctx, BN_MONT_CTX *in_mont, int ct)
lib/libcrypto/bn/bn_exp.c
656
return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
lib/libcrypto/bn/bn_exp.c
676
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_exp.c
677
if ((d = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
679
if ((r = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
681
if ((val[0] = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
685
mont = BN_MONT_CTX_create(m, ctx);
lib/libcrypto/bn/bn_exp.c
689
if (!BN_nnmod(val[0], a,m, ctx))
lib/libcrypto/bn/bn_exp.c
697
if (!BN_to_montgomery(val[0], aa, mont, ctx))
lib/libcrypto/bn/bn_exp.c
702
if (!BN_mod_mul_montgomery(d, val[0], val[0], mont, ctx))
lib/libcrypto/bn/bn_exp.c
706
if (((val[i] = BN_CTX_get(ctx)) == NULL) ||
lib/libcrypto/bn/bn_exp.c
708
d, mont, ctx))
lib/libcrypto/bn/bn_exp.c
720
if (!BN_to_montgomery(r, BN_value_one(), mont, ctx))
lib/libcrypto/bn/bn_exp.c
725
if (!BN_mod_mul_montgomery(r, r, r, mont, ctx))
lib/libcrypto/bn/bn_exp.c
755
if (!BN_mod_mul_montgomery(r, r, r, mont, ctx))
lib/libcrypto/bn/bn_exp.c
760
if (!BN_mod_mul_montgomery(r, r, val[wvalue >> 1], mont, ctx))
lib/libcrypto/bn/bn_exp.c
770
if (!BN_from_montgomery(rr, r,mont, ctx))
lib/libcrypto/bn/bn_exp.c
778
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_exp.c
785
BN_CTX *ctx, BN_MONT_CTX *in_mont)
lib/libcrypto/bn/bn_exp.c
787
return BN_mod_exp_mont_internal(rr, a, p, m, ctx, in_mont,
lib/libcrypto/bn/bn_exp.c
794
BN_CTX *ctx, BN_MONT_CTX *in_mont)
lib/libcrypto/bn/bn_exp.c
796
return BN_mod_exp_mont_internal(rr, a, p, m, ctx, in_mont, 1);
lib/libcrypto/bn/bn_exp.c
801
BN_CTX *ctx, BN_MONT_CTX *in_mont)
lib/libcrypto/bn/bn_exp.c
803
return BN_mod_exp_mont_internal(rr, a, p, m, ctx, in_mont, 0);
lib/libcrypto/bn/bn_exp.c
808
BN_CTX *ctx, BN_MONT_CTX *in_mont)
lib/libcrypto/bn/bn_exp.c
820
(BN_mod_ct(t, r, m, ctx) && (swap_tmp = r, r = t, t = swap_tmp, 1))))
lib/libcrypto/bn/bn_exp.c
830
(BN_set_word(r, (w)) && BN_to_montgomery(r, r, (mont), ctx))
lib/libcrypto/bn/bn_exp.c
862
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_exp.c
863
if ((d = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
865
if ((r = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
867
if ((t = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
871
mont = BN_MONT_CTX_create(m, ctx);
lib/libcrypto/bn/bn_exp.c
898
if (!BN_mod_mul_montgomery(r, r, r, mont, ctx))
lib/libcrypto/bn/bn_exp.c
938
if (!BN_from_montgomery(rr, r, mont, ctx))
lib/libcrypto/bn/bn_exp.c
947
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_exp.c
954
BN_CTX *ctx)
lib/libcrypto/bn/bn_exp.c
981
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_exp.c
982
if ((aa = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
984
if ((q = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
986
if ((val[0] = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_exp.c
992
if (!BN_nnmod(val[0], a, m, ctx))
lib/libcrypto/bn/bn_gcd.c
162
BN_gcd(BIGNUM *r, const BIGNUM *in_a, const BIGNUM *in_b, BN_CTX *ctx)
lib/libcrypto/bn/bn_gcd.c
167
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_gcd.c
168
if ((a = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
170
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
194
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_gcd.c
205
BN_CTX *ctx)
lib/libcrypto/bn/bn_gcd.c
220
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_gcd.c
221
if ((A = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
223
if ((B = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
225
if ((X = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
227
if ((D = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
229
if ((M = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
231
if ((Y = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
233
if ((T = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
253
if (!BN_nnmod(B, pB, A, ctx))
lib/libcrypto/bn/bn_gcd.c
282
if (!BN_div_ct(D, M, pA, B, ctx))
lib/libcrypto/bn/bn_gcd.c
316
if (!BN_mul(tmp, D, X, ctx))
lib/libcrypto/bn/bn_gcd.c
338
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_gcd.c
343
BN_gcd_ct(BIGNUM *r, const BIGNUM *in_a, const BIGNUM *in_b, BN_CTX *ctx)
lib/libcrypto/bn/bn_gcd.c
345
if (BN_gcd_no_branch(r, in_a, in_b, ctx) == NULL)
lib/libcrypto/bn/bn_gcd.c
355
BN_CTX *ctx)
lib/libcrypto/bn/bn_gcd.c
366
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_gcd.c
367
if ((A = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
369
if ((B = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
371
if ((X = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
373
if ((D = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
375
if ((M = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
377
if ((Y = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
379
if ((T = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
406
if (!BN_nnmod(B, pB, A, ctx))
lib/libcrypto/bn/bn_gcd.c
435
if (!BN_div_ct(D, M, pA, B, ctx))
lib/libcrypto/bn/bn_gcd.c
469
if (!BN_mul(tmp, D, X, ctx))
lib/libcrypto/bn/bn_gcd.c
499
if (!BN_nnmod(Y, Y, n, ctx))
lib/libcrypto/bn/bn_gcd.c
509
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_gcd.c
515
BN_mod_inverse_internal(BIGNUM *in, const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx,
lib/libcrypto/bn/bn_gcd.c
523
return BN_mod_inverse_no_branch(in, a, n, ctx);
lib/libcrypto/bn/bn_gcd.c
525
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_gcd.c
526
if ((A = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
528
if ((B = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
530
if ((X = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
532
if ((D = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
534
if ((M = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
536
if ((Y = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
538
if ((T = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_gcd.c
557
if (!BN_nnmod(B, B, A, ctx))
lib/libcrypto/bn/bn_gcd.c
701
if (!BN_div_nonct(D, M, A, B, ctx))
lib/libcrypto/bn/bn_gcd.c
753
if (!BN_mul(tmp, D,X, ctx))
lib/libcrypto/bn/bn_gcd.c
786
if (!BN_nnmod(Y, Y, n, ctx))
lib/libcrypto/bn/bn_gcd.c
796
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_gcd.c
801
BN_mod_inverse(BIGNUM *in, const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
lib/libcrypto/bn/bn_gcd.c
805
return BN_mod_inverse_internal(in, a, n, ctx, ct);
lib/libcrypto/bn/bn_gcd.c
810
BN_mod_inverse_nonct(BIGNUM *in, const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
lib/libcrypto/bn/bn_gcd.c
812
return BN_mod_inverse_internal(in, a, n, ctx, 0);
lib/libcrypto/bn/bn_gcd.c
816
BN_mod_inverse_ct(BIGNUM *in, const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
lib/libcrypto/bn/bn_gcd.c
818
return BN_mod_inverse_internal(in, a, n, ctx, 1);
lib/libcrypto/bn/bn_isqrt.c
110
if (!BN_div_ct(b, NULL, b, a, ctx))
lib/libcrypto/bn/bn_isqrt.c
126
if (!BN_sqr(b, a, ctx))
lib/libcrypto/bn/bn_isqrt.c
149
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_isqrt.c
151
if (ctx != in_ctx)
lib/libcrypto/bn/bn_isqrt.c
152
BN_CTX_free(ctx);
lib/libcrypto/bn/bn_isqrt.c
200
bn_is_perfect_square(int *out_perfect, const BIGNUM *n, BN_CTX *ctx)
lib/libcrypto/bn/bn_isqrt.c
233
return bn_isqrt(NULL, out_perfect, n, ctx);
lib/libcrypto/bn/bn_isqrt.c
45
BN_CTX *ctx = NULL;
lib/libcrypto/bn/bn_isqrt.c
61
if ((ctx = in_ctx) == NULL)
lib/libcrypto/bn/bn_isqrt.c
62
ctx = BN_CTX_new();
lib/libcrypto/bn/bn_isqrt.c
63
if (ctx == NULL)
lib/libcrypto/bn/bn_isqrt.c
66
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_isqrt.c
68
if ((a = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_isqrt.c
70
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_kron.c
180
if (!BN_nnmod(b, b, a, ctx))
lib/libcrypto/bn/bn_kron.c
191
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_kron.c
66
BN_kronecker(const BIGNUM *A, const BIGNUM *B, BN_CTX *ctx)
lib/libcrypto/bn/bn_kron.c
74
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_kron.c
76
if ((a = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_kron.c
78
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_local.h
287
BN_MONT_CTX *BN_MONT_CTX_create(const BIGNUM *bn, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
292
BN_RECP_CTX *recp, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
294
BN_RECP_CTX *recp, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
296
BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
298
const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
302
const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
304
const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
306
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
lib/libcrypto/bn/bn_local.h
308
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
lib/libcrypto/bn/bn_local.h
310
BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
312
BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
313
int BN_mod_ct(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
314
int BN_mod_nonct(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
317
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
lib/libcrypto/bn/bn_local.h
320
BN_CTX *ctx, BN_MONT_CTX *m_ctx);
lib/libcrypto/bn/bn_local.h
323
const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
326
BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
328
BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
329
int BN_gcd_ct(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
335
int bn_isqrt(BIGNUM *out_sqrt, int *out_perfect, const BIGNUM *n, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
336
int bn_is_perfect_square(int *out_perfect, const BIGNUM *n, BN_CTX *ctx);
lib/libcrypto/bn/bn_local.h
338
int bn_is_prime_bpsw(int *is_prime, const BIGNUM *n, BN_CTX *ctx, size_t rounds);
lib/libcrypto/bn/bn_mod.c
118
BN_mod_ct(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod.c
120
return BN_div_ct(NULL, r, a, m, ctx);
lib/libcrypto/bn/bn_mod.c
124
BN_mod_nonct(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod.c
126
return BN_div_nonct(NULL, r, a, m, ctx);
lib/libcrypto/bn/bn_mod.c
136
BN_nnmod(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod.c
142
if (!BN_mod_ct(r, a, m, ctx))
lib/libcrypto/bn/bn_mod.c
152
BN_CTX *ctx)
lib/libcrypto/bn/bn_mod.c
160
return BN_nnmod(r, r, m, ctx);
lib/libcrypto/bn/bn_mod.c
185
BN_CTX *ctx)
lib/libcrypto/bn/bn_mod.c
193
return BN_nnmod(r, r, m, ctx);
lib/libcrypto/bn/bn_mod.c
218
BN_CTX *ctx)
lib/libcrypto/bn/bn_mod.c
223
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod.c
232
rr = BN_CTX_get(ctx);
lib/libcrypto/bn/bn_mod.c
237
if (!BN_sqr(rr, a, ctx))
lib/libcrypto/bn/bn_mod.c
240
if (!BN_mul(rr, a, b, ctx))
lib/libcrypto/bn/bn_mod.c
243
if (!BN_nnmod(r, rr, m, ctx))
lib/libcrypto/bn/bn_mod.c
249
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod.c
256
BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod.c
258
return BN_mod_mul(r, a, a, m, ctx);
lib/libcrypto/bn/bn_mod.c
263
BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod.c
271
return BN_nnmod(r, r, m, ctx);
lib/libcrypto/bn/bn_mod.c
295
BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod.c
300
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod.c
307
if (!BN_nnmod(r, a, m, ctx))
lib/libcrypto/bn/bn_mod.c
311
if ((abs_m = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod.c
323
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
113
BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
118
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
120
if ((n = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
130
if (!BN_mod_exp_ct(out_sqrt, a, n, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
136
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
147
BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
152
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
154
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
156
if ((i = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
158
if ((n = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
160
if ((tmp = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
169
if (!BN_mod_lshift1(tmp, a, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
173
if (!BN_mod_exp_ct(b, tmp, n, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
177
if (!BN_mod_sqr(i, b, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
179
if (!BN_mod_mul(i, tmp, i, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
185
if (!BN_mod_mul(out_sqrt, a, b, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
187
if (!BN_mod_mul(out_sqrt, out_sqrt, i, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
193
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
209
const BIGNUM *p, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
211
switch (BN_kronecker(n, p, ctx)) {
lib/libcrypto/bn/bn_mod_sqrt.c
237
const BIGNUM *q, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
243
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
245
if ((n = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
247
if ((p_abs = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
253
if (!bn_mod_sqrt_n_is_non_residue(&is_non_residue, n, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
266
if (!bn_mod_sqrt_n_is_non_residue(&is_non_residue, n, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
285
if (!BN_mod_exp_ct(out_generator, n, q, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
297
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
312
const BIGNUM *p, const BIGNUM *q, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
317
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
319
if ((k = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
327
if (!BN_mod_exp_ct(x, a, k, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
331
if (!BN_mod_sqr(b, x, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
333
if (!BN_mod_mul(b, a, b, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
337
if (!BN_mod_mul(x, a, x, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
343
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
355
const BIGNUM *p, int r, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
361
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
363
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
389
if (!BN_mod_sqr(x, x, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
406
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
420
const BIGNUM *p, int m, int r, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
425
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
427
if ((t = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
433
if (!BN_mod_exp_ct(t, y, t, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
437
if (!BN_mod_mul(x, x, t, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
441
if (!BN_mod_sqr(y, t, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
445
if (!BN_mod_mul(b, b, y, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
451
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
458
BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
464
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
466
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
468
if ((q = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
470
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
472
if ((y = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
485
if (!bn_mod_sqrt_find_sylow_generator(y, p, q, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
491
if (!bn_mod_sqrt_tonelli_shanks_initialize(b, x, a, p, q, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
527
if (!bn_mod_sqrt_tonelli_shanks_find_exponent(&m, b, p, r, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
533
if (!bn_mod_sqrt_tonelli_shanks_update(b, x, y, p, m, r, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
558
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
568
bn_mod_sqrt_normalize(BIGNUM *sqrt, const BIGNUM *p, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
573
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
575
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
589
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
600
BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
605
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
607
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
610
if (!BN_mod_sqr(x, sqrt_a, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
621
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
628
BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
636
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
638
if ((a_mod_p = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
640
if ((sqrt = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mod_sqrt.c
643
if (!BN_nnmod(a_mod_p, a, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
646
if (!bn_mod_sqrt_trivial_cases(&done, sqrt, a_mod_p, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
658
if ((kronecker = BN_kronecker(a_mod_p, p, ctx)) == -2)
lib/libcrypto/bn/bn_mod_sqrt.c
669
if (!bn_mod_sqrt_p_is_3_mod_4(sqrt, a_mod_p, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
672
if (!bn_mod_sqrt_p_is_5_mod_8(sqrt, a_mod_p, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
675
if (!bn_mod_sqrt_p_is_1_mod_8(sqrt, a_mod_p, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
683
if (!bn_mod_sqrt_normalize(sqrt, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
687
if (!bn_mod_sqrt_verify(a_mod_p, sqrt, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
696
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mod_sqrt.c
702
BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
lib/libcrypto/bn/bn_mod_sqrt.c
711
if (!bn_mod_sqrt_internal(out_sqrt, a, p, ctx))
lib/libcrypto/bn/bn_mod_sqrt.c
87
const BIGNUM *p, BN_CTX *ctx)
lib/libcrypto/bn/bn_mont.c
195
BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
lib/libcrypto/bn/bn_mont.c
200
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mont.c
202
if ((N = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mont.c
204
if ((Ninv = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mont.c
206
if ((R = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mont.c
208
if ((Rinv = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mont.c
243
if ((BN_mod_inverse_ct(Rinv, R, N, ctx)) == NULL)
lib/libcrypto/bn/bn_mont.c
256
if (!BN_div_ct(Ninv, NULL, Ninv, N, ctx))
lib/libcrypto/bn/bn_mont.c
273
if (!BN_mod_ct(&mont->RR, &mont->RR, &mont->N, ctx))
lib/libcrypto/bn/bn_mont.c
278
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mont.c
286
BN_CTX *ctx)
lib/libcrypto/bn/bn_mont.c
297
if ((mctx = BN_MONT_CTX_create(mod, ctx)) == NULL)
lib/libcrypto/bn/bn_mont.c
405
BN_MONT_CTX *mctx, BN_CTX *ctx)
lib/libcrypto/bn/bn_mont.c
410
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mont.c
412
if ((tmp = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mont.c
416
if (!BN_sqr(tmp, a, ctx))
lib/libcrypto/bn/bn_mont.c
419
if (!BN_mul(tmp, a, b, ctx))
lib/libcrypto/bn/bn_mont.c
429
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mont.c
519
BN_MONT_CTX *mctx, BN_CTX *ctx)
lib/libcrypto/bn/bn_mont.c
524
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mont.c
531
if ((t = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mont.c
546
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mont.c
554
BN_MONT_CTX *mctx, BN_CTX *ctx)
lib/libcrypto/bn/bn_mont.c
557
return bn_mod_mul_montgomery_simple(r, a, b, mctx, ctx);
lib/libcrypto/bn/bn_mont.c
559
return bn_montgomery_multiply(r, a, b, mctx, ctx);
lib/libcrypto/bn/bn_mont.c
565
BN_MONT_CTX *mctx, BN_CTX *ctx)
lib/libcrypto/bn/bn_mont.c
568
return bn_mod_mul_montgomery_simple(r, a, b, mctx, ctx);
lib/libcrypto/bn/bn_mont.c
576
return bn_montgomery_multiply(r, a, b, mctx, ctx);
lib/libcrypto/bn/bn_mont.c
586
return bn_montgomery_multiply(r, a, b, mctx, ctx);
lib/libcrypto/bn/bn_mont.c
599
BN_MONT_CTX *mctx, BN_CTX *ctx)
lib/libcrypto/bn/bn_mont.c
602
return bn_mod_mul_montgomery(r, a, b, mctx, ctx);
lib/libcrypto/bn/bn_mont.c
607
BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mctx, BN_CTX *ctx)
lib/libcrypto/bn/bn_mont.c
610
return bn_mod_mul_montgomery(r, a, &mctx->RR, mctx, ctx);
lib/libcrypto/bn/bn_mont.c
615
BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mctx, BN_CTX *ctx)
lib/libcrypto/bn/bn_mont.c
620
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mont.c
622
if ((tmp = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_mont.c
631
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_mul.c
371
bn_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, int rn, BN_CTX *ctx)
lib/libcrypto/bn/bn_mul.c
379
BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
lib/libcrypto/bn/bn_mul.c
385
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_mul.c
394
rr = BN_CTX_get(ctx);
lib/libcrypto/bn/bn_mul.c
411
if (!bn_mul(rr, a, b, rn, ctx))
lib/libcrypto/bn/bn_mul.c
425
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_prime.c
127
const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
lib/libcrypto/bn/bn_prime.c
129
const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
lib/libcrypto/bn/bn_prime.c
159
BN_CTX *ctx;
lib/libcrypto/bn/bn_prime.c
174
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/bn/bn_prime.c
176
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_prime.c
177
if ((p = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_prime.c
187
if (!probable_prime_dh_safe(ret, bits, add, rem, ctx))
lib/libcrypto/bn/bn_prime.c
190
if (!probable_prime_dh(ret, bits, add, rem, ctx))
lib/libcrypto/bn/bn_prime.c
199
if (!bn_is_prime_bpsw(&is_prime, ret, ctx, 1))
lib/libcrypto/bn/bn_prime.c
204
if (!bn_is_prime_bpsw(&is_prime, ret, ctx, 1))
lib/libcrypto/bn/bn_prime.c
217
if (!bn_is_prime_bpsw(&is_prime, p, ctx, 1))
lib/libcrypto/bn/bn_prime.c
229
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_prime.c
230
BN_CTX_free(ctx);
lib/libcrypto/bn/bn_prime.c
311
BN_CTX *ctx)
lib/libcrypto/bn/bn_prime.c
316
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_prime.c
317
if ((t1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_prime.c
325
if (!BN_mod_ct(t1, rnd, add, ctx))
lib/libcrypto/bn/bn_prime.c
354
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_prime.c
360
const BIGNUM *rem, BN_CTX *ctx)
lib/libcrypto/bn/bn_prime.c
366
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_prime.c
367
if ((t1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_prime.c
369
if ((q = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_prime.c
371
if ((qadd = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_prime.c
381
if (!BN_mod_ct(t1, q,qadd, ctx))
lib/libcrypto/bn/bn_prime.c
421
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_recp.c
108
BN_CTX *ctx)
lib/libcrypto/bn/bn_recp.c
121
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_recp.c
122
if ((a = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_recp.c
124
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/bn/bn_recp.c
128
d = BN_CTX_get(ctx);
lib/libcrypto/bn/bn_recp.c
133
r = BN_CTX_get(ctx);
lib/libcrypto/bn/bn_recp.c
153
if (!BN_div_ct(recp->Nr, NULL, recp->Nr, recp->N, ctx))
lib/libcrypto/bn/bn_recp.c
166
if (!BN_mul(b, a, recp->Nr, ctx))
lib/libcrypto/bn/bn_recp.c
172
if (!BN_mul(b, recp->N, d, ctx))
lib/libcrypto/bn/bn_recp.c
198
BN_CTX_end(ctx);
lib/libcrypto/bn/bn_recp.c
205
BN_RECP_CTX *recp, BN_CTX *ctx)
lib/libcrypto/bn/bn_recp.c
207
if (!BN_mul(r, x, y, ctx))
lib/libcrypto/bn/bn_recp.c
210
return BN_div_reciprocal(NULL, r, r, recp, ctx);
lib/libcrypto/bn/bn_recp.c
215
BN_mod_sqr_reciprocal(BIGNUM *r, const BIGNUM *x, BN_RECP_CTX *recp, BN_CTX *ctx)
lib/libcrypto/bn/bn_recp.c
217
if (!BN_sqr(r, x, ctx))
lib/libcrypto/bn/bn_recp.c
220
return BN_div_reciprocal(NULL, r, r, recp, ctx);
lib/libcrypto/bn/bn_sqr.c
299
bn_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
lib/libcrypto/bn/bn_sqr.c
307
BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
lib/libcrypto/bn/bn_sqr.c
313
BN_CTX_start(ctx);
lib/libcrypto/bn/bn_sqr.c
321
rr = BN_CTX_get(ctx);
lib/libcrypto/bn/bn_sqr.c
337
if (!bn_sqr(rr, a, ctx))
lib/libcrypto/bn/bn_sqr.c
351
BN_CTX_end(ctx);
lib/libcrypto/chacha/chacha.c
25
ChaCha_set_key(ChaCha_ctx *ctx, const unsigned char *key, uint32_t keybits)
lib/libcrypto/chacha/chacha.c
27
chacha_keysetup((chacha_ctx *)ctx, key, keybits);
lib/libcrypto/chacha/chacha.c
28
ctx->unused = 0;
lib/libcrypto/chacha/chacha.c
33
ChaCha_set_iv(ChaCha_ctx *ctx, const unsigned char *iv,
lib/libcrypto/chacha/chacha.c
36
chacha_ivsetup((chacha_ctx *)ctx, iv, counter);
lib/libcrypto/chacha/chacha.c
37
ctx->unused = 0;
lib/libcrypto/chacha/chacha.c
42
ChaCha(ChaCha_ctx *ctx, unsigned char *out, const unsigned char *in, size_t len)
lib/libcrypto/chacha/chacha.c
49
if (ctx->unused > 0) {
lib/libcrypto/chacha/chacha.c
50
k = ctx->ks + 64 - ctx->unused;
lib/libcrypto/chacha/chacha.c
51
l = (len > ctx->unused) ? ctx->unused : len;
lib/libcrypto/chacha/chacha.c
54
ctx->unused -= l;
lib/libcrypto/chacha/chacha.c
62
chacha_encrypt_bytes((chacha_ctx *)ctx, in, out, (uint32_t)n);
lib/libcrypto/chacha/chacha.c
75
struct chacha_ctx ctx;
lib/libcrypto/chacha/chacha.c
83
chacha_keysetup(&ctx, key, 256);
lib/libcrypto/chacha/chacha.c
84
chacha_ivsetup(&ctx, iv, NULL);
lib/libcrypto/chacha/chacha.c
86
ctx.input[12] = (uint32_t)counter;
lib/libcrypto/chacha/chacha.c
87
ctx.input[13] = (uint32_t)(counter >> 32);
lib/libcrypto/chacha/chacha.c
94
chacha_encrypt_bytes(&ctx, in, out, (uint32_t)n);
lib/libcrypto/chacha/chacha.h
36
void ChaCha_set_key(ChaCha_ctx *ctx, const unsigned char *key,
lib/libcrypto/chacha/chacha.h
38
void ChaCha_set_iv(ChaCha_ctx *ctx, const unsigned char *iv,
lib/libcrypto/chacha/chacha.h
40
void ChaCha(ChaCha_ctx *ctx, unsigned char *out, const unsigned char *in,
lib/libcrypto/cmac/cm_pmeth.c
100
if (!CMAC_CTX_copy(cmkey, ctx->data))
lib/libcrypto/cmac/cm_pmeth.c
115
int_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/cmac/cm_pmeth.c
117
if (!CMAC_Update(ctx->pctx->data, data, count))
lib/libcrypto/cmac/cm_pmeth.c
123
cmac_signctx_init(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx)
lib/libcrypto/cmac/cm_pmeth.c
131
cmac_signctx(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
lib/libcrypto/cmac/cm_pmeth.c
134
return CMAC_Final(ctx->data, sig, siglen);
lib/libcrypto/cmac/cm_pmeth.c
138
pkey_cmac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
lib/libcrypto/cmac/cm_pmeth.c
140
CMAC_CTX *cmctx = ctx->data;
lib/libcrypto/cmac/cm_pmeth.c
156
if (ctx->pkey && !CMAC_CTX_copy(ctx->data, ctx->pkey->pkey.ptr))
lib/libcrypto/cmac/cm_pmeth.c
169
pkey_cmac_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
lib/libcrypto/cmac/cm_pmeth.c
175
return pkey_cmac_ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY,
lib/libcrypto/cmac/cm_pmeth.c
184
return pkey_cmac_ctrl(ctx, EVP_PKEY_CTRL_CIPHER, -1, (void *)c);
lib/libcrypto/cmac/cm_pmeth.c
194
r = pkey_cmac_ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY, keylen, key);
lib/libcrypto/cmac/cm_pmeth.c
67
pkey_cmac_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/cmac/cm_pmeth.c
69
ctx->data = CMAC_CTX_new();
lib/libcrypto/cmac/cm_pmeth.c
70
if (!ctx->data)
lib/libcrypto/cmac/cm_pmeth.c
72
ctx->keygen_info_count = 0;
lib/libcrypto/cmac/cm_pmeth.c
87
pkey_cmac_cleanup(EVP_PKEY_CTX *ctx)
lib/libcrypto/cmac/cm_pmeth.c
89
CMAC_CTX_free(ctx->data);
lib/libcrypto/cmac/cm_pmeth.c
93
pkey_cmac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
lib/libcrypto/cmac/cmac.c
113
CMAC_CTX *ctx;
lib/libcrypto/cmac/cmac.c
115
if ((ctx = calloc(1, sizeof(CMAC_CTX))) == NULL)
lib/libcrypto/cmac/cmac.c
117
if ((ctx->cipher_ctx = EVP_CIPHER_CTX_new()) == NULL)
lib/libcrypto/cmac/cmac.c
120
ctx->nlast_block = -1;
lib/libcrypto/cmac/cmac.c
122
return ctx;
lib/libcrypto/cmac/cmac.c
125
CMAC_CTX_free(ctx);
lib/libcrypto/cmac/cmac.c
132
CMAC_CTX_cleanup(CMAC_CTX *ctx)
lib/libcrypto/cmac/cmac.c
134
(void)EVP_CIPHER_CTX_reset(ctx->cipher_ctx);
lib/libcrypto/cmac/cmac.c
135
explicit_bzero(ctx->tbl, EVP_MAX_BLOCK_LENGTH);
lib/libcrypto/cmac/cmac.c
136
explicit_bzero(ctx->k1, EVP_MAX_BLOCK_LENGTH);
lib/libcrypto/cmac/cmac.c
137
explicit_bzero(ctx->k2, EVP_MAX_BLOCK_LENGTH);
lib/libcrypto/cmac/cmac.c
138
explicit_bzero(ctx->last_block, EVP_MAX_BLOCK_LENGTH);
lib/libcrypto/cmac/cmac.c
139
ctx->nlast_block = -1;
lib/libcrypto/cmac/cmac.c
144
CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx)
lib/libcrypto/cmac/cmac.c
146
return ctx->cipher_ctx;
lib/libcrypto/cmac/cmac.c
151
CMAC_CTX_free(CMAC_CTX *ctx)
lib/libcrypto/cmac/cmac.c
153
if (ctx == NULL)
lib/libcrypto/cmac/cmac.c
156
CMAC_CTX_cleanup(ctx);
lib/libcrypto/cmac/cmac.c
157
EVP_CIPHER_CTX_free(ctx->cipher_ctx);
lib/libcrypto/cmac/cmac.c
158
freezero(ctx, sizeof(CMAC_CTX));
lib/libcrypto/cmac/cmac.c
182
CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
lib/libcrypto/cmac/cmac.c
191
if (ctx->nlast_block == -1)
lib/libcrypto/cmac/cmac.c
193
if (!EVP_EncryptInit_ex(ctx->cipher_ctx, NULL, NULL, NULL, zero_iv))
lib/libcrypto/cmac/cmac.c
195
explicit_bzero(ctx->tbl, sizeof(ctx->tbl));
lib/libcrypto/cmac/cmac.c
196
ctx->nlast_block = 0;
lib/libcrypto/cmac/cmac.c
209
if (!EVP_EncryptInit_ex(ctx->cipher_ctx, cipher, NULL, NULL, NULL))
lib/libcrypto/cmac/cmac.c
215
if (EVP_CIPHER_CTX_cipher(ctx->cipher_ctx) == NULL)
lib/libcrypto/cmac/cmac.c
219
block_size = EVP_CIPHER_CTX_block_size(ctx->cipher_ctx);
lib/libcrypto/cmac/cmac.c
227
if (!EVP_CIPHER_CTX_set_key_length(ctx->cipher_ctx, keylen))
lib/libcrypto/cmac/cmac.c
229
if (!EVP_EncryptInit_ex(ctx->cipher_ctx, NULL, NULL, key, zero_iv))
lib/libcrypto/cmac/cmac.c
231
if (!EVP_Cipher(ctx->cipher_ctx, ctx->tbl, zero_iv, block_size))
lib/libcrypto/cmac/cmac.c
235
make_kn(ctx->k1, ctx->tbl, block_size);
lib/libcrypto/cmac/cmac.c
237
make_kn(ctx->k2, ctx->k1, block_size);
lib/libcrypto/cmac/cmac.c
240
explicit_bzero(ctx->tbl, sizeof(ctx->tbl));
lib/libcrypto/cmac/cmac.c
241
ctx->nlast_block = 0;
lib/libcrypto/cmac/cmac.c
244
if (!EVP_EncryptInit_ex(ctx->cipher_ctx, NULL, NULL, NULL, zero_iv))
lib/libcrypto/cmac/cmac.c
253
CMAC_Update(CMAC_CTX *ctx, const void *in, size_t dlen)
lib/libcrypto/cmac/cmac.c
258
if (ctx->nlast_block == -1)
lib/libcrypto/cmac/cmac.c
262
block_size = EVP_CIPHER_CTX_block_size(ctx->cipher_ctx);
lib/libcrypto/cmac/cmac.c
264
if (ctx->nlast_block > 0) {
lib/libcrypto/cmac/cmac.c
267
nleft = block_size - ctx->nlast_block;
lib/libcrypto/cmac/cmac.c
270
memcpy(ctx->last_block + ctx->nlast_block, data, nleft);
lib/libcrypto/cmac/cmac.c
272
ctx->nlast_block += nleft;
lib/libcrypto/cmac/cmac.c
278
if (!EVP_Cipher(ctx->cipher_ctx, ctx->tbl, ctx->last_block,
lib/libcrypto/cmac/cmac.c
284
if (!EVP_Cipher(ctx->cipher_ctx, ctx->tbl, data, block_size))
lib/libcrypto/cmac/cmac.c
290
memcpy(ctx->last_block, data, dlen);
lib/libcrypto/cmac/cmac.c
291
ctx->nlast_block = dlen;
lib/libcrypto/cmac/cmac.c
297
CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen)
lib/libcrypto/cmac/cmac.c
301
if (ctx->nlast_block == -1)
lib/libcrypto/cmac/cmac.c
303
block_size = EVP_CIPHER_CTX_block_size(ctx->cipher_ctx);
lib/libcrypto/cmac/cmac.c
307
lb = ctx->nlast_block;
lib/libcrypto/cmac/cmac.c
311
out[i] = ctx->last_block[i] ^ ctx->k1[i];
lib/libcrypto/cmac/cmac.c
313
ctx->last_block[lb] = 0x80;
lib/libcrypto/cmac/cmac.c
315
memset(ctx->last_block + lb + 1, 0, block_size - lb - 1);
lib/libcrypto/cmac/cmac.c
317
out[i] = ctx->last_block[i] ^ ctx->k2[i];
lib/libcrypto/cmac/cmac.c
319
if (!EVP_Cipher(ctx->cipher_ctx, out, out, block_size)) {
lib/libcrypto/cmac/cmac.h
68
void CMAC_CTX_cleanup(CMAC_CTX *ctx);
lib/libcrypto/cmac/cmac.h
69
void CMAC_CTX_free(CMAC_CTX *ctx);
lib/libcrypto/cmac/cmac.h
70
EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx);
lib/libcrypto/cmac/cmac.h
73
int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen,
lib/libcrypto/cmac/cmac.h
75
int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen);
lib/libcrypto/cmac/cmac.h
76
int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen);
lib/libcrypto/cms/cms_asn1.c
716
kari->ctx = EVP_CIPHER_CTX_new();
lib/libcrypto/cms/cms_asn1.c
717
if (kari->ctx == NULL)
lib/libcrypto/cms/cms_asn1.c
719
EVP_CIPHER_CTX_set_flags(kari->ctx, EVP_CIPHER_CTX_FLAG_WRAP_ALLOW);
lib/libcrypto/cms/cms_asn1.c
723
EVP_CIPHER_CTX_free(kari->ctx);
lib/libcrypto/cms/cms_enc.c
114
if (EVP_CipherInit_ex(ctx, ciph, NULL, NULL, NULL, enc) <= 0) {
lib/libcrypto/cms/cms_enc.c
121
calg->algorithm = OBJ_nid2obj(EVP_CIPHER_CTX_type(ctx));
lib/libcrypto/cms/cms_enc.c
123
ivlen = EVP_CIPHER_CTX_iv_length(ctx);
lib/libcrypto/cms/cms_enc.c
128
} else if (EVP_CIPHER_asn1_to_param(ctx, calg->parameter) <= 0) {
lib/libcrypto/cms/cms_enc.c
132
tkeylen = EVP_CIPHER_CTX_key_length(ctx);
lib/libcrypto/cms/cms_enc.c
140
if (EVP_CIPHER_CTX_rand_key(ctx, tkey) <= 0)
lib/libcrypto/cms/cms_enc.c
157
if (!EVP_CIPHER_CTX_set_key_length(ctx, ec->keylen)) {
lib/libcrypto/cms/cms_enc.c
176
if (EVP_CipherInit_ex(ctx, NULL, NULL, ec->key, piv, enc) <= 0) {
lib/libcrypto/cms/cms_enc.c
186
if (EVP_CIPHER_param_to_asn1(ctx, calg->parameter) <= 0) {
lib/libcrypto/cms/cms_enc.c
77
EVP_CIPHER_CTX *ctx;
lib/libcrypto/cms/cms_enc.c
96
BIO_get_cipher_ctx(b, &ctx);
lib/libcrypto/cms/cms_kari.c
234
return ri->d.kari->ctx;
lib/libcrypto/cms/cms_kari.c
255
keklen = EVP_CIPHER_CTX_key_length(kari->ctx);
lib/libcrypto/cms/cms_kari.c
262
if (!EVP_CipherInit_ex(kari->ctx, NULL, NULL, kek, NULL, enc))
lib/libcrypto/cms/cms_kari.c
265
if (!EVP_CipherUpdate(kari->ctx, NULL, &outlen, in, inlen))
lib/libcrypto/cms/cms_kari.c
270
if (!EVP_CipherUpdate(kari->ctx, out, &outlen, in, inlen))
lib/libcrypto/cms/cms_kari.c
280
(void)EVP_CIPHER_CTX_reset(kari->ctx);
lib/libcrypto/cms/cms_kari.c
404
EVP_CIPHER_CTX *ctx = kari->ctx;
lib/libcrypto/cms/cms_kari.c
409
kekcipher = EVP_CIPHER_CTX_cipher(ctx);
lib/libcrypto/cms/cms_kari.c
412
if (EVP_CIPHER_CTX_mode(ctx) != EVP_CIPH_WRAP_MODE)
lib/libcrypto/cms/cms_kari.c
438
return EVP_EncryptInit_ex(ctx, kekcipher, NULL, NULL, NULL);
lib/libcrypto/cms/cms_local.h
213
EVP_CIPHER_CTX *ctx;
lib/libcrypto/cms/cms_pwri.c
100
EVP_CIPHER_CTX *ctx = NULL;
lib/libcrypto/cms/cms_pwri.c
134
if ((ctx = EVP_CIPHER_CTX_new()) == NULL)
lib/libcrypto/cms/cms_pwri.c
137
if (EVP_EncryptInit_ex(ctx, kekciph, NULL, NULL, NULL) <= 0) {
lib/libcrypto/cms/cms_pwri.c
142
ivlen = EVP_CIPHER_CTX_iv_length(ctx);
lib/libcrypto/cms/cms_pwri.c
146
if (EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, iv) <= 0) {
lib/libcrypto/cms/cms_pwri.c
155
if (EVP_CIPHER_param_to_asn1(ctx, encalg->parameter) <= 0) {
lib/libcrypto/cms/cms_pwri.c
161
encalg->algorithm = OBJ_nid2obj(EVP_CIPHER_CTX_type(ctx));
lib/libcrypto/cms/cms_pwri.c
163
EVP_CIPHER_CTX_free(ctx);
lib/libcrypto/cms/cms_pwri.c
164
ctx = NULL;
lib/libcrypto/cms/cms_pwri.c
213
EVP_CIPHER_CTX_free(ctx);
lib/libcrypto/cms/cms_pwri.c
229
size_t inlen, EVP_CIPHER_CTX *ctx)
lib/libcrypto/cms/cms_pwri.c
231
size_t blocklen = EVP_CIPHER_CTX_block_size(ctx);
lib/libcrypto/cms/cms_pwri.c
249
if (!EVP_DecryptUpdate(ctx, tmp + inlen - 2 * blocklen, &outl,
lib/libcrypto/cms/cms_pwri.c
256
|| !EVP_DecryptUpdate(ctx, tmp, &outl, tmp + inlen - blocklen, blocklen)
lib/libcrypto/cms/cms_pwri.c
258
|| !EVP_DecryptUpdate(ctx, tmp, &outl, in, inlen - blocklen)
lib/libcrypto/cms/cms_pwri.c
261
|| !EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, NULL)
lib/libcrypto/cms/cms_pwri.c
263
|| !EVP_DecryptUpdate(ctx, tmp, &outl, tmp, inlen))
lib/libcrypto/cms/cms_pwri.c
286
size_t inlen, EVP_CIPHER_CTX *ctx)
lib/libcrypto/cms/cms_pwri.c
288
size_t blocklen = EVP_CIPHER_CTX_block_size(ctx);
lib/libcrypto/cms/cms_pwri.c
317
if (!EVP_EncryptUpdate(ctx, out, &dummy, out, olen) ||
lib/libcrypto/cms/cms_pwri.c
318
!EVP_EncryptUpdate(ctx, out, &dummy, out, olen))
lib/libcrypto/cms/cms_smime.c
316
X509_STORE_CTX *ctx = X509_STORE_CTX_new();
lib/libcrypto/cms/cms_smime.c
320
if (ctx == NULL) {
lib/libcrypto/cms/cms_smime.c
325
if (!X509_STORE_CTX_init(ctx, store, signer, certs)) {
lib/libcrypto/cms/cms_smime.c
329
X509_STORE_CTX_set_default(ctx, "smime_sign");
lib/libcrypto/cms/cms_smime.c
331
X509_STORE_CTX_set0_crls(ctx, crls);
lib/libcrypto/cms/cms_smime.c
333
i = X509_verify_cert(ctx);
lib/libcrypto/cms/cms_smime.c
335
j = X509_STORE_CTX_get_error(ctx);
lib/libcrypto/cms/cms_smime.c
344
X509_STORE_CTX_free(ctx);
lib/libcrypto/ct/ct.h
116
void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx);
lib/libcrypto/ct/ct.h
119
X509 *CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx);
lib/libcrypto/ct/ct.h
126
int CT_POLICY_EVAL_CTX_set1_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert);
lib/libcrypto/ct/ct.h
129
X509 *CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx);
lib/libcrypto/ct/ct.h
136
int CT_POLICY_EVAL_CTX_set1_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer);
lib/libcrypto/ct/ct.h
139
const CTLOG_STORE *CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *ctx);
lib/libcrypto/ct/ct.h
142
void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx,
lib/libcrypto/ct/ct.h
150
uint64_t CT_POLICY_EVAL_CTX_get_time(const CT_POLICY_EVAL_CTX *ctx);
lib/libcrypto/ct/ct.h
158
void CT_POLICY_EVAL_CTX_set_time(CT_POLICY_EVAL_CTX *ctx, uint64_t time_in_ms);
lib/libcrypto/ct/ct.h
346
int SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx);
lib/libcrypto/ct/ct.h
356
CT_POLICY_EVAL_CTX *ctx);
lib/libcrypto/ct/ct_log.c
111
static void ctlog_store_load_ctx_free(CTLOG_STORE_LOAD_CTX *ctx);
lib/libcrypto/ct/ct_log.c
116
CTLOG_STORE_LOAD_CTX *ctx = calloc(1, sizeof(*ctx));
lib/libcrypto/ct/ct_log.c
118
if (ctx == NULL)
lib/libcrypto/ct/ct_log.c
121
return ctx;
lib/libcrypto/ct/ct_log.c
125
ctlog_store_load_ctx_free(CTLOG_STORE_LOAD_CTX *ctx)
lib/libcrypto/ct/ct_log.c
127
free(ctx);
lib/libcrypto/ct/ct_policy.c
104
CT_POLICY_EVAL_CTX_set1_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert)
lib/libcrypto/ct/ct_policy.c
108
ctx->cert = cert;
lib/libcrypto/ct/ct_policy.c
114
CT_POLICY_EVAL_CTX_set1_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer)
lib/libcrypto/ct/ct_policy.c
118
ctx->issuer = issuer;
lib/libcrypto/ct/ct_policy.c
124
CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx,
lib/libcrypto/ct/ct_policy.c
127
ctx->log_store = log_store;
lib/libcrypto/ct/ct_policy.c
132
CT_POLICY_EVAL_CTX_set_time(CT_POLICY_EVAL_CTX *ctx, uint64_t time_in_ms)
lib/libcrypto/ct/ct_policy.c
134
ctx->epoch_time_in_ms = time_in_ms;
lib/libcrypto/ct/ct_policy.c
139
CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx)
lib/libcrypto/ct/ct_policy.c
141
return ctx->cert;
lib/libcrypto/ct/ct_policy.c
146
CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx)
lib/libcrypto/ct/ct_policy.c
148
return ctx->issuer;
lib/libcrypto/ct/ct_policy.c
153
CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *ctx)
lib/libcrypto/ct/ct_policy.c
155
return ctx->log_store;
lib/libcrypto/ct/ct_policy.c
160
CT_POLICY_EVAL_CTX_get_time(const CT_POLICY_EVAL_CTX *ctx)
lib/libcrypto/ct/ct_policy.c
162
return ctx->epoch_time_in_ms;
lib/libcrypto/ct/ct_policy.c
77
CT_POLICY_EVAL_CTX *ctx = calloc(1, sizeof(CT_POLICY_EVAL_CTX));
lib/libcrypto/ct/ct_policy.c
79
if (ctx == NULL) {
lib/libcrypto/ct/ct_policy.c
85
ctx->epoch_time_in_ms = (uint64_t)(time(NULL) + SCT_CLOCK_DRIFT_TOLERANCE) *
lib/libcrypto/ct/ct_policy.c
88
return ctx;
lib/libcrypto/ct/ct_policy.c
93
CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx)
lib/libcrypto/ct/ct_policy.c
95
if (ctx == NULL)
lib/libcrypto/ct/ct_policy.c
97
X509_free(ctx->cert);
lib/libcrypto/ct/ct_policy.c
98
X509_free(ctx->issuer);
lib/libcrypto/ct/ct_policy.c
99
free(ctx);
lib/libcrypto/ct/ct_sct.c
397
SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx)
lib/libcrypto/ct/ct_sct.c
413
log = CTLOG_STORE_get0_log_by_id(ctx->log_store, sct->log_id,
lib/libcrypto/ct/ct_sct.c
434
if (ctx->issuer == NULL) {
lib/libcrypto/ct/ct_sct.c
439
if ((issuer_pkey = X509_get0_pubkey(ctx->issuer)) == NULL)
lib/libcrypto/ct/ct_sct.c
448
SCT_CTX_set_time(sctx, ctx->epoch_time_in_ms);
lib/libcrypto/ct/ct_sct.c
468
if (SCT_CTX_set1_cert(sctx, ctx->cert, NULL) != 1)
lib/libcrypto/ct/ct_sct.c
486
SCT_LIST_validate(const STACK_OF(SCT) *scts, CT_POLICY_EVAL_CTX *ctx)
lib/libcrypto/ct/ct_sct.c
499
is_sct_valid = SCT_validate(sct, ctx);
lib/libcrypto/ct/ct_vfy.c
138
if (!EVP_DigestUpdate(ctx, data, data_len))
lib/libcrypto/ct/ct_vfy.c
153
EVP_MD_CTX *ctx = NULL;
lib/libcrypto/ct/ct_vfy.c
177
if ((ctx = EVP_MD_CTX_new()) == NULL)
lib/libcrypto/ct/ct_vfy.c
180
if (!EVP_DigestVerifyInit(ctx, NULL, EVP_sha256(), NULL, sctx->pkey))
lib/libcrypto/ct/ct_vfy.c
183
if (!sct_ctx_update(ctx, sctx, sct))
lib/libcrypto/ct/ct_vfy.c
188
if ((ret = EVP_DigestVerifyFinal(ctx, sct->sig, sct->sig_len)) == 0)
lib/libcrypto/ct/ct_vfy.c
192
EVP_MD_CTX_free(ctx);
lib/libcrypto/ct/ct_vfy.c
80
sct_ctx_update(EVP_MD_CTX *ctx, const SCT_CTX *sctx, const SCT *sct)
lib/libcrypto/ct/ct_x509v3.c
75
s2i_poison(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx, const char *str)
lib/libcrypto/dh/dh.h
182
#define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \
lib/libcrypto/dh/dh.h
183
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
lib/libcrypto/dh/dh.h
186
#define EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, gen) \
lib/libcrypto/dh/dh.h
187
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \
lib/libcrypto/dh/dh_ameth.c
331
do_dh_print(BIO *bp, const DH *x, int indent, ASN1_PCTX *ctx, int ptype)
lib/libcrypto/dh/dh_ameth.c
456
dh_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/dh/dh_ameth.c
458
return do_dh_print(bp, pkey->pkey.dh, indent, ctx, 0);
lib/libcrypto/dh/dh_ameth.c
462
dh_public_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/dh/dh_ameth.c
464
return do_dh_print(bp, pkey->pkey.dh, indent, ctx, 1);
lib/libcrypto/dh/dh_ameth.c
468
dh_private_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/dh/dh_ameth.c
470
return do_dh_print(bp, pkey->pkey.dh, indent, ctx, 2);
lib/libcrypto/dh/dh_check.c
133
dh_is_well_known_p(const BIGNUM *p, BN_CTX *ctx, int *is_well_known)
lib/libcrypto/dh/dh_check.c
141
BN_CTX_start(ctx);
lib/libcrypto/dh/dh_check.c
142
if ((bn = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dh/dh_check.c
159
BN_CTX_end(ctx);
lib/libcrypto/dh/dh_check.c
171
BN_CTX *ctx = NULL;
lib/libcrypto/dh/dh_check.c
180
ctx = BN_CTX_new();
lib/libcrypto/dh/dh_check.c
181
if (ctx == NULL)
lib/libcrypto/dh/dh_check.c
183
BN_CTX_start(ctx);
lib/libcrypto/dh/dh_check.c
188
if ((residue = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dh/dh_check.c
192
if (!BN_mod_exp_ct(residue, dh->g, dh->q, dh->p, ctx))
lib/libcrypto/dh/dh_check.c
198
ctx, NULL);
lib/libcrypto/dh/dh_check.c
204
if (!BN_div_ct(NULL, residue, dh->p, dh->q, ctx))
lib/libcrypto/dh/dh_check.c
210
if (!dh_is_well_known_p(dh->p, ctx, &is_well_known))
lib/libcrypto/dh/dh_check.c
216
ctx, NULL);
lib/libcrypto/dh/dh_check.c
224
if ((q = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dh/dh_check.c
229
ctx, NULL);
lib/libcrypto/dh/dh_check.c
240
BN_CTX_end(ctx);
lib/libcrypto/dh/dh_check.c
241
BN_CTX_free(ctx);
lib/libcrypto/dh/dh_check.c
249
BN_CTX *ctx = NULL;
lib/libcrypto/dh/dh_check.c
255
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/dh/dh_check.c
257
BN_CTX_start(ctx);
lib/libcrypto/dh/dh_check.c
258
if ((max_pub_key = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dh/dh_check.c
282
if ((residue = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dh/dh_check.c
285
if (!BN_mod_exp_ct(residue, pub_key, dh->q, dh->p, ctx))
lib/libcrypto/dh/dh_check.c
294
BN_CTX_end(ctx);
lib/libcrypto/dh/dh_check.c
295
BN_CTX_free(ctx);
lib/libcrypto/dh/dh_gen.c
111
BN_CTX *ctx = NULL;
lib/libcrypto/dh/dh_gen.c
113
ctx = BN_CTX_new();
lib/libcrypto/dh/dh_gen.c
114
if (ctx == NULL)
lib/libcrypto/dh/dh_gen.c
116
BN_CTX_start(ctx);
lib/libcrypto/dh/dh_gen.c
117
if ((t1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dh/dh_gen.c
119
if ((t2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dh/dh_gen.c
173
if (ctx != NULL) {
lib/libcrypto/dh/dh_gen.c
174
BN_CTX_end(ctx);
lib/libcrypto/dh/dh_gen.c
175
BN_CTX_free(ctx);
lib/libcrypto/dh/dh_key.c
115
if (!dh->meth->bn_mod_exp(dh, pub_key, dh->g, priv_key, dh->p, ctx,
lib/libcrypto/dh/dh_key.c
130
BN_CTX_free(ctx);
lib/libcrypto/dh/dh_key.c
138
BN_CTX *ctx = NULL;
lib/libcrypto/dh/dh_key.c
149
ctx = BN_CTX_new();
lib/libcrypto/dh/dh_key.c
150
if (ctx == NULL)
lib/libcrypto/dh/dh_key.c
152
BN_CTX_start(ctx);
lib/libcrypto/dh/dh_key.c
153
if ((tmp = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dh/dh_key.c
163
CRYPTO_LOCK_DH, dh->p, ctx);
lib/libcrypto/dh/dh_key.c
176
if (!dh->meth->bn_mod_exp(dh, tmp, pub_key, dh->priv_key, dh->p, ctx,
lib/libcrypto/dh/dh_key.c
184
if (ctx != NULL) {
lib/libcrypto/dh/dh_key.c
185
BN_CTX_end(ctx);
lib/libcrypto/dh/dh_key.c
186
BN_CTX_free(ctx);
lib/libcrypto/dh/dh_key.c
193
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)
lib/libcrypto/dh/dh_key.c
195
return BN_mod_exp_mont_ct(r, a, p, m, ctx, m_ctx);
lib/libcrypto/dh/dh_key.c
73
BN_CTX *ctx;
lib/libcrypto/dh/dh_key.c
82
ctx = BN_CTX_new();
lib/libcrypto/dh/dh_key.c
83
if (ctx == NULL)
lib/libcrypto/dh/dh_key.c
98
CRYPTO_LOCK_DH, dh->p, ctx);
lib/libcrypto/dh/dh_local.h
70
const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
lib/libcrypto/dh/dh_pmeth.c
100
ctx->keygen_info = dctx->gentmp;
lib/libcrypto/dh/dh_pmeth.c
101
ctx->keygen_info_count = 2;
lib/libcrypto/dh/dh_pmeth.c
122
pkey_dh_cleanup(EVP_PKEY_CTX *ctx)
lib/libcrypto/dh/dh_pmeth.c
124
DH_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/dh/dh_pmeth.c
130
pkey_dh_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
lib/libcrypto/dh/dh_pmeth.c
132
DH_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/dh/dh_pmeth.c
155
pkey_dh_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
lib/libcrypto/dh/dh_pmeth.c
164
return EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len);
lib/libcrypto/dh/dh_pmeth.c
169
return EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, len);
lib/libcrypto/dh/dh_pmeth.c
176
pkey_dh_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
lib/libcrypto/dh/dh_pmeth.c
179
DH_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/dh/dh_pmeth.c
186
if (ctx->pkey_gencb != NULL) {
lib/libcrypto/dh/dh_pmeth.c
188
evp_pkey_set_cb_translate(pcb, ctx);
lib/libcrypto/dh/dh_pmeth.c
204
pkey_dh_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
lib/libcrypto/dh/dh_pmeth.c
209
if (ctx->pkey == NULL) {
lib/libcrypto/dh/dh_pmeth.c
219
if (!EVP_PKEY_copy_parameters(pkey, ctx->pkey))
lib/libcrypto/dh/dh_pmeth.c
233
pkey_dh_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen)
lib/libcrypto/dh/dh_pmeth.c
237
if (!ctx->pkey || !ctx->peerkey) {
lib/libcrypto/dh/dh_pmeth.c
241
ret = DH_compute_key(key, ctx->peerkey->pkey.dh->pub_key,
lib/libcrypto/dh/dh_pmeth.c
242
ctx->pkey->pkey.dh);
lib/libcrypto/dh/dh_pmeth.c
88
pkey_dh_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/dh/dh_pmeth.c
99
ctx->data = dctx;
lib/libcrypto/dsa/dsa.h
206
#define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \
lib/libcrypto/dsa/dsa.h
207
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \
lib/libcrypto/dsa/dsa_ameth.c
214
BN_CTX *ctx = NULL;
lib/libcrypto/dsa/dsa_ameth.c
258
if ((ctx = BN_CTX_new()) == NULL) {
lib/libcrypto/dsa/dsa_ameth.c
263
BN_CTX_start(ctx);
lib/libcrypto/dsa/dsa_ameth.c
265
if (!BN_mod_exp_ct(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx)) {
lib/libcrypto/dsa/dsa_ameth.c
278
BN_CTX_end(ctx);
lib/libcrypto/dsa/dsa_ameth.c
279
BN_CTX_free(ctx);
lib/libcrypto/dsa/dsa_ameth.c
493
dsa_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/dsa/dsa_ameth.c
499
dsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/dsa/dsa_ameth.c
505
dsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/dsa/dsa_ameth.c
514
BN_CTX *ctx = NULL;
lib/libcrypto/dsa/dsa_ameth.c
526
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/dsa/dsa_ameth.c
529
BN_CTX_start(ctx);
lib/libcrypto/dsa/dsa_ameth.c
531
if ((result = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ameth.c
541
if (!BN_mod_ct(result, result, dsa->q, ctx))
lib/libcrypto/dsa/dsa_ameth.c
554
if (!BN_mod_exp_ct(result, dsa->g, dsa->q, dsa->p, ctx))
lib/libcrypto/dsa/dsa_ameth.c
565
if (BN_is_prime_ex(dsa->q, BN_prime_checks, ctx, NULL) <= 0) {
lib/libcrypto/dsa/dsa_ameth.c
577
BN_CTX_end(ctx);
lib/libcrypto/dsa/dsa_ameth.c
578
BN_CTX_free(ctx);
lib/libcrypto/dsa/dsa_gen.c
117
BN_CTX *ctx = NULL;
lib/libcrypto/dsa/dsa_gen.c
149
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/dsa/dsa_gen.c
152
BN_CTX_start(ctx);
lib/libcrypto/dsa/dsa_gen.c
154
if ((r0 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_gen.c
156
if ((g = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_gen.c
158
if ((W = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_gen.c
160
if ((q = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_gen.c
162
if ((X = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_gen.c
164
if ((c = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_gen.c
166
if ((p = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_gen.c
168
if ((test = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_gen.c
215
r = BN_is_prime_fasttest_ex(q, DSA_prime_checks, ctx,
lib/libcrypto/dsa/dsa_gen.c
276
if (!BN_mod_ct(c, X, r0, ctx))
lib/libcrypto/dsa/dsa_gen.c
287
ctx, 1, cb);
lib/libcrypto/dsa/dsa_gen.c
311
if (!BN_div_ct(r0, NULL, test, q, ctx))
lib/libcrypto/dsa/dsa_gen.c
316
if ((mont = BN_MONT_CTX_create(p, ctx)) == NULL)
lib/libcrypto/dsa/dsa_gen.c
321
if (!BN_mod_exp_mont_ct(g, test, r0, p, ctx, mont))
lib/libcrypto/dsa/dsa_gen.c
353
BN_CTX_end(ctx);
lib/libcrypto/dsa/dsa_gen.c
354
BN_CTX_free(ctx);
lib/libcrypto/dsa/dsa_key.c
105
BN_CTX_free(ctx);
lib/libcrypto/dsa/dsa_key.c
76
BN_CTX *ctx = NULL;
lib/libcrypto/dsa/dsa_key.c
84
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/dsa/dsa_key.c
89
if (!BN_mod_exp_ct(pub_key, dsa->g, priv_key, dsa->p, ctx))
lib/libcrypto/dsa/dsa_ossl.c
101
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
104
BN_CTX_start(ctx);
lib/libcrypto/dsa/dsa_ossl.c
106
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
108
if ((binv = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
110
if ((bm = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
112
if ((bxr = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
114
if ((m = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
129
if (!DSA_sign_setup(dsa, ctx, &kinv, &r))
lib/libcrypto/dsa/dsa_ossl.c
153
if (BN_mod_inverse_ct(binv, b, dsa->q, ctx) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
156
if (!BN_mod_mul(bxr, b, dsa->priv_key, dsa->q, ctx)) /* bx */
lib/libcrypto/dsa/dsa_ossl.c
158
if (!BN_mod_mul(bxr, bxr, r, dsa->q, ctx)) /* bxr */
lib/libcrypto/dsa/dsa_ossl.c
160
if (!BN_mod_mul(bm, b, m, dsa->q, ctx)) /* bm */
lib/libcrypto/dsa/dsa_ossl.c
162
if (!BN_mod_add(s, bxr, bm, dsa->q, ctx)) /* s = bm + bxr */
lib/libcrypto/dsa/dsa_ossl.c
164
if (!BN_mod_mul(s, s, kinv, dsa->q, ctx)) /* s = b(m + xr)k^-1 */
lib/libcrypto/dsa/dsa_ossl.c
166
if (!BN_mod_mul(s, s, binv, dsa->q, ctx)) /* s = (m + xr)k^-1 */
lib/libcrypto/dsa/dsa_ossl.c
198
BN_CTX_end(ctx);
lib/libcrypto/dsa/dsa_ossl.c
199
BN_CTX_free(ctx);
lib/libcrypto/dsa/dsa_ossl.c
209
BN_CTX *ctx = NULL;
lib/libcrypto/dsa/dsa_ossl.c
219
if ((ctx = ctx_in) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
220
ctx = BN_CTX_new();
lib/libcrypto/dsa/dsa_ossl.c
221
if (ctx == NULL)
lib/libcrypto/dsa/dsa_ossl.c
224
BN_CTX_start(ctx);
lib/libcrypto/dsa/dsa_ossl.c
226
if ((k = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
228
if ((l = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
230
if ((m = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
247
CRYPTO_LOCK_DSA, dsa->p, ctx))
lib/libcrypto/dsa/dsa_ossl.c
271
if (!BN_mod_exp_mont_ct(r, dsa->g, k, dsa->p, ctx, dsa->method_mont_p))
lib/libcrypto/dsa/dsa_ossl.c
274
if (!BN_mod_ct(r, r, dsa->q, ctx))
lib/libcrypto/dsa/dsa_ossl.c
278
if ((kinv = BN_mod_inverse_ct(NULL, k, dsa->q, ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
295
BN_CTX_end(ctx);
lib/libcrypto/dsa/dsa_ossl.c
296
if (ctx != ctx_in)
lib/libcrypto/dsa/dsa_ossl.c
297
BN_CTX_free(ctx);
lib/libcrypto/dsa/dsa_ossl.c
306
BN_CTX *ctx = NULL;
lib/libcrypto/dsa/dsa_ossl.c
314
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
317
BN_CTX_start(ctx);
lib/libcrypto/dsa/dsa_ossl.c
319
if ((u1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
321
if ((u2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
323
if ((t1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
338
if ((BN_mod_inverse_ct(u2, sig->s, dsa->q, ctx)) == NULL)
lib/libcrypto/dsa/dsa_ossl.c
354
if (!BN_mod_mul(u1, u1, u2, dsa->q, ctx))
lib/libcrypto/dsa/dsa_ossl.c
358
if (!BN_mod_mul(u2, sig->r, u2, dsa->q, ctx))
lib/libcrypto/dsa/dsa_ossl.c
363
CRYPTO_LOCK_DSA, dsa->p, ctx);
lib/libcrypto/dsa/dsa_ossl.c
369
ctx, mont))
lib/libcrypto/dsa/dsa_ossl.c
373
if (!BN_mod_ct(u1, t1, dsa->q, ctx))
lib/libcrypto/dsa/dsa_ossl.c
382
BN_CTX_end(ctx);
lib/libcrypto/dsa/dsa_ossl.c
383
BN_CTX_free(ctx);
lib/libcrypto/dsa/dsa_ossl.c
87
BN_CTX *ctx = NULL;
lib/libcrypto/dsa/dsa_pmeth.c
100
ctx->data = dctx;
lib/libcrypto/dsa/dsa_pmeth.c
101
ctx->keygen_info = dctx->gentmp;
lib/libcrypto/dsa/dsa_pmeth.c
102
ctx->keygen_info_count = 2;
lib/libcrypto/dsa/dsa_pmeth.c
124
pkey_dsa_cleanup(EVP_PKEY_CTX *ctx)
lib/libcrypto/dsa/dsa_pmeth.c
126
DSA_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/dsa/dsa_pmeth.c
132
pkey_dsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *out_siglen,
lib/libcrypto/dsa/dsa_pmeth.c
135
DSA *dsa = ctx->pkey->pkey.dsa;
lib/libcrypto/dsa/dsa_pmeth.c
136
DSA_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/dsa/dsa_pmeth.c
158
pkey_dsa_verify(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen,
lib/libcrypto/dsa/dsa_pmeth.c
161
DSA *dsa = ctx->pkey->pkey.dsa;
lib/libcrypto/dsa/dsa_pmeth.c
162
DSA_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/dsa/dsa_pmeth.c
176
pkey_dsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
lib/libcrypto/dsa/dsa_pmeth.c
178
DSA_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/dsa/dsa_pmeth.c
246
pkey_dsa_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
lib/libcrypto/dsa/dsa_pmeth.c
256
return EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits);
lib/libcrypto/dsa/dsa_pmeth.c
263
return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA,
lib/libcrypto/dsa/dsa_pmeth.c
267
return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA,
lib/libcrypto/dsa/dsa_pmeth.c
276
pkey_dsa_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
lib/libcrypto/dsa/dsa_pmeth.c
279
DSA_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/dsa/dsa_pmeth.c
286
if (ctx->pkey_gencb != NULL) {
lib/libcrypto/dsa/dsa_pmeth.c
288
evp_pkey_set_cb_translate(pcb, ctx);
lib/libcrypto/dsa/dsa_pmeth.c
306
pkey_dsa_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
lib/libcrypto/dsa/dsa_pmeth.c
311
if (ctx->pkey == NULL) {
lib/libcrypto/dsa/dsa_pmeth.c
320
if (!EVP_PKEY_copy_parameters(pkey, ctx->pkey))
lib/libcrypto/dsa/dsa_pmeth.c
88
pkey_dsa_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/ec/ec.h
106
int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
108
int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
125
const BIGNUM *b, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
127
BN_CTX *ctx);
lib/libcrypto/ec/ec.h
130
const BIGNUM *b, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
132
BIGNUM *b, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
136
int EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
137
int EC_GROUP_check_discriminant(const EC_GROUP *group, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
140
int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
143
const BIGNUM *b, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
165
const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
167
BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
169
const BIGNUM *x, int y_bit, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
172
const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
174
const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
176
const BIGNUM *x, int y_bit, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
178
point_conversion_form_t form, unsigned char *buf, size_t len, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
180
const unsigned char *buf, size_t len, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
192
const EC_POINT *b, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
194
BN_CTX *ctx);
lib/libcrypto/ec/ec.h
195
int EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
198
BN_CTX *ctx);
lib/libcrypto/ec/ec.h
200
BN_CTX *ctx);
lib/libcrypto/ec/ec.h
202
int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
204
const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
256
int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
lib/libcrypto/ec/ec.h
370
#define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid) \
lib/libcrypto/ec/ec.h
371
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
375
#define EVP_PKEY_CTX_set_ec_param_enc(ctx, flag) \
lib/libcrypto/ec/ec.h
376
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
380
#define EVP_PKEY_CTX_set_ecdh_cofactor_mode(ctx, flag) \
lib/libcrypto/ec/ec.h
381
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
385
#define EVP_PKEY_CTX_get_ecdh_cofactor_mode(ctx) \
lib/libcrypto/ec/ec.h
386
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
390
#define EVP_PKEY_CTX_set_ecdh_kdf_type(ctx, kdf) \
lib/libcrypto/ec/ec.h
391
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
395
#define EVP_PKEY_CTX_get_ecdh_kdf_type(ctx) \
lib/libcrypto/ec/ec.h
396
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
400
#define EVP_PKEY_CTX_set_ecdh_kdf_md(ctx, md) \
lib/libcrypto/ec/ec.h
401
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
405
#define EVP_PKEY_CTX_get_ecdh_kdf_md(ctx, pmd) \
lib/libcrypto/ec/ec.h
406
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
410
#define EVP_PKEY_CTX_set_ecdh_kdf_outlen(ctx, len) \
lib/libcrypto/ec/ec.h
411
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
415
#define EVP_PKEY_CTX_get_ecdh_kdf_outlen(ctx, plen) \
lib/libcrypto/ec/ec.h
416
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
421
#define EVP_PKEY_CTX_set0_ecdh_kdf_ukm(ctx, p, plen) \
lib/libcrypto/ec/ec.h
422
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
426
#define EVP_PKEY_CTX_get0_ecdh_kdf_ukm(ctx, p) \
lib/libcrypto/ec/ec.h
427
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
lib/libcrypto/ec/ec.h
432
#define EVP_PKEY_CTX_set1_id(ctx, id, id_len) \
lib/libcrypto/ec/ec.h
433
EVP_PKEY_CTX_ctrl(ctx, -1, -1, \
lib/libcrypto/ec/ec.h
436
#define EVP_PKEY_CTX_get1_id(ctx, id) \
lib/libcrypto/ec/ec.h
437
EVP_PKEY_CTX_ctrl(ctx, -1, -1, \
lib/libcrypto/ec/ec.h
440
#define EVP_PKEY_CTX_get1_id_len(ctx, id_len) \
lib/libcrypto/ec/ec.h
441
EVP_PKEY_CTX_ctrl(ctx, -1, -1, \
lib/libcrypto/ec/ec_ameth.c
501
BN_CTX *ctx = NULL;
lib/libcrypto/ec/ec_ameth.c
510
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_ameth.c
511
if (ctx == NULL) {
lib/libcrypto/ec/ec_ameth.c
519
EC_KEY_get_conv_form(x), NULL, ctx)) == NULL) {
lib/libcrypto/ec/ec_ameth.c
556
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_ameth.c
588
eckey_param_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/ec/ec_ameth.c
594
eckey_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/ec/ec_ameth.c
601
eckey_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/ec/ec_ameth.c
902
EVP_CIPHER_CTX *ctx;
lib/libcrypto/ec/ec_ameth.c
972
ctx = CMS_RecipientInfo_kari_get0_ctx(ri);
lib/libcrypto/ec/ec_ameth.c
973
wrap_nid = EVP_CIPHER_CTX_type(ctx);
lib/libcrypto/ec/ec_ameth.c
974
keylen = EVP_CIPHER_CTX_key_length(ctx);
lib/libcrypto/ec/ec_ameth.c
989
if (EVP_CIPHER_param_to_asn1(ctx, wrap_alg->parameter) <= 0)
lib/libcrypto/ec/ec_convert.c
223
unsigned char *buf, size_t len, BN_CTX *ctx)
lib/libcrypto/ec/ec_convert.c
246
BN_CTX_start(ctx);
lib/libcrypto/ec/ec_convert.c
259
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_convert.c
261
if ((y = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_convert.c
263
if (!EC_POINT_get_affine_coordinates(group, point, x, y, ctx))
lib/libcrypto/ec/ec_convert.c
290
BN_CTX_end(ctx);
lib/libcrypto/ec/ec_convert.c
297
const unsigned char *buf, size_t len, BN_CTX *ctx)
lib/libcrypto/ec/ec_convert.c
305
BN_CTX_start(ctx);
lib/libcrypto/ec/ec_convert.c
318
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_convert.c
320
if ((y = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_convert.c
326
if (!EC_POINT_set_compressed_coordinates(group, point, x, ybit, ctx))
lib/libcrypto/ec/ec_convert.c
335
if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx))
lib/libcrypto/ec/ec_convert.c
348
BN_CTX_end(ctx);
lib/libcrypto/ec/ec_convert.c
355
unsigned char **out_buf, size_t *out_len, BN_CTX *ctx)
lib/libcrypto/ec/ec_convert.c
366
if ((len = EC_POINT_point2oct(group, point, form, NULL, 0, ctx)) == 0)
lib/libcrypto/ec/ec_convert.c
370
if (EC_POINT_point2oct(group, point, form, buf, len, ctx) != len)
lib/libcrypto/ec/ec_convert.c
388
EC_POINT **out_point, uint8_t *out_form, BN_CTX *ctx)
lib/libcrypto/ec/ec_convert.c
398
if (!EC_POINT_oct2point(group, point, buf, buf_len, ctx))
lib/libcrypto/ec/ec_convert.c
441
BN_CTX *ctx = NULL;
lib/libcrypto/ec/ec_convert.c
450
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_convert.c
451
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_convert.c
452
if (ctx == NULL)
lib/libcrypto/ec/ec_convert.c
459
ret = ec_point2oct(group, point, form, buf, len, ctx);
lib/libcrypto/ec/ec_convert.c
462
if (ctx != ctx_in)
lib/libcrypto/ec/ec_convert.c
463
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_convert.c
473
BN_CTX *ctx;
lib/libcrypto/ec/ec_convert.c
476
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_convert.c
477
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_convert.c
478
if (ctx == NULL)
lib/libcrypto/ec/ec_convert.c
485
ret = ec_oct2point(group, point, buf, len, ctx);
lib/libcrypto/ec/ec_convert.c
488
if (ctx != ctx_in)
lib/libcrypto/ec/ec_convert.c
489
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_convert.c
497
point_conversion_form_t form, BIGNUM *in_bn, BN_CTX *ctx)
lib/libcrypto/ec/ec_convert.c
503
if (!ec_point_to_octets(group, point, form, &buf, &buf_len, ctx))
lib/libcrypto/ec/ec_convert.c
517
const BIGNUM *bn, EC_POINT *point, BN_CTX *ctx)
lib/libcrypto/ec/ec_convert.c
529
if (!ec_point_from_octets(group, buf, buf_len, &point, NULL, ctx))
lib/libcrypto/ec/ec_convert.c
541
point_conversion_form_t form, BN_CTX *ctx)
lib/libcrypto/ec/ec_convert.c
546
if ((bn = EC_POINT_point2bn(group, point, form, NULL, ctx)) == NULL)
lib/libcrypto/ec/ec_convert.c
560
EC_POINT *in_point, BN_CTX *ctx)
lib/libcrypto/ec/ec_convert.c
567
if ((point = EC_POINT_bn2point(group, bn, in_point, ctx)) == NULL)
lib/libcrypto/ec/ec_curve.c
1172
BN_CTX *ctx = NULL;
lib/libcrypto/ec/ec_curve.c
1175
if ((ctx = BN_CTX_new()) == NULL) {
lib/libcrypto/ec/ec_curve.c
1179
BN_CTX_start(ctx);
lib/libcrypto/ec/ec_curve.c
1181
if ((p = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/ec/ec_curve.c
1185
if ((a = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/ec/ec_curve.c
1189
if ((b = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/ec/ec_curve.c
1193
if ((x = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/ec/ec_curve.c
1197
if ((y = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/ec/ec_curve.c
1201
if ((order = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/ec/ec_curve.c
1205
if ((cofactor = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/ec/ec_curve.c
1222
if ((group = EC_GROUP_new_curve_GFp(p, a, b, ctx)) == NULL) {
lib/libcrypto/ec/ec_curve.c
1240
if (!EC_POINT_set_affine_coordinates(group, generator, x, y, ctx)) {
lib/libcrypto/ec/ec_curve.c
1270
BN_CTX_end(ctx);
lib/libcrypto/ec/ec_curve.c
1271
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_curve.c
1342
BN_CTX *ctx;
lib/libcrypto/ec/ec_curve.c
1348
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/ec/ec_curve.c
1350
BN_CTX_start(ctx);
lib/libcrypto/ec/ec_curve.c
1352
if ((p = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_curve.c
1354
if ((a = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_curve.c
1356
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_curve.c
1358
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_curve.c
1360
if ((y = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_curve.c
1363
if (!EC_GROUP_get_curve(group, p, a, b, ctx))
lib/libcrypto/ec/ec_curve.c
1367
if (!EC_POINT_get_affine_coordinates(group, generator, x, y, ctx))
lib/libcrypto/ec/ec_curve.c
1416
BN_CTX_end(ctx);
lib/libcrypto/ec/ec_curve.c
1417
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_curve.c
1422
BN_CTX_end(ctx);
lib/libcrypto/ec/ec_curve.c
1423
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_field.c
101
BN_CTX_end(ctx);
lib/libcrypto/ec/ec_field.c
108
BIGNUM *bn, BN_CTX *ctx)
lib/libcrypto/ec/ec_field.c
28
ec_field_modulus_from_bn(EC_FIELD_MODULUS *fm, const BIGNUM *bn, BN_CTX *ctx)
lib/libcrypto/ec/ec_field.c
49
if (!BN_MONT_CTX_set(mctx, bn, ctx))
lib/libcrypto/ec/ec_field.c
67
EC_FIELD_ELEMENT *fe, const BIGNUM *bn, BN_CTX *ctx)
lib/libcrypto/ec/ec_field.c
74
BN_CTX_start(ctx);
lib/libcrypto/ec/ec_field.c
76
if ((tmp = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_field.c
85
if (!BN_nnmod(tmp, bn, group->p, ctx))
lib/libcrypto/ec/ec_internal.h
41
BN_CTX *ctx);
lib/libcrypto/ec/ec_internal.h
44
EC_FIELD_ELEMENT *fe, const BIGNUM *bn, BN_CTX *ctx);
lib/libcrypto/ec/ec_internal.h
46
BIGNUM *bn, BN_CTX *ctx);
lib/libcrypto/ec/ec_key.c
282
BN_CTX *ctx = NULL;
lib/libcrypto/ec/ec_key.c
297
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/ec/ec_key.c
304
if (EC_POINT_is_on_curve(eckey->group, eckey->pub_key, ctx) <= 0) {
lib/libcrypto/ec/ec_key.c
314
if (!EC_POINT_mul(eckey->group, point, NULL, eckey->pub_key, order, ctx)) {
lib/libcrypto/ec/ec_key.c
333
NULL, ctx)) {
lib/libcrypto/ec/ec_key.c
338
ctx) != 0) {
lib/libcrypto/ec/ec_key.c
347
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_key.c
357
BN_CTX *ctx = NULL;
lib/libcrypto/ec/ec_key.c
367
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/ec/ec_key.c
370
BN_CTX_start(ctx);
lib/libcrypto/ec/ec_key.c
372
if ((tx = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_key.c
374
if ((ty = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_key.c
380
if (!EC_POINT_set_affine_coordinates(key->group, point, x, y, ctx))
lib/libcrypto/ec/ec_key.c
382
if (!EC_POINT_get_affine_coordinates(key->group, point, tx, ty, ctx))
lib/libcrypto/ec/ec_key.c
401
BN_CTX_end(ctx);
lib/libcrypto/ec/ec_key.c
402
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_key.c
511
EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx)
lib/libcrypto/ec/ec_lib.c
1005
BIGNUM *x, BIGNUM *y, BN_CTX *ctx)
lib/libcrypto/ec/ec_lib.c
1007
return EC_POINT_get_affine_coordinates(group, point, x, y, ctx);
lib/libcrypto/ec/ec_lib.c
1016
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
1019
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
1020
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
1021
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
1026
BN_CTX_start(ctx);
lib/libcrypto/ec/ec_lib.c
1028
if ((p = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
1030
if ((a = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
1032
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
1034
if ((w = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
1036
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
1038
if ((y = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
1046
if (!EC_GROUP_get_curve(group, p, a, b, ctx))
lib/libcrypto/ec/ec_lib.c
1050
if (!BN_nnmod(x, in_x, p, ctx))
lib/libcrypto/ec/ec_lib.c
1054
if (!BN_mod_sqr(y, x, p, ctx))
lib/libcrypto/ec/ec_lib.c
1056
if (!BN_mod_mul(y, y, x, p, ctx))
lib/libcrypto/ec/ec_lib.c
1068
if (!BN_mod_mul(w, a, x, p, ctx))
lib/libcrypto/ec/ec_lib.c
1078
if (!BN_mod_sqrt(y, y, p, ctx)) {
lib/libcrypto/ec/ec_lib.c
1100
if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx))
lib/libcrypto/ec/ec_lib.c
1106
BN_CTX_end(ctx);
lib/libcrypto/ec/ec_lib.c
1108
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
1109
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
1117
const BIGNUM *x, int y_bit, BN_CTX *ctx)
lib/libcrypto/ec/ec_lib.c
1119
return EC_POINT_set_compressed_coordinates(group, point, x, y_bit, ctx);
lib/libcrypto/ec/ec_lib.c
1127
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
1130
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
1131
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
1132
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
1145
ret = group->meth->add(group, r, a, b, ctx);
lib/libcrypto/ec/ec_lib.c
1148
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
1149
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
1159
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
1162
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
1163
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
1164
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
1176
ret = group->meth->dbl(group, r, a, ctx);
lib/libcrypto/ec/ec_lib.c
1179
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
1180
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
1189
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
1192
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
1193
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
1194
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
1205
ret = group->meth->invert(group, a, ctx);
lib/libcrypto/ec/ec_lib.c
1208
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
1209
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
1230
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
1233
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
1234
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
1235
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
1246
ret = group->meth->point_is_on_curve(group, point, ctx);
lib/libcrypto/ec/ec_lib.c
1249
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
1250
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
1260
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
1263
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
1264
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
1265
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
1277
ret = group->meth->point_cmp(group, a, b, ctx);
lib/libcrypto/ec/ec_lib.c
1280
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
1281
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
1290
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
1294
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
1295
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
1296
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
1299
BN_CTX_start(ctx);
lib/libcrypto/ec/ec_lib.c
1301
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
1303
if ((y = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
1306
if (!EC_POINT_get_affine_coordinates(group, point, x, y, ctx))
lib/libcrypto/ec/ec_lib.c
1308
if (!EC_POINT_set_affine_coordinates(group, point, x, y, ctx))
lib/libcrypto/ec/ec_lib.c
1314
BN_CTX_end(ctx);
lib/libcrypto/ec/ec_lib.c
1316
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
1317
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
1327
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
1330
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
1331
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
1332
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
1362
g_scalar, group->generator, ctx);
lib/libcrypto/ec/ec_lib.c
1372
ret = group->meth->mul_single_ct(group, r, p_scalar, point, ctx);
lib/libcrypto/ec/ec_lib.c
1381
g_scalar, group->generator, p_scalar, point, ctx);
lib/libcrypto/ec/ec_lib.c
1389
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
1390
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
245
BN_CTX *ctx = NULL;
lib/libcrypto/ec/ec_lib.c
251
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/ec/ec_lib.c
254
BN_CTX_start(ctx);
lib/libcrypto/ec/ec_lib.c
255
if ((cofactor = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
295
if (!BN_div_ct(cofactor, NULL, cofactor, group->order, ctx))
lib/libcrypto/ec/ec_lib.c
311
BN_CTX_end(ctx);
lib/libcrypto/ec/ec_lib.c
312
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
368
EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx)
lib/libcrypto/ec/ec_lib.c
391
EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx)
lib/libcrypto/ec/ec_lib.c
486
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
489
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
490
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
491
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
498
ret = group->meth->group_set_curve(group, p, a, b, ctx);
lib/libcrypto/ec/ec_lib.c
501
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
502
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
512
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
515
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
516
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
517
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
524
ret = group->meth->group_get_curve(group, p, a, b, ctx);
lib/libcrypto/ec/ec_lib.c
527
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
528
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
536
const BIGNUM *b, BN_CTX *ctx)
lib/libcrypto/ec/ec_lib.c
538
return EC_GROUP_set_curve(group, p, a, b, ctx);
lib/libcrypto/ec/ec_lib.c
544
BN_CTX *ctx)
lib/libcrypto/ec/ec_lib.c
546
return EC_GROUP_get_curve(group, p, a, b, ctx);
lib/libcrypto/ec/ec_lib.c
552
BN_CTX *ctx)
lib/libcrypto/ec/ec_lib.c
559
if (!EC_GROUP_set_curve(group, p, a, b, ctx))
lib/libcrypto/ec/ec_lib.c
581
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
585
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
586
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
587
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
590
BN_CTX_start(ctx);
lib/libcrypto/ec/ec_lib.c
592
if ((p = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
594
if ((a = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
596
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
598
if ((discriminant = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
601
if (!EC_GROUP_get_curve(group, p, a, b, ctx))
lib/libcrypto/ec/ec_lib.c
615
if (!BN_mod_sqr(discriminant, a, p, ctx))
lib/libcrypto/ec/ec_lib.c
617
if (!BN_mod_mul(discriminant, discriminant, a, p, ctx))
lib/libcrypto/ec/ec_lib.c
622
if (!BN_mod_sqr(b, b, p, ctx))
lib/libcrypto/ec/ec_lib.c
627
if (!BN_mod_add(discriminant, discriminant, b, p, ctx))
lib/libcrypto/ec/ec_lib.c
637
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
638
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
647
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
653
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
654
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
655
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
658
if (!EC_GROUP_check_discriminant(group, ctx)) {
lib/libcrypto/ec/ec_lib.c
667
if (EC_POINT_is_on_curve(group, generator, ctx) <= 0) {
lib/libcrypto/ec/ec_lib.c
680
if (!EC_POINT_mul(group, point, order, NULL, NULL, ctx))
lib/libcrypto/ec/ec_lib.c
690
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
691
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
705
BN_CTX *ctx = NULL;
lib/libcrypto/ec/ec_lib.c
713
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
714
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
715
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
718
BN_CTX_start(ctx);
lib/libcrypto/ec/ec_lib.c
726
if ((p1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
728
if ((a1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
730
if ((b1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
732
if ((p2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
734
if ((a2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
736
if ((b2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ec_lib.c
743
if (!EC_GROUP_get_curve(group1, p1, a1, b1, ctx))
lib/libcrypto/ec/ec_lib.c
745
if (!EC_GROUP_get_curve(group2, p2, a2, b2, ctx))
lib/libcrypto/ec/ec_lib.c
760
if ((cmp = EC_POINT_cmp(group1, generator1, generator2, ctx)) < 0)
lib/libcrypto/ec/ec_lib.c
786
BN_CTX_end(ctx);
lib/libcrypto/ec/ec_lib.c
788
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
789
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
926
BN_CTX *ctx;
lib/libcrypto/ec/ec_lib.c
929
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
930
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
931
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
942
if (!group->meth->point_set_affine_coordinates(group, point, x, y, ctx))
lib/libcrypto/ec/ec_lib.c
945
if (EC_POINT_is_on_curve(group, point, ctx) <= 0) {
lib/libcrypto/ec/ec_lib.c
953
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
954
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_lib.c
962
const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx)
lib/libcrypto/ec/ec_lib.c
964
return EC_POINT_set_affine_coordinates(group, point, x, y, ctx);
lib/libcrypto/ec/ec_lib.c
972
BN_CTX *ctx = NULL;
lib/libcrypto/ec/ec_lib.c
980
if ((ctx = ctx_in) == NULL)
lib/libcrypto/ec/ec_lib.c
981
ctx = BN_CTX_new();
lib/libcrypto/ec/ec_lib.c
982
if (ctx == NULL)
lib/libcrypto/ec/ec_lib.c
993
ret = group->meth->point_get_affine_coordinates(group, point, x, y, ctx);
lib/libcrypto/ec/ec_lib.c
996
if (ctx != ctx_in)
lib/libcrypto/ec/ec_lib.c
997
BN_CTX_free(ctx);
lib/libcrypto/ec/ec_local.h
196
BN_CTX *ctx);
lib/libcrypto/ec/ec_mult.c
119
EC_POINT **multiples, size_t num_multiples, BN_CTX *ctx)
lib/libcrypto/ec/ec_mult.c
133
if (!EC_POINT_dbl(group, doubled, point, ctx))
lib/libcrypto/ec/ec_mult.c
139
ctx))
lib/libcrypto/ec/ec_mult.c
158
struct ec_wnaf *wnaf1, BN_CTX *ctx)
lib/libcrypto/ec/ec_mult.c
177
if (!group->meth->points_make_affine(group, len, val, ctx))
lib/libcrypto/ec/ec_mult.c
218
BN_CTX *ctx)
lib/libcrypto/ec/ec_mult.c
239
wnaf->num_multiples, ctx))
lib/libcrypto/ec/ec_mult.c
277
BN_CTX *ctx)
lib/libcrypto/ec/ec_mult.c
297
if ((wnaf[0] = ec_wnaf_new(group, scalar1, point1, ctx)) == NULL)
lib/libcrypto/ec/ec_mult.c
299
if ((wnaf[1] = ec_wnaf_new(group, scalar2, point2, ctx)) == NULL)
lib/libcrypto/ec/ec_mult.c
302
if (!ec_normalize_points(group, wnaf[0], wnaf[1], ctx))
lib/libcrypto/ec/ec_mult.c
321
if (!EC_POINT_dbl(group, r, r, ctx))
lib/libcrypto/ec/ec_mult.c
338
if (!EC_POINT_invert(group, r, ctx))
lib/libcrypto/ec/ec_mult.c
346
if (!EC_POINT_add(group, r, r, multiple, ctx))
lib/libcrypto/ec/ec_mult.c
352
if (!EC_POINT_invert(group, r, ctx))
lib/libcrypto/ec/ec_pmeth.c
108
ctx->data = dctx;
lib/libcrypto/ec/ec_pmeth.c
149
pkey_ec_cleanup(EVP_PKEY_CTX *ctx)
lib/libcrypto/ec/ec_pmeth.c
151
EC_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/ec/ec_pmeth.c
158
ctx->data = NULL;
lib/libcrypto/ec/ec_pmeth.c
163
pkey_ec_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
lib/libcrypto/ec/ec_pmeth.c
168
EC_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/ec/ec_pmeth.c
169
EC_KEY *ec = ctx->pkey->pkey.ec;
lib/libcrypto/ec/ec_pmeth.c
191
pkey_ec_verify(EVP_PKEY_CTX *ctx,
lib/libcrypto/ec/ec_pmeth.c
196
EC_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/ec/ec_pmeth.c
197
EC_KEY *ec = ctx->pkey->pkey.ec;
lib/libcrypto/ec/ec_pmeth.c
210
pkey_ec_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen)
lib/libcrypto/ec/ec_pmeth.c
216
EC_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/ec/ec_pmeth.c
218
if (!ctx->pkey || !ctx->peerkey) {
lib/libcrypto/ec/ec_pmeth.c
223
eckey = dctx->co_key ? dctx->co_key : ctx->pkey->pkey.ec;
lib/libcrypto/ec/ec_pmeth.c
228
pubkey = EC_KEY_get0_public_key(ctx->peerkey->pkey.ec);
lib/libcrypto/ec/ec_pmeth.c
247
pkey_ec_kdf_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen)
lib/libcrypto/ec/ec_pmeth.c
249
EC_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/ec/ec_pmeth.c
255
return pkey_ec_derive(ctx, key, keylen);
lib/libcrypto/ec/ec_pmeth.c
263
if (!pkey_ec_derive(ctx, NULL, &ktmplen))
lib/libcrypto/ec/ec_pmeth.c
269
if (!pkey_ec_derive(ctx, ktmp, &ktmplen))
lib/libcrypto/ec/ec_pmeth.c
284
pkey_ec_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
lib/libcrypto/ec/ec_pmeth.c
286
EC_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/ec/ec_pmeth.c
313
EC_KEY *ec_key = ctx->pkey->pkey.ec;
lib/libcrypto/ec/ec_pmeth.c
320
EC_KEY *ec_key = ctx->pkey->pkey.ec;
lib/libcrypto/ec/ec_pmeth.c
419
pkey_ec_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
lib/libcrypto/ec/ec_pmeth.c
432
return EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid);
lib/libcrypto/ec/ec_pmeth.c
441
return EVP_PKEY_CTX_set_ec_param_enc(ctx, param_enc);
lib/libcrypto/ec/ec_pmeth.c
448
return EVP_PKEY_CTX_set_ecdh_kdf_md(ctx, md);
lib/libcrypto/ec/ec_pmeth.c
456
return EVP_PKEY_CTX_set_ecdh_cofactor_mode(ctx, cofactor_mode);
lib/libcrypto/ec/ec_pmeth.c
463
pkey_ec_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
lib/libcrypto/ec/ec_pmeth.c
466
EC_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/ec/ec_pmeth.c
491
pkey_ec_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
lib/libcrypto/ec/ec_pmeth.c
494
EC_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/ec/ec_pmeth.c
497
if (ctx->pkey == NULL && dctx->gen_group == NULL) {
lib/libcrypto/ec/ec_pmeth.c
507
if (ctx->pkey != NULL) {
lib/libcrypto/ec/ec_pmeth.c
508
if (!EVP_PKEY_copy_parameters(pkey, ctx->pkey))
lib/libcrypto/ec/ec_pmeth.c
96
pkey_ec_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/ec/eck_prn.c
202
BN_CTX *ctx = NULL;
lib/libcrypto/ec/eck_prn.c
213
if ((ctx = BN_CTX_new()) == NULL) {
lib/libcrypto/ec/eck_prn.c
218
BN_CTX_start(ctx);
lib/libcrypto/ec/eck_prn.c
220
if ((p = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/eck_prn.c
222
if ((a = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/eck_prn.c
224
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/eck_prn.c
226
if ((cofactor = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/eck_prn.c
228
if ((gen = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/eck_prn.c
231
if (!EC_GROUP_get_curve(group, p, a, b, ctx)) {
lib/libcrypto/ec/eck_prn.c
250
if (EC_POINT_point2bn(group, generator, form, gen, ctx) == NULL) {
lib/libcrypto/ec/eck_prn.c
317
BN_CTX_end(ctx);
lib/libcrypto/ec/eck_prn.c
318
BN_CTX_free(ctx);
lib/libcrypto/ec/ecp_hp_methods.c
123
const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
138
if (!BN_nnmod(point->X, point->X, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
140
if (!BN_nnmod(point->Y, point->Y, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
143
if (!ec_field_element_from_bn(&group->fm, group, &point->fe_x, point->X, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
145
if (!ec_field_element_from_bn(&group->fm, group, &point->fe_y, point->Y, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
147
if (!ec_field_element_from_bn(&group->fm, group, &point->fe_z, point->Z, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
155
BIGNUM *x, BIGNUM *y, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
164
if (!ec_field_element_to_bn(&group->fm, &point->fe_x, point->X, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
166
if (!ec_field_element_to_bn(&group->fm, &point->fe_y, point->Y, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
168
if (!ec_field_element_to_bn(&group->fm, &point->fe_z, point->Z, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
171
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_hp_methods.c
173
if ((zinv = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_hp_methods.c
176
if (BN_mod_inverse_ct(zinv, point->Z, group->p, ctx) == NULL)
lib/libcrypto/ec/ecp_hp_methods.c
180
if (!BN_mod_mul(x, point->X, zinv, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
184
if (!BN_mod_mul(y, point->Y, zinv, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
191
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_hp_methods.c
198
const EC_POINT *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
302
const EC_POINT *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
32
const BIGNUM *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
37
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_hp_methods.c
406
const EC_POINT *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
409
return ec_point_add_a2(group, r, a, b, ctx);
lib/libcrypto/ec/ecp_hp_methods.c
411
return ec_point_add_a1(group, r, a, b, ctx);
lib/libcrypto/ec/ecp_hp_methods.c
415
ec_point_dbl_a1(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
499
ec_point_dbl_a2(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
52
if (!BN_nnmod(group->a, group->a, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
54
if (!BN_nnmod(group->b, group->b, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
57
if ((t = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_hp_methods.c
584
ec_point_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
587
return ec_point_dbl_a2(group, r, a, ctx);
lib/libcrypto/ec/ecp_hp_methods.c
589
return ec_point_dbl_a1(group, r, a, ctx);
lib/libcrypto/ec/ecp_hp_methods.c
593
ec_point_invert(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
61
if (!BN_mod_add(t, t, a, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
617
ec_point_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
650
ec_point_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
66
if (!ec_field_modulus_from_bn(&group->fm, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
679
BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
68
if (!ec_field_element_from_bn(&group->fm, group, &group->fe_a, group->a, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
685
if (!EC_POINT_make_affine(group, points[0], ctx))
lib/libcrypto/ec/ecp_hp_methods.c
695
BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
70
if (!ec_field_element_from_bn(&group->fm, group, &group->fe_b, group->b, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
705
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_hp_methods.c
707
if ((tmp = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_hp_methods.c
709
if ((tmp_Z = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_hp_methods.c
715
if ((prod_Z[i] = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_hp_methods.c
730
group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
738
if (!BN_mod_inverse_nonct(tmp, prod_Z[num - 1], group->p, ctx)) {
lib/libcrypto/ec/ecp_hp_methods.c
747
if (!BN_mod_mul(tmp_Z, prod_Z[i - 1], tmp, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
749
if (!BN_mod_mul(tmp, tmp, points[i]->Z, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
76
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_hp_methods.c
761
if (!BN_mod_mul(p->X, p->X, p->Z, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
763
if (!BN_mod_mul(p->Y, p->Y, p->Z, group->p, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
773
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_hp_methods.c
791
BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
804
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_hp_methods.c
808
if ((cardinality = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_hp_methods.c
810
if (!BN_mul(cardinality, group->order, group->cofactor, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
828
if (!EC_POINT_dbl(group, multiples[i], multiples[i / 2], ctx))
lib/libcrypto/ec/ecp_hp_methods.c
83
BIGNUM *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
832
if (!EC_POINT_add(group, multiples[i + 1], multiples[i], point, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
846
if (!EC_POINT_dbl(group, rr, rr, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
848
if (!EC_POINT_dbl(group, rr, rr, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
850
if (!EC_POINT_dbl(group, rr, rr, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
852
if (!EC_POINT_dbl(group, rr, rr, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
864
if (!EC_POINT_add(group, rr, rr, t, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
867
if (!EC_POINT_dbl(group, rr, rr, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
869
if (!EC_POINT_dbl(group, rr, rr, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
871
if (!EC_POINT_dbl(group, rr, rr, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
873
if (!EC_POINT_dbl(group, rr, rr, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
884
if (!EC_POINT_add(group, rr, rr, t, ctx))
lib/libcrypto/ec/ecp_hp_methods.c
902
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_hp_methods.c
909
const EC_POINT *point, BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
911
return ec_mul(group, r, scalar, point, ctx);
lib/libcrypto/ec/ecp_hp_methods.c
917
BN_CTX *ctx)
lib/libcrypto/ec/ecp_hp_methods.c
919
return ec_wnaf_mul(group, r, scalar1, point1, scalar2, point2, ctx);
lib/libcrypto/ec/ecp_methods.c
1002
if (!ec_field_sqr(group, tmp, lambda, ctx))
lib/libcrypto/ec/ecp_methods.c
1006
if (!ec_field_mul(group, p->X, tmp, p->X, ctx))
lib/libcrypto/ec/ecp_methods.c
101
ec_decode_scalar(const EC_GROUP *group, BIGNUM *bn, const BIGNUM *x, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1010
if (!ec_field_mul(group, tmp, tmp, lambda, ctx))
lib/libcrypto/ec/ecp_methods.c
1014
if (!ec_field_mul(group, p->Y, tmp, p->Y, ctx))
lib/libcrypto/ec/ecp_methods.c
1023
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_methods.c
1066
const EC_POINT *point, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
107
return group->meth->field_decode(group, bn, x, ctx);
lib/libcrypto/ec/ecp_methods.c
1075
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_methods.c
1082
if ((cardinality = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
1084
if ((lambda = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
1086
if ((k = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
1088
if (!BN_mul(cardinality, group->order, group->cofactor, ctx))
lib/libcrypto/ec/ecp_methods.c
1113
if (!BN_nnmod(k, k, cardinality, ctx))
lib/libcrypto/ec/ecp_methods.c
113
ec_encode_scalar(const EC_GROUP *group, BIGNUM *bn, const BIGNUM *x, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1143
if (!ec_blind_coordinates(group, s, ctx))
lib/libcrypto/ec/ecp_methods.c
115
if (!BN_nnmod(bn, x, group->p, ctx))
lib/libcrypto/ec/ecp_methods.c
1152
if (!EC_POINT_dbl(group, s, s, ctx))
lib/libcrypto/ec/ecp_methods.c
119
return group->meth->field_encode(group, bn, bn, ctx);
lib/libcrypto/ec/ecp_methods.c
1218
if (!EC_POINT_add(group, s, r, s, ctx))
lib/libcrypto/ec/ecp_methods.c
1220
if (!EC_POINT_dbl(group, r, r, ctx))
lib/libcrypto/ec/ecp_methods.c
1235
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_methods.c
1245
const EC_POINT *point, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1247
return ec_mul_ct(group, r, scalar, point, ctx);
lib/libcrypto/ec/ecp_methods.c
1253
BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1255
return ec_wnaf_mul(group, r, scalar1, point1, scalar2, point2, ctx);
lib/libcrypto/ec/ecp_methods.c
126
const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1260
const BIGNUM *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1262
return BN_mod_mul(r, a, b, group->p, ctx);
lib/libcrypto/ec/ecp_methods.c
1266
ec_simple_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1268
return BN_mod_sqr(r, a, group->p, ctx);
lib/libcrypto/ec/ecp_methods.c
1273
const BIGNUM *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1276
if ((group->mont_ctx = BN_MONT_CTX_create(p, ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
1279
if (!ec_group_set_curve(group, p, a, b, ctx))
lib/libcrypto/ec/ecp_methods.c
1293
const BIGNUM *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1299
return BN_mod_mul_montgomery(r, a, b, group->mont_ctx, ctx);
lib/libcrypto/ec/ecp_methods.c
1304
BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1310
return BN_mod_mul_montgomery(r, a, a, group->mont_ctx, ctx);
lib/libcrypto/ec/ecp_methods.c
1315
BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1321
return BN_to_montgomery(r, a, group->mont_ctx, ctx);
lib/libcrypto/ec/ecp_methods.c
1326
BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
1332
return BN_from_montgomery(r, a, group->mont_ctx, ctx);
lib/libcrypto/ec/ecp_methods.c
137
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_methods.c
139
if ((a_plus_3 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
146
if (!ec_encode_scalar(group, group->a, a, ctx))
lib/libcrypto/ec/ecp_methods.c
148
if (!ec_encode_scalar(group, group->b, b, ctx))
lib/libcrypto/ec/ecp_methods.c
153
if (!BN_mod_add(a_plus_3, a_plus_3, a, group->p, ctx))
lib/libcrypto/ec/ecp_methods.c
161
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_methods.c
168
BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
174
if (!ec_decode_scalar(group, a, group->a, ctx))
lib/libcrypto/ec/ecp_methods.c
176
if (!ec_decode_scalar(group, b, group->b, ctx))
lib/libcrypto/ec/ecp_methods.c
198
ec_point_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
206
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_methods.c
208
if ((rh = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
210
if ((tmp = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
212
if ((Z4 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
214
if ((Z6 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
225
if (!ec_field_sqr(group, rh, point->X, ctx))
lib/libcrypto/ec/ecp_methods.c
229
if (!ec_field_sqr(group, tmp, point->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
231
if (!ec_field_sqr(group, Z4, tmp, ctx))
lib/libcrypto/ec/ecp_methods.c
233
if (!ec_field_mul(group, Z6, Z4, tmp, ctx))
lib/libcrypto/ec/ecp_methods.c
244
if (!ec_field_mul(group, rh, rh, point->X, ctx))
lib/libcrypto/ec/ecp_methods.c
247
if (!ec_field_mul(group, tmp, Z4, group->a, ctx))
lib/libcrypto/ec/ecp_methods.c
251
if (!ec_field_mul(group, rh, rh, point->X, ctx))
lib/libcrypto/ec/ecp_methods.c
256
if (!ec_field_mul(group, tmp, group->b, Z6, ctx))
lib/libcrypto/ec/ecp_methods.c
266
if (!ec_field_mul(group, rh, rh, point->X, ctx))
lib/libcrypto/ec/ecp_methods.c
274
if (!ec_field_sqr(group, tmp, point->Y, ctx))
lib/libcrypto/ec/ecp_methods.c
280
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_methods.c
293
const EC_POINT *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
299
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_methods.c
311
if ((az = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
313
if ((bxaz2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
315
if ((byaz3 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
319
if (!ec_field_sqr(group, az, a->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
321
if (!ec_field_mul(group, bxaz2, b->X, az, ctx))
lib/libcrypto/ec/ecp_methods.c
325
if (!ec_field_mul(group, az, az, a->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
327
if (!ec_field_mul(group, byaz3, b->Y, az, ctx))
lib/libcrypto/ec/ecp_methods.c
333
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_methods.c
340
const EC_POINT *b, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
345
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_methods.c
351
if ((az = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
353
if ((bz = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
355
if ((axbz2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
357
if ((aybz3 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
359
if ((bxaz2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
361
if ((byaz3 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
365
if (!ec_field_sqr(group, bz, b->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
367
if (!ec_field_mul(group, axbz2, a->X, bz, ctx))
lib/libcrypto/ec/ecp_methods.c
369
if (!ec_field_sqr(group, az, a->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
371
if (!ec_field_mul(group, bxaz2, b->X, az, ctx))
lib/libcrypto/ec/ecp_methods.c
375
if (!ec_field_mul(group, bz, bz, b->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
377
if (!ec_field_mul(group, aybz3, a->Y, bz, ctx))
lib/libcrypto/ec/ecp_methods.c
379
if (!ec_field_mul(group, az, az, a->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
381
if (!ec_field_mul(group, byaz3, b->Y, az, ctx))
lib/libcrypto/ec/ecp_methods.c
387
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_methods.c
398
BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
408
return ec_point_cmp_one_affine(group, a, b, ctx);
lib/libcrypto/ec/ecp_methods.c
410
return ec_point_cmp_none_affine(group, a, b, ctx);
lib/libcrypto/ec/ecp_methods.c
415
const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
424
if (!ec_encode_scalar(group, point->X, x, ctx))
lib/libcrypto/ec/ecp_methods.c
426
if (!ec_encode_scalar(group, point->Y, y, ctx))
lib/libcrypto/ec/ecp_methods.c
428
if (!ec_encode_scalar(group, point->Z, BN_value_one(), ctx))
lib/libcrypto/ec/ecp_methods.c
440
BIGNUM *x, BIGNUM *y, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
445
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_methods.c
447
if ((z = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
449
if ((Z = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
451
if ((Z_1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
453
if ((Z_2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
455
if ((Z_3 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
463
if (!ec_decode_scalar(group, z, point->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
467
if (!ec_decode_scalar(group, x, point->X, ctx))
lib/libcrypto/ec/ecp_methods.c
469
if (!ec_decode_scalar(group, y, point->Y, ctx))
lib/libcrypto/ec/ecp_methods.c
474
if (BN_mod_inverse_ct(Z_1, z, group->p, ctx) == NULL) {
lib/libcrypto/ec/ecp_methods.c
480
if (!ec_field_sqr(group, Z_2, Z_1, ctx))
lib/libcrypto/ec/ecp_methods.c
483
if (!BN_mod_sqr(Z_2, Z_1, group->p, ctx))
lib/libcrypto/ec/ecp_methods.c
492
if (!ec_field_mul(group, x, point->X, Z_2, ctx))
lib/libcrypto/ec/ecp_methods.c
498
if (!ec_field_mul(group, Z_3, Z_2, Z_1, ctx))
lib/libcrypto/ec/ecp_methods.c
501
if (!BN_mod_mul(Z_3, Z_2, Z_1, group->p, ctx))
lib/libcrypto/ec/ecp_methods.c
509
if (!ec_field_mul(group, y, point->Y, Z_3, ctx))
lib/libcrypto/ec/ecp_methods.c
517
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_methods.c
524
BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
534
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_methods.c
536
if ((one = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
538
if ((tmp = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
540
if ((tmp_Z = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
543
if (!ec_encode_scalar(group, one, BN_value_one(), ctx))
lib/libcrypto/ec/ecp_methods.c
549
if ((prod_Z[i] = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
569
prod_Z[i - 1], points[i]->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
581
if (!BN_mod_inverse_nonct(tmp, prod_Z[num - 1], group->p, ctx)) {
lib/libcrypto/ec/ecp_methods.c
592
if (!group->meth->field_encode(group, tmp, tmp, ctx))
lib/libcrypto/ec/ecp_methods.c
594
if (!group->meth->field_encode(group, tmp, tmp, ctx))
lib/libcrypto/ec/ecp_methods.c
607
if (!ec_field_mul(group, tmp_Z, prod_Z[i - 1], tmp, ctx))
lib/libcrypto/ec/ecp_methods.c
610
if (!ec_field_mul(group, tmp, tmp, points[i]->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
632
if (!ec_field_sqr(group, tmp, p->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
634
if (!ec_field_mul(group, p->X, p->X, tmp, ctx))
lib/libcrypto/ec/ecp_methods.c
637
if (!ec_field_mul(group, tmp, tmp, p->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
639
if (!ec_field_mul(group, p->Y, p->Y, tmp, ctx))
lib/libcrypto/ec/ecp_methods.c
650
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_methods.c
658
BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
664
return EC_POINT_dbl(group, r, a, ctx);
lib/libcrypto/ec/ecp_methods.c
670
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_methods.c
672
if ((n0 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
674
if ((n1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
676
if ((n2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
678
if ((n3 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
680
if ((n4 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
682
if ((n5 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
684
if ((n6 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
702
if (!ec_field_sqr(group, n0, b->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
704
if (!ec_field_mul(group, n1, a->X, n0, ctx))
lib/libcrypto/ec/ecp_methods.c
708
if (!ec_field_mul(group, n0, n0, b->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
710
if (!ec_field_mul(group, n2, a->Y, n0, ctx))
lib/libcrypto/ec/ecp_methods.c
724
if (!ec_field_sqr(group, n0, a->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
726
if (!ec_field_mul(group, n3, b->X, n0, ctx))
lib/libcrypto/ec/ecp_methods.c
730
if (!ec_field_mul(group, n0, n0, a->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
732
if (!ec_field_mul(group, n4, b->Y, n0, ctx))
lib/libcrypto/ec/ecp_methods.c
748
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_methods.c
749
ret = EC_POINT_dbl(group, r, a, ctx);
lib/libcrypto/ec/ecp_methods.c
750
ctx = NULL;
lib/libcrypto/ec/ecp_methods.c
780
if (!ec_field_mul(group, n0, a->Z, b->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
783
if (!ec_field_mul(group, r->Z, n0, n5, ctx))
lib/libcrypto/ec/ecp_methods.c
790
if (!ec_field_sqr(group, n0, n6, ctx))
lib/libcrypto/ec/ecp_methods.c
792
if (!ec_field_sqr(group, n4, n5, ctx))
lib/libcrypto/ec/ecp_methods.c
794
if (!ec_field_mul(group, n3, n1, n4, ctx))
lib/libcrypto/ec/ecp_methods.c
808
if (!ec_field_mul(group, n0, n0, n6, ctx))
lib/libcrypto/ec/ecp_methods.c
810
if (!ec_field_mul(group, n5, n4, n5, ctx))
lib/libcrypto/ec/ecp_methods.c
812
if (!ec_field_mul(group, n1, n2, n5, ctx))
lib/libcrypto/ec/ecp_methods.c
827
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_methods.c
833
ec_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
841
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_methods.c
843
if ((n0 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
845
if ((n1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
847
if ((n2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
849
if ((n3 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
860
if (!ec_field_sqr(group, n0, a->X, ctx))
lib/libcrypto/ec/ecp_methods.c
870
if (!ec_field_sqr(group, n1, a->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
876
if (!ec_field_mul(group, n1, n0, n2, ctx))
lib/libcrypto/ec/ecp_methods.c
887
if (!ec_field_sqr(group, n0, a->X, ctx))
lib/libcrypto/ec/ecp_methods.c
89
BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
893
if (!ec_field_sqr(group, n1, a->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
895
if (!ec_field_sqr(group, n1, n1, ctx))
lib/libcrypto/ec/ecp_methods.c
897
if (!ec_field_mul(group, n1, n1, group->a, ctx))
lib/libcrypto/ec/ecp_methods.c
909
if (!ec_field_mul(group, n0, a->Y, a->Z, ctx))
lib/libcrypto/ec/ecp_methods.c
91
return group->meth->field_mul(group, r, a, b, ctx);
lib/libcrypto/ec/ecp_methods.c
918
if (!ec_field_sqr(group, n3, a->Y, ctx))
lib/libcrypto/ec/ecp_methods.c
920
if (!ec_field_mul(group, n2, a->X, n3, ctx))
lib/libcrypto/ec/ecp_methods.c
929
if (!ec_field_sqr(group, r->X, n1, ctx))
lib/libcrypto/ec/ecp_methods.c
936
if (!ec_field_sqr(group, n0, n3, ctx))
lib/libcrypto/ec/ecp_methods.c
945
if (!ec_field_mul(group, n0, n1, n0, ctx))
lib/libcrypto/ec/ecp_methods.c
95
ec_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
954
BN_CTX_end(ctx);
lib/libcrypto/ec/ecp_methods.c
960
ec_invert(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
97
return group->meth->field_sqr(group, r, a, ctx);
lib/libcrypto/ec/ecp_methods.c
977
ec_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx)
lib/libcrypto/ec/ecp_methods.c
983
BN_CTX_start(ctx);
lib/libcrypto/ec/ecp_methods.c
984
if ((lambda = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
986
if ((tmp = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ec/ecp_methods.c
994
!group->meth->field_encode(group, lambda, lambda, ctx))
lib/libcrypto/ec/ecp_methods.c
998
if (!ec_field_mul(group, p->Z, lambda, p->Z, ctx))
lib/libcrypto/ec/ecx_methods.c
334
ecx_pub_print(BIO *bio, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/ec/ecx_methods.c
446
ecx_priv_print(BIO *bio, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/ecdh/ecdh.c
149
BN_CTX *ctx;
lib/libcrypto/ecdh/ecdh.c
161
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/ecdh/ecdh.c
164
BN_CTX_start(ctx);
lib/libcrypto/ecdh/ecdh.c
166
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdh/ecdh.c
172
if (EC_POINT_is_on_curve(group, pub_key, ctx) <= 0)
lib/libcrypto/ecdh/ecdh.c
185
if (!EC_POINT_mul(group, point, NULL, pub_key, priv_key, ctx)) {
lib/libcrypto/ecdh/ecdh.c
190
if (!EC_POINT_get_affine_coordinates(group, point, x, NULL, ctx)) {
lib/libcrypto/ecdh/ecdh.c
217
BN_CTX_end(ctx);
lib/libcrypto/ecdh/ecdh.c
218
BN_CTX_free(ctx);
lib/libcrypto/ecdsa/ecdsa.c
278
BN_CTX *ctx = NULL;
lib/libcrypto/ecdsa/ecdsa.c
305
if ((ctx = in_ctx) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
306
ctx = BN_CTX_new();
lib/libcrypto/ecdsa/ecdsa.c
307
if (ctx == NULL) {
lib/libcrypto/ecdsa/ecdsa.c
312
BN_CTX_start(ctx);
lib/libcrypto/ecdsa/ecdsa.c
314
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
350
if (!EC_POINT_mul(group, point, k, NULL, NULL, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
356
ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
361
if (!BN_nnmod(r, x, order, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
368
if (BN_mod_inverse_ct(k, k, order, ctx) == NULL) {
lib/libcrypto/ecdsa/ecdsa.c
382
BN_CTX_end(ctx);
lib/libcrypto/ecdsa/ecdsa.c
383
if (ctx != in_ctx)
lib/libcrypto/ecdsa/ecdsa.c
384
BN_CTX_free(ctx);
lib/libcrypto/ecdsa/ecdsa.c
412
const BIGNUM *r, const EC_KEY *key, BN_CTX *ctx)
lib/libcrypto/ecdsa/ecdsa.c
422
BN_CTX_start(ctx);
lib/libcrypto/ecdsa/ecdsa.c
437
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
439
if ((binv = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
441
if ((be = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
443
if ((bxr = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
464
if (BN_mod_inverse_ct(binv, b, order, ctx) == NULL) {
lib/libcrypto/ecdsa/ecdsa.c
469
if (!BN_mod_mul(bxr, b, priv_key, order, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
473
if (!BN_mod_mul(bxr, bxr, r, order, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
477
if (!BN_mod_mul(be, b, e, order, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
481
if (!BN_mod_add(s, be, bxr, order, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
486
if (!BN_mod_mul(s, s, kinv, order, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
491
if (!BN_mod_mul(s, s, binv, order, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
505
BN_CTX_end(ctx);
lib/libcrypto/ecdsa/ecdsa.c
528
BN_CTX *ctx = NULL;
lib/libcrypto/ecdsa/ecdsa.c
539
if ((ctx = BN_CTX_new()) == NULL) {
lib/libcrypto/ecdsa/ecdsa.c
544
BN_CTX_start(ctx);
lib/libcrypto/ecdsa/ecdsa.c
546
if ((e = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
555
if (!ECDSA_sign_setup(key, ctx, &kinv, &r)) {
lib/libcrypto/ecdsa/ecdsa.c
563
if (!ecdsa_compute_s(&s, e, kinv, r, key, ctx))
lib/libcrypto/ecdsa/ecdsa.c
587
BN_CTX_end(ctx);
lib/libcrypto/ecdsa/ecdsa.c
588
BN_CTX_free(ctx);
lib/libcrypto/ecdsa/ecdsa.c
664
BN_CTX *ctx = NULL;
lib/libcrypto/ecdsa/ecdsa.c
681
if ((ctx = BN_CTX_new()) == NULL) {
lib/libcrypto/ecdsa/ecdsa.c
686
BN_CTX_start(ctx);
lib/libcrypto/ecdsa/ecdsa.c
688
if ((e = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
690
if ((sinv = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
692
if ((u = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
694
if ((v = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
696
if ((x = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/ecdsa/ecdsa.c
721
if (BN_mod_inverse_ct(sinv, sig->s, order, ctx) == NULL) {
lib/libcrypto/ecdsa/ecdsa.c
726
if (!BN_mod_mul(u, e, sinv, order, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
730
if (!BN_mod_mul(v, sig->r, sinv, order, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
744
if (!EC_POINT_mul(group, point, u, pub_key, v, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
748
if (!EC_POINT_get_affine_coordinates(group, point, x, NULL, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
753
if (!BN_nnmod(x, x, order, ctx)) {
lib/libcrypto/ecdsa/ecdsa.c
762
BN_CTX_end(ctx);
lib/libcrypto/ecdsa/ecdsa.c
763
BN_CTX_free(ctx);
lib/libcrypto/evp/bio_b64.c
119
BIO_B64_CTX *ctx;
lib/libcrypto/evp/bio_b64.c
121
ctx = malloc(sizeof(BIO_B64_CTX));
lib/libcrypto/evp/bio_b64.c
122
if (ctx == NULL)
lib/libcrypto/evp/bio_b64.c
125
ctx->buf_len = 0;
lib/libcrypto/evp/bio_b64.c
126
ctx->tmp_len = 0;
lib/libcrypto/evp/bio_b64.c
127
ctx->tmp_nl = 0;
lib/libcrypto/evp/bio_b64.c
128
ctx->buf_off = 0;
lib/libcrypto/evp/bio_b64.c
129
ctx->cont = 1;
lib/libcrypto/evp/bio_b64.c
130
ctx->start = 1;
lib/libcrypto/evp/bio_b64.c
131
ctx->encode = 0;
lib/libcrypto/evp/bio_b64.c
134
bi->ptr = (char *)ctx;
lib/libcrypto/evp/bio_b64.c
156
BIO_B64_CTX *ctx;
lib/libcrypto/evp/bio_b64.c
161
ctx = (BIO_B64_CTX *)b->ptr;
lib/libcrypto/evp/bio_b64.c
163
if ((ctx == NULL) || (b->next_bio == NULL))
lib/libcrypto/evp/bio_b64.c
168
if (ctx->encode != B64_DECODE) {
lib/libcrypto/evp/bio_b64.c
169
ctx->encode = B64_DECODE;
lib/libcrypto/evp/bio_b64.c
170
ctx->buf_len = 0;
lib/libcrypto/evp/bio_b64.c
171
ctx->buf_off = 0;
lib/libcrypto/evp/bio_b64.c
172
ctx->tmp_len = 0;
lib/libcrypto/evp/bio_b64.c
173
EVP_DecodeInit(&(ctx->base64));
lib/libcrypto/evp/bio_b64.c
177
if (ctx->buf_len > 0) {
lib/libcrypto/evp/bio_b64.c
178
OPENSSL_assert(ctx->buf_len >= ctx->buf_off);
lib/libcrypto/evp/bio_b64.c
179
i = ctx->buf_len - ctx->buf_off;
lib/libcrypto/evp/bio_b64.c
182
OPENSSL_assert(ctx->buf_off + i < (int)sizeof(ctx->buf));
lib/libcrypto/evp/bio_b64.c
183
memcpy(out, &(ctx->buf[ctx->buf_off]), i);
lib/libcrypto/evp/bio_b64.c
187
ctx->buf_off += i;
lib/libcrypto/evp/bio_b64.c
188
if (ctx->buf_len == ctx->buf_off) {
lib/libcrypto/evp/bio_b64.c
189
ctx->buf_len = 0;
lib/libcrypto/evp/bio_b64.c
190
ctx->buf_off = 0;
lib/libcrypto/evp/bio_b64.c
199
if (ctx->cont <= 0)
lib/libcrypto/evp/bio_b64.c
202
i = BIO_read(b->next_bio, &(ctx->tmp[ctx->tmp_len]),
lib/libcrypto/evp/bio_b64.c
203
B64_BLOCK_SIZE - ctx->tmp_len);
lib/libcrypto/evp/bio_b64.c
210
ctx->cont = i;
lib/libcrypto/evp/bio_b64.c
212
if (ctx->tmp_len == 0)
lib/libcrypto/evp/bio_b64.c
222
i += ctx->tmp_len;
lib/libcrypto/evp/bio_b64.c
223
ctx->tmp_len = i;
lib/libcrypto/evp/bio_b64.c
227
if (ctx->start && (BIO_get_flags(b) & BIO_FLAGS_BASE64_NO_NL)) {
lib/libcrypto/evp/bio_b64.c
229
ctx->tmp_len = 0;
lib/libcrypto/evp/bio_b64.c
230
} else if (ctx->start) {
lib/libcrypto/evp/bio_b64.c
231
q = p =(unsigned char *)ctx->tmp;
lib/libcrypto/evp/bio_b64.c
241
if (ctx->tmp_nl) {
lib/libcrypto/evp/bio_b64.c
243
ctx->tmp_nl = 0;
lib/libcrypto/evp/bio_b64.c
247
k = EVP_DecodeUpdate(&(ctx->base64),
lib/libcrypto/evp/bio_b64.c
248
(unsigned char *)ctx->buf,
lib/libcrypto/evp/bio_b64.c
250
if ((k <= 0) && (num == 0) && (ctx->start))
lib/libcrypto/evp/bio_b64.c
251
EVP_DecodeInit(&ctx->base64);
lib/libcrypto/evp/bio_b64.c
254
&(ctx->tmp[0])) {
lib/libcrypto/evp/bio_b64.c
256
&(ctx->tmp[0]));
lib/libcrypto/evp/bio_b64.c
258
ctx->tmp[x] = p[x];
lib/libcrypto/evp/bio_b64.c
260
EVP_DecodeInit(&ctx->base64);
lib/libcrypto/evp/bio_b64.c
261
ctx->start = 0;
lib/libcrypto/evp/bio_b64.c
271
if (p == (unsigned char *)&(ctx->tmp[0])) {
lib/libcrypto/evp/bio_b64.c
274
ctx->tmp_nl = 1;
lib/libcrypto/evp/bio_b64.c
275
ctx->tmp_len = 0;
lib/libcrypto/evp/bio_b64.c
282
ctx->tmp[ii] = p[ii];
lib/libcrypto/evp/bio_b64.c
283
ctx->tmp_len = n;
lib/libcrypto/evp/bio_b64.c
288
ctx->tmp_len = 0;
lib/libcrypto/evp/bio_b64.c
290
} else if ((i < B64_BLOCK_SIZE) && (ctx->cont > 0)) {
lib/libcrypto/evp/bio_b64.c
301
z = EVP_DecodeBlock((unsigned char *)ctx->buf,
lib/libcrypto/evp/bio_b64.c
302
(unsigned char *)ctx->tmp, jj);
lib/libcrypto/evp/bio_b64.c
304
if (ctx->tmp[jj-1] == '=') {
lib/libcrypto/evp/bio_b64.c
306
if (ctx->tmp[jj-2] == '=')
lib/libcrypto/evp/bio_b64.c
313
memmove(ctx->tmp, &ctx->tmp[jj], i - jj);
lib/libcrypto/evp/bio_b64.c
314
ctx->tmp_len = i - jj;
lib/libcrypto/evp/bio_b64.c
316
ctx->buf_len = 0;
lib/libcrypto/evp/bio_b64.c
318
ctx->buf_len = z;
lib/libcrypto/evp/bio_b64.c
322
i = EVP_DecodeUpdate(&(ctx->base64),
lib/libcrypto/evp/bio_b64.c
323
(unsigned char *)ctx->buf, &ctx->buf_len,
lib/libcrypto/evp/bio_b64.c
324
(unsigned char *)ctx->tmp, i);
lib/libcrypto/evp/bio_b64.c
325
ctx->tmp_len = 0;
lib/libcrypto/evp/bio_b64.c
327
ctx->buf_off = 0;
lib/libcrypto/evp/bio_b64.c
330
ctx->buf_len = 0;
lib/libcrypto/evp/bio_b64.c
334
if (ctx->buf_len <= outl)
lib/libcrypto/evp/bio_b64.c
335
i = ctx->buf_len;
lib/libcrypto/evp/bio_b64.c
339
memcpy(out, ctx->buf, i);
lib/libcrypto/evp/bio_b64.c
341
ctx->buf_off = i;
lib/libcrypto/evp/bio_b64.c
342
if (ctx->buf_off == ctx->buf_len) {
lib/libcrypto/evp/bio_b64.c
343
ctx->buf_len = 0;
lib/libcrypto/evp/bio_b64.c
344
ctx->buf_off = 0;
lib/libcrypto/evp/bio_b64.c
360
BIO_B64_CTX *ctx;
lib/libcrypto/evp/bio_b64.c
362
ctx = (BIO_B64_CTX *)b->ptr;
lib/libcrypto/evp/bio_b64.c
365
if (ctx->encode != B64_ENCODE) {
lib/libcrypto/evp/bio_b64.c
366
ctx->encode = B64_ENCODE;
lib/libcrypto/evp/bio_b64.c
367
ctx->buf_len = 0;
lib/libcrypto/evp/bio_b64.c
368
ctx->buf_off = 0;
lib/libcrypto/evp/bio_b64.c
369
ctx->tmp_len = 0;
lib/libcrypto/evp/bio_b64.c
370
EVP_EncodeInit(&(ctx->base64));
lib/libcrypto/evp/bio_b64.c
373
OPENSSL_assert(ctx->buf_off < (int)sizeof(ctx->buf));
lib/libcrypto/evp/bio_b64.c
374
OPENSSL_assert(ctx->buf_len <= (int)sizeof(ctx->buf));
lib/libcrypto/evp/bio_b64.c
375
OPENSSL_assert(ctx->buf_len >= ctx->buf_off);
lib/libcrypto/evp/bio_b64.c
376
n = ctx->buf_len - ctx->buf_off;
lib/libcrypto/evp/bio_b64.c
378
i = BIO_write(b->next_bio, &(ctx->buf[ctx->buf_off]), n);
lib/libcrypto/evp/bio_b64.c
384
ctx->buf_off += i;
lib/libcrypto/evp/bio_b64.c
385
OPENSSL_assert(ctx->buf_off <= (int)sizeof(ctx->buf));
lib/libcrypto/evp/bio_b64.c
386
OPENSSL_assert(ctx->buf_len >= ctx->buf_off);
lib/libcrypto/evp/bio_b64.c
390
ctx->buf_off = 0;
lib/libcrypto/evp/bio_b64.c
391
ctx->buf_len = 0;
lib/libcrypto/evp/bio_b64.c
400
if (ctx->tmp_len > 0) {
lib/libcrypto/evp/bio_b64.c
401
OPENSSL_assert(ctx->tmp_len <= 3);
lib/libcrypto/evp/bio_b64.c
402
n = 3 - ctx->tmp_len;
lib/libcrypto/evp/bio_b64.c
406
memcpy(&(ctx->tmp[ctx->tmp_len]), in, n);
lib/libcrypto/evp/bio_b64.c
407
ctx->tmp_len += n;
lib/libcrypto/evp/bio_b64.c
409
if (ctx->tmp_len < 3)
lib/libcrypto/evp/bio_b64.c
411
ctx->buf_len = EVP_EncodeBlock(
lib/libcrypto/evp/bio_b64.c
412
(unsigned char *)ctx->buf,
lib/libcrypto/evp/bio_b64.c
413
(unsigned char *)ctx->tmp, ctx->tmp_len);
lib/libcrypto/evp/bio_b64.c
414
OPENSSL_assert(ctx->buf_len <=
lib/libcrypto/evp/bio_b64.c
415
(int)sizeof(ctx->buf));
lib/libcrypto/evp/bio_b64.c
416
OPENSSL_assert(ctx->buf_len >= ctx->buf_off);
lib/libcrypto/evp/bio_b64.c
419
ctx->tmp_len = 0;
lib/libcrypto/evp/bio_b64.c
422
memcpy(ctx->tmp, in, n);
lib/libcrypto/evp/bio_b64.c
423
ctx->tmp_len = n;
lib/libcrypto/evp/bio_b64.c
428
ctx->buf_len = EVP_EncodeBlock(
lib/libcrypto/evp/bio_b64.c
429
(unsigned char *)ctx->buf,
lib/libcrypto/evp/bio_b64.c
431
OPENSSL_assert(ctx->buf_len <=
lib/libcrypto/evp/bio_b64.c
432
(int)sizeof(ctx->buf));
lib/libcrypto/evp/bio_b64.c
433
OPENSSL_assert(ctx->buf_len >= ctx->buf_off);
lib/libcrypto/evp/bio_b64.c
437
if (!EVP_EncodeUpdate(&(ctx->base64),
lib/libcrypto/evp/bio_b64.c
438
(unsigned char *)ctx->buf, &ctx->buf_len,
lib/libcrypto/evp/bio_b64.c
441
OPENSSL_assert(ctx->buf_len <= (int)sizeof(ctx->buf));
lib/libcrypto/evp/bio_b64.c
442
OPENSSL_assert(ctx->buf_len >= ctx->buf_off);
lib/libcrypto/evp/bio_b64.c
448
ctx->buf_off = 0;
lib/libcrypto/evp/bio_b64.c
449
n = ctx->buf_len;
lib/libcrypto/evp/bio_b64.c
451
i = BIO_write(b->next_bio, &(ctx->buf[ctx->buf_off]), n);
lib/libcrypto/evp/bio_b64.c
458
ctx->buf_off += i;
lib/libcrypto/evp/bio_b64.c
459
OPENSSL_assert(ctx->buf_off <= (int)sizeof(ctx->buf));
lib/libcrypto/evp/bio_b64.c
460
OPENSSL_assert(ctx->buf_len >= ctx->buf_off);
lib/libcrypto/evp/bio_b64.c
462
ctx->buf_len = 0;
lib/libcrypto/evp/bio_b64.c
463
ctx->buf_off = 0;
lib/libcrypto/evp/bio_b64.c
471
BIO_B64_CTX *ctx;
lib/libcrypto/evp/bio_b64.c
475
ctx = (BIO_B64_CTX *)b->ptr;
lib/libcrypto/evp/bio_b64.c
479
ctx->cont = 1;
lib/libcrypto/evp/bio_b64.c
480
ctx->start = 1;
lib/libcrypto/evp/bio_b64.c
481
ctx->encode = B64_NONE;
lib/libcrypto/evp/bio_b64.c
485
if (ctx->cont <= 0)
lib/libcrypto/evp/bio_b64.c
491
OPENSSL_assert(ctx->buf_len >= ctx->buf_off);
lib/libcrypto/evp/bio_b64.c
492
ret = ctx->buf_len - ctx->buf_off;
lib/libcrypto/evp/bio_b64.c
493
if ((ret == 0) && (ctx->encode != B64_NONE) &&
lib/libcrypto/evp/bio_b64.c
494
(ctx->base64.num != 0))
lib/libcrypto/evp/bio_b64.c
500
OPENSSL_assert(ctx->buf_len >= ctx->buf_off);
lib/libcrypto/evp/bio_b64.c
501
ret = ctx->buf_len - ctx->buf_off;
lib/libcrypto/evp/bio_b64.c
508
while (ctx->buf_len != ctx->buf_off) {
lib/libcrypto/evp/bio_b64.c
514
if (ctx->tmp_len != 0) {
lib/libcrypto/evp/bio_b64.c
515
ctx->buf_len = EVP_EncodeBlock(
lib/libcrypto/evp/bio_b64.c
516
(unsigned char *)ctx->buf,
lib/libcrypto/evp/bio_b64.c
517
(unsigned char *)ctx->tmp,
lib/libcrypto/evp/bio_b64.c
518
ctx->tmp_len);
lib/libcrypto/evp/bio_b64.c
519
ctx->buf_off = 0;
lib/libcrypto/evp/bio_b64.c
520
ctx->tmp_len = 0;
lib/libcrypto/evp/bio_b64.c
523
} else if (ctx->encode != B64_NONE && ctx->base64.num != 0) {
lib/libcrypto/evp/bio_b64.c
524
ctx->buf_off = 0;
lib/libcrypto/evp/bio_b64.c
525
EVP_EncodeFinal(&(ctx->base64),
lib/libcrypto/evp/bio_b64.c
526
(unsigned char *)ctx->buf,
lib/libcrypto/evp/bio_b64.c
527
&(ctx->buf_len));
lib/libcrypto/evp/bio_enc.c
113
bio_enc_ctx_free(BIO_ENC_CTX *ctx)
lib/libcrypto/evp/bio_enc.c
115
if (ctx == NULL)
lib/libcrypto/evp/bio_enc.c
118
EVP_CIPHER_CTX_free(ctx->cipher_ctx);
lib/libcrypto/evp/bio_enc.c
119
freezero(ctx, sizeof(*ctx));
lib/libcrypto/evp/bio_enc.c
125
BIO_ENC_CTX *ctx;
lib/libcrypto/evp/bio_enc.c
128
if ((ctx = calloc(1, sizeof(BIO_ENC_CTX))) == NULL)
lib/libcrypto/evp/bio_enc.c
130
if ((ctx->cipher_ctx = EVP_CIPHER_CTX_new()) == NULL)
lib/libcrypto/evp/bio_enc.c
133
ctx->cont = 1;
lib/libcrypto/evp/bio_enc.c
134
ctx->ok = 1;
lib/libcrypto/evp/bio_enc.c
136
bio->ptr = ctx;
lib/libcrypto/evp/bio_enc.c
137
ctx = NULL;
lib/libcrypto/evp/bio_enc.c
142
bio_enc_ctx_free(ctx);
lib/libcrypto/evp/bio_enc.c
162
BIO_ENC_CTX *ctx;
lib/libcrypto/evp/bio_enc.c
167
ctx = bio->ptr;
lib/libcrypto/evp/bio_enc.c
169
if (ctx == NULL || bio->next_bio == NULL)
lib/libcrypto/evp/bio_enc.c
173
if (ctx->buf_len > 0) {
lib/libcrypto/evp/bio_enc.c
174
i = ctx->buf_len - ctx->buf_off;
lib/libcrypto/evp/bio_enc.c
177
memcpy(out, &(ctx->buf[ctx->buf_off]), i);
lib/libcrypto/evp/bio_enc.c
181
ctx->buf_off += i;
lib/libcrypto/evp/bio_enc.c
182
if (ctx->buf_len == ctx->buf_off) {
lib/libcrypto/evp/bio_enc.c
183
ctx->buf_len = 0;
lib/libcrypto/evp/bio_enc.c
184
ctx->buf_off = 0;
lib/libcrypto/evp/bio_enc.c
192
if (ctx->cont <= 0)
lib/libcrypto/evp/bio_enc.c
197
i = BIO_read(bio->next_bio, &ctx->buf[BUF_OFFSET],
lib/libcrypto/evp/bio_enc.c
203
ctx->cont = i;
lib/libcrypto/evp/bio_enc.c
204
i = EVP_CipherFinal_ex(ctx->cipher_ctx,
lib/libcrypto/evp/bio_enc.c
205
(unsigned char *)ctx->buf,
lib/libcrypto/evp/bio_enc.c
206
&(ctx->buf_len));
lib/libcrypto/evp/bio_enc.c
207
ctx->ok = i;
lib/libcrypto/evp/bio_enc.c
208
ctx->buf_off = 0;
lib/libcrypto/evp/bio_enc.c
214
EVP_CipherUpdate(ctx->cipher_ctx,
lib/libcrypto/evp/bio_enc.c
215
(unsigned char *)ctx->buf, &ctx->buf_len,
lib/libcrypto/evp/bio_enc.c
216
(unsigned char *)&ctx->buf[BUF_OFFSET], i);
lib/libcrypto/evp/bio_enc.c
217
ctx->cont = 1;
lib/libcrypto/evp/bio_enc.c
224
if (ctx->buf_len == 0)
lib/libcrypto/evp/bio_enc.c
228
if (ctx->buf_len <= outl)
lib/libcrypto/evp/bio_enc.c
229
i = ctx->buf_len;
lib/libcrypto/evp/bio_enc.c
234
memcpy(out, ctx->buf, i);
lib/libcrypto/evp/bio_enc.c
236
ctx->buf_off = i;
lib/libcrypto/evp/bio_enc.c
243
return ret == 0 ? ctx->cont : ret;
lib/libcrypto/evp/bio_enc.c
249
BIO_ENC_CTX *ctx;
lib/libcrypto/evp/bio_enc.c
252
ctx = bio->ptr;
lib/libcrypto/evp/bio_enc.c
256
n = ctx->buf_len - ctx->buf_off;
lib/libcrypto/evp/bio_enc.c
258
i = BIO_write(bio->next_bio, &(ctx->buf[ctx->buf_off]), n);
lib/libcrypto/evp/bio_enc.c
263
ctx->buf_off += i;
lib/libcrypto/evp/bio_enc.c
271
ctx->buf_off = 0;
lib/libcrypto/evp/bio_enc.c
274
EVP_CipherUpdate(ctx->cipher_ctx,
lib/libcrypto/evp/bio_enc.c
275
(unsigned char *)ctx->buf, &ctx->buf_len,
lib/libcrypto/evp/bio_enc.c
280
ctx->buf_off = 0;
lib/libcrypto/evp/bio_enc.c
281
n = ctx->buf_len;
lib/libcrypto/evp/bio_enc.c
283
i = BIO_write(bio->next_bio, &ctx->buf[ctx->buf_off], n);
lib/libcrypto/evp/bio_enc.c
289
ctx->buf_off += i;
lib/libcrypto/evp/bio_enc.c
291
ctx->buf_len = 0;
lib/libcrypto/evp/bio_enc.c
292
ctx->buf_off = 0;
lib/libcrypto/evp/bio_enc.c
303
BIO_ENC_CTX *ctx, *dctx;
lib/libcrypto/evp/bio_enc.c
308
ctx = bio->ptr;
lib/libcrypto/evp/bio_enc.c
312
ctx->ok = 1;
lib/libcrypto/evp/bio_enc.c
313
ctx->finished = 0;
lib/libcrypto/evp/bio_enc.c
314
EVP_CipherInit_ex(ctx->cipher_ctx, NULL, NULL, NULL, NULL,
lib/libcrypto/evp/bio_enc.c
315
ctx->cipher_ctx->encrypt);
lib/libcrypto/evp/bio_enc.c
319
if (ctx->cont <= 0)
lib/libcrypto/evp/bio_enc.c
325
ret = ctx->buf_len - ctx->buf_off;
lib/libcrypto/evp/bio_enc.c
330
ret = ctx->buf_len - ctx->buf_off;
lib/libcrypto/evp/bio_enc.c
337
while (ctx->buf_len != ctx->buf_off) {
lib/libcrypto/evp/bio_enc.c
343
if (!ctx->finished) {
lib/libcrypto/evp/bio_enc.c
344
ctx->finished = 1;
lib/libcrypto/evp/bio_enc.c
345
ctx->buf_off = 0;
lib/libcrypto/evp/bio_enc.c
346
ret = EVP_CipherFinal_ex(ctx->cipher_ctx,
lib/libcrypto/evp/bio_enc.c
347
(unsigned char *)ctx->buf,
lib/libcrypto/evp/bio_enc.c
348
&ctx->buf_len);
lib/libcrypto/evp/bio_enc.c
349
ctx->ok = (int)ret;
lib/libcrypto/evp/bio_enc.c
361
ret = (long)ctx->ok;
lib/libcrypto/evp/bio_enc.c
370
*c_ctx = ctx->cipher_ctx;
lib/libcrypto/evp/bio_enc.c
376
ret = EVP_CIPHER_CTX_copy(dctx->cipher_ctx, ctx->cipher_ctx);
lib/libcrypto/evp/bio_enc.c
409
BIO_ENC_CTX *ctx;
lib/libcrypto/evp/bio_enc.c
415
if ((ctx = BIO_get_data(bio)) == NULL)
lib/libcrypto/evp/bio_enc.c
425
if (!EVP_CipherInit_ex(ctx->cipher_ctx, c, NULL, k, i, e))
lib/libcrypto/evp/bio_md.c
102
EVP_MD_CTX *ctx;
lib/libcrypto/evp/bio_md.c
104
ctx = EVP_MD_CTX_create();
lib/libcrypto/evp/bio_md.c
105
if (ctx == NULL)
lib/libcrypto/evp/bio_md.c
109
bi->ptr = (char *)ctx;
lib/libcrypto/evp/bio_md.c
130
EVP_MD_CTX *ctx;
lib/libcrypto/evp/bio_md.c
134
ctx = b->ptr;
lib/libcrypto/evp/bio_md.c
136
if ((ctx == NULL) || (b->next_bio == NULL))
lib/libcrypto/evp/bio_md.c
142
if (EVP_DigestUpdate(ctx, (unsigned char *)out,
lib/libcrypto/evp/bio_md.c
156
EVP_MD_CTX *ctx;
lib/libcrypto/evp/bio_md.c
160
ctx = b->ptr;
lib/libcrypto/evp/bio_md.c
162
if ((ctx != NULL) && (b->next_bio != NULL))
lib/libcrypto/evp/bio_md.c
166
if (!EVP_DigestUpdate(ctx, (const unsigned char *)in,
lib/libcrypto/evp/bio_md.c
183
EVP_MD_CTX *ctx, *dctx, **pctx;
lib/libcrypto/evp/bio_md.c
189
ctx = b->ptr;
lib/libcrypto/evp/bio_md.c
194
ret = EVP_DigestInit_ex(ctx, ctx->digest, NULL);
lib/libcrypto/evp/bio_md.c
203
*ppmd = ctx->digest;
lib/libcrypto/evp/bio_md.c
209
*pctx = ctx;
lib/libcrypto/evp/bio_md.c
226
ret = EVP_DigestInit_ex(ctx, md, NULL);
lib/libcrypto/evp/bio_md.c
233
if (!EVP_MD_CTX_copy_ex(dctx, ctx))
lib/libcrypto/evp/bio_md.c
262
EVP_MD_CTX *ctx;
lib/libcrypto/evp/bio_md.c
265
ctx = bp->ptr;
lib/libcrypto/evp/bio_md.c
266
if (size < ctx->digest->md_size)
lib/libcrypto/evp/bio_md.c
268
if (EVP_DigestFinal_ex(ctx, (unsigned char *)buf, &ret) <= 0)
lib/libcrypto/evp/e_aes.c
103
aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_aes.c
106
EVP_AES_KEY *eak = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
1065
aes_xts_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_aes.c
1068
EVP_AES_XTS_CTX *xctx = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
1073
AES_set_encrypt_key(key, ctx->key_len * 4, &xctx->ks1);
lib/libcrypto/evp/e_aes.c
1075
AES_set_decrypt_key(key, ctx->key_len * 4, &xctx->ks1);
lib/libcrypto/evp/e_aes.c
1077
AES_set_encrypt_key(key + ctx->key_len / 2, ctx->key_len * 4,
lib/libcrypto/evp/e_aes.c
108
if (AES_set_encrypt_key(key, ctx->key_len * 8, &eak->ks) < 0) {
lib/libcrypto/evp/e_aes.c
1085
memcpy(ctx->iv, iv, 16);
lib/libcrypto/evp/e_aes.c
1092
aes_xts_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
1095
EVP_AES_XTS_CTX *xctx = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
1104
ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_aes.c
117
aes_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_aes.c
120
EVP_AES_KEY *eak = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
1222
aes_ccm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_aes.c
1225
EVP_AES_CCM_CTX *cctx = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
123
if (AES_set_encrypt_key(key, ctx->key_len * 8, &eak->ks) < 0) {
lib/libcrypto/evp/e_aes.c
1230
AES_set_encrypt_key(key, ctx->key_len * 8, &cctx->ks);
lib/libcrypto/evp/e_aes.c
1236
memcpy(ctx->iv, iv, 15 - cctx->L);
lib/libcrypto/evp/e_aes.c
1243
aes_ccm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
1246
EVP_AES_CCM_CTX *cctx = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
1259
if (!ctx->encrypt && !cctx->tag_set)
lib/libcrypto/evp/e_aes.c
1264
if (CRYPTO_ccm128_setiv(ccm, ctx->iv, 15 - cctx->L,
lib/libcrypto/evp/e_aes.c
1279
if (CRYPTO_ccm128_setiv(ccm, ctx->iv, 15 - cctx->L, len))
lib/libcrypto/evp/e_aes.c
128
if (AES_set_decrypt_key(key, ctx->key_len * 8, &eak->ks) < 0) {
lib/libcrypto/evp/e_aes.c
1283
if (ctx->encrypt) {
lib/libcrypto/evp/e_aes.c
1295
if (timingsafe_memcmp(tag, ctx->buf, cctx->M) == 0)
lib/libcrypto/evp/e_aes.c
138
aes_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
1380
aead_aes_gcm_init(EVP_AEAD_CTX *ctx, const unsigned char *key, size_t key_len,
lib/libcrypto/evp/e_aes.c
1406
ctx->aead_state = gcm_ctx;
lib/libcrypto/evp/e_aes.c
141
EVP_AES_KEY *eak = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
1412
aead_aes_gcm_cleanup(EVP_AEAD_CTX *ctx)
lib/libcrypto/evp/e_aes.c
1414
struct aead_aes_gcm_ctx *gcm_ctx = ctx->aead_state;
lib/libcrypto/evp/e_aes.c
1420
aead_aes_gcm_seal(const EVP_AEAD_CTX *ctx, unsigned char *out, size_t *out_len,
lib/libcrypto/evp/e_aes.c
1425
const struct aead_aes_gcm_ctx *gcm_ctx = ctx->aead_state;
lib/libcrypto/evp/e_aes.c
143
AES_cbc_encrypt(in, out, len, &eak->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_aes.c
1456
aead_aes_gcm_open(const EVP_AEAD_CTX *ctx, unsigned char *out, size_t *out_len,
lib/libcrypto/evp/e_aes.c
1461
const struct aead_aes_gcm_ctx *gcm_ctx = ctx->aead_state;
lib/libcrypto/evp/e_aes.c
149
aes_ecb_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_aes.c
152
EVP_AES_KEY *eak = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
155
if (AES_set_encrypt_key(key, ctx->key_len * 8, &eak->ks) < 0) {
lib/libcrypto/evp/e_aes.c
1552
aes_wrap_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_aes.c
1555
EVP_AES_WRAP_CTX *wctx = (EVP_AES_WRAP_CTX *)ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
1561
if (ctx->encrypt)
lib/libcrypto/evp/e_aes.c
1562
AES_set_encrypt_key(key, 8 * ctx->key_len,
lib/libcrypto/evp/e_aes.c
1565
AES_set_decrypt_key(key, 8 * ctx->key_len,
lib/libcrypto/evp/e_aes.c
1573
int iv_len = EVP_CIPHER_CTX_iv_length(ctx);
lib/libcrypto/evp/e_aes.c
1575
if (iv_len < 0 || iv_len > sizeof(ctx->iv))
lib/libcrypto/evp/e_aes.c
1577
memcpy(ctx->iv, iv, iv_len);
lib/libcrypto/evp/e_aes.c
1578
wctx->iv = ctx->iv;
lib/libcrypto/evp/e_aes.c
1585
aes_wrap_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
1588
EVP_AES_WRAP_CTX *wctx = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
1596
if (ctx->encrypt && inlen < 8)
lib/libcrypto/evp/e_aes.c
1598
if (!ctx->encrypt && inlen < 16)
lib/libcrypto/evp/e_aes.c
160
if (AES_set_decrypt_key(key, ctx->key_len * 8, &eak->ks) < 0) {
lib/libcrypto/evp/e_aes.c
1604
if (ctx->encrypt)
lib/libcrypto/evp/e_aes.c
1610
if (ctx->encrypt)
lib/libcrypto/evp/e_aes.c
170
aes_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
173
EVP_AES_KEY *eak = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
175
aes_ecb_encrypt_internal(in, out, len, &eak->ks, ctx->encrypt);
lib/libcrypto/evp/e_aes.c
181
aes_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
184
EVP_AES_KEY *eak = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
186
AES_ofb128_encrypt(in, out, len, &eak->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_aes.c
192
aes_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
195
EVP_AES_KEY *eak = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
197
AES_cfb128_encrypt(in, out, len, &eak->ks, ctx->iv, &ctx->num,
lib/libcrypto/evp/e_aes.c
198
ctx->encrypt);
lib/libcrypto/evp/e_aes.c
204
aes_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
207
EVP_AES_KEY *eak = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
209
AES_cfb8_encrypt(in, out, len, &eak->ks, ctx->iv, &ctx->num,
lib/libcrypto/evp/e_aes.c
210
ctx->encrypt);
lib/libcrypto/evp/e_aes.c
216
aes_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
219
EVP_AES_KEY *eak = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
221
if ((ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) != 0) {
lib/libcrypto/evp/e_aes.c
222
AES_cfb1_encrypt(in, out, len, &eak->ks, ctx->iv, &ctx->num,
lib/libcrypto/evp/e_aes.c
223
ctx->encrypt);
lib/libcrypto/evp/e_aes.c
228
AES_cfb1_encrypt(in, out, MAXBITCHUNK * 8, &eak->ks, ctx->iv,
lib/libcrypto/evp/e_aes.c
229
&ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_aes.c
235
AES_cfb1_encrypt(in, out, len * 8, &eak->ks, ctx->iv, &ctx->num,
lib/libcrypto/evp/e_aes.c
236
ctx->encrypt);
lib/libcrypto/evp/e_aes.c
243
aes_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
246
EVP_AES_KEY *eak = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
247
unsigned int num = ctx->num;
lib/libcrypto/evp/e_aes.c
249
AES_ctr128_encrypt(in, out, len, &eak->ks, ctx->iv, ctx->buf, &num);
lib/libcrypto/evp/e_aes.c
251
ctx->num = (size_t)num;
lib/libcrypto/evp/e_aes.c
812
aes_gcm_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_aes.c
815
EVP_AES_GCM_CTX *gctx = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
820
AES_set_encrypt_key(key, ctx->key_len * 8, &gctx->ks);
lib/libcrypto/evp/e_aes.c
852
aes_gcm_tls_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
855
EVP_AES_GCM_CTX *gctx = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
866
if (EVP_CIPHER_CTX_ctrl(ctx, ctx->encrypt ?
lib/libcrypto/evp/e_aes.c
872
if (CRYPTO_gcm128_aad(&gctx->gcm, ctx->buf, gctx->tls_aad_len))
lib/libcrypto/evp/e_aes.c
879
if (ctx->encrypt) {
lib/libcrypto/evp/e_aes.c
896
CRYPTO_gcm128_tag(&gctx->gcm, ctx->buf, EVP_GCM_TLS_TAG_LEN);
lib/libcrypto/evp/e_aes.c
899
if (timingsafe_memcmp(ctx->buf, in + len, EVP_GCM_TLS_TAG_LEN) != 0) {
lib/libcrypto/evp/e_aes.c
913
aes_gcm_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_aes.c
916
EVP_AES_GCM_CTX *gctx = ctx->cipher_data;
lib/libcrypto/evp/e_aes.c
923
return aes_gcm_tls_cipher(ctx, out, in, len);
lib/libcrypto/evp/e_aes.c
932
} else if (ctx->encrypt) {
lib/libcrypto/evp/e_aes.c
943
if (!ctx->encrypt) {
lib/libcrypto/evp/e_aes.c
946
if (CRYPTO_gcm128_finish(&gctx->gcm, ctx->buf,
lib/libcrypto/evp/e_aes.c
952
CRYPTO_gcm128_tag(&gctx->gcm, ctx->buf, 16);
lib/libcrypto/evp/e_bf.c
105
bf_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_bf.c
113
BF_cfb64_encrypt(in, out, (long)chunk, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_bf.c
125
bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_bf.c
129
bl = ctx->cipher->block_size;
lib/libcrypto/evp/e_bf.c
137
BF_ecb_encrypt(in + i, out + i, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
lib/libcrypto/evp/e_bf.c
143
bf_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_bf.c
148
BF_ofb64_encrypt(in, out, (long)chunk, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_bf.c
155
BF_ofb64_encrypt(in, out, (long)inl, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_bf.c
76
#define data(ctx) ((EVP_BF_KEY *)(ctx)->cipher_data)
lib/libcrypto/evp/e_bf.c
79
bf_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_bf.c
82
BF_set_key(&data(ctx)->ks, EVP_CIPHER_CTX_key_length(ctx), key);
lib/libcrypto/evp/e_bf.c
87
bf_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_bf.c
92
BF_cbc_encrypt(in, out, (long)chunk, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_bf.c
99
BF_cbc_encrypt(in, out, (long)inl, &((EVP_BF_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
102
Camellia_cbc_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
108
camellia_128_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
116
Camellia_cfb128_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
128
camellia_128_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
132
bl = ctx->cipher->block_size;
lib/libcrypto/evp/e_camellia.c
140
Camellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
146
camellia_128_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
149
Camellia_ofb128_encrypt(in, out, EVP_MAXCHUNK, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_camellia.c
156
Camellia_ofb128_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_camellia.c
250
camellia_192_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
253
Camellia_cbc_encrypt(in, out, EVP_MAXCHUNK, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
260
Camellia_cbc_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
266
camellia_192_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
274
Camellia_cfb128_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
286
camellia_192_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
290
bl = ctx->cipher->block_size;
lib/libcrypto/evp/e_camellia.c
298
Camellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
304
camellia_192_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
307
Camellia_ofb128_encrypt(in, out, EVP_MAXCHUNK, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_camellia.c
314
Camellia_ofb128_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_camellia.c
408
camellia_256_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
411
Camellia_cbc_encrypt(in, out, EVP_MAXCHUNK, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
418
Camellia_cbc_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
424
camellia_256_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
432
Camellia_cfb128_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
444
camellia_256_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
448
bl = ctx->cipher->block_size;
lib/libcrypto/evp/e_camellia.c
456
Camellia_ecb_encrypt(in + i, out + i, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
462
camellia_256_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
465
Camellia_ofb128_encrypt(in, out, EVP_MAXCHUNK, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_camellia.c
472
Camellia_ofb128_encrypt(in, out, inl, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_camellia.c
566
camellia_128_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
576
Camellia_cfb1_encrypt(in, out, ((1 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? chunk * 8 : chunk), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
610
camellia_192_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
620
Camellia_cfb1_encrypt(in, out, ((1 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? chunk * 8 : chunk), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
654
camellia_256_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
664
Camellia_cfb1_encrypt(in, out, ((1 == 1) && !(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS) ? chunk * 8 : chunk), &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
699
camellia_128_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
707
Camellia_cfb8_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
73
#define data(ctx) ((EVP_CAMELLIA_KEY *)(ctx)->cipher_data)
lib/libcrypto/evp/e_camellia.c
741
camellia_192_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
749
Camellia_cfb8_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
76
camellia_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_camellia.c
783
camellia_256_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
791
Camellia_cfb8_encrypt(in, out, chunk, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_camellia.c
81
ret = Camellia_set_key(key, ctx->key_len * 8, ctx->cipher_data);
lib/libcrypto/evp/e_camellia.c
92
camellia_128_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_camellia.c
95
Camellia_cbc_encrypt(in, out, EVP_MAXCHUNK, &((EVP_CAMELLIA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_cast.c
105
cast5_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_cast.c
113
CAST_cfb64_encrypt(in, out, (long)chunk, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_cast.c
125
cast5_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_cast.c
129
bl = ctx->cipher->block_size;
lib/libcrypto/evp/e_cast.c
137
CAST_ecb_encrypt(in + i, out + i, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
lib/libcrypto/evp/e_cast.c
143
cast5_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_cast.c
148
CAST_ofb64_encrypt(in, out, (long)chunk, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_cast.c
155
CAST_ofb64_encrypt(in, out, (long)inl, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_cast.c
76
#define data(ctx) ((EVP_CAST_KEY *)(ctx)->cipher_data)
lib/libcrypto/evp/e_cast.c
79
cast_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_cast.c
82
CAST_set_key(&data(ctx)->ks, EVP_CIPHER_CTX_key_length(ctx), key);
lib/libcrypto/evp/e_cast.c
87
cast5_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_cast.c
92
CAST_cbc_encrypt(in, out, (long)chunk, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_cast.c
99
CAST_cbc_encrypt(in, out, (long)inl, &((EVP_CAST_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_chacha.c
29
chacha_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_chacha.c
33
ChaCha_set_key((ChaCha_ctx *)ctx->cipher_data, key,
lib/libcrypto/evp/e_chacha.c
34
EVP_CIPHER_CTX_key_length(ctx) * 8);
lib/libcrypto/evp/e_chacha.c
39
ChaCha_set_iv((ChaCha_ctx *)ctx->cipher_data, iv, counter);
lib/libcrypto/evp/e_chacha.c
45
chacha_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in,
lib/libcrypto/evp/e_chacha.c
48
ChaCha((ChaCha_ctx *)ctx->cipher_data, out, in, len);
lib/libcrypto/evp/e_chacha20poly1305.c
126
aead_chacha20_poly1305_seal(const EVP_AEAD_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_chacha20poly1305.c
131
const struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state;
lib/libcrypto/evp/e_chacha20poly1305.c
142
if (nonce_len != ctx->aead->nonce_len) {
lib/libcrypto/evp/e_chacha20poly1305.c
176
aead_chacha20_poly1305_open(const EVP_AEAD_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_chacha20poly1305.c
181
const struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state;
lib/libcrypto/evp/e_chacha20poly1305.c
194
if (nonce_len != ctx->aead->nonce_len) {
lib/libcrypto/evp/e_chacha20poly1305.c
233
aead_xchacha20_poly1305_seal(const EVP_AEAD_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_chacha20poly1305.c
238
const struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state;
lib/libcrypto/evp/e_chacha20poly1305.c
248
if (nonce_len != ctx->aead->nonce_len) {
lib/libcrypto/evp/e_chacha20poly1305.c
281
aead_xchacha20_poly1305_open(const EVP_AEAD_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_chacha20poly1305.c
286
const struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state;
lib/libcrypto/evp/e_chacha20poly1305.c
298
if (nonce_len != ctx->aead->nonce_len) {
lib/libcrypto/evp/e_chacha20poly1305.c
391
chacha20_poly1305_init(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_chacha20poly1305.c
394
struct chacha20_poly1305_ctx *cpx = ctx->cipher_data;
lib/libcrypto/evp/e_chacha20poly1305.c
434
chacha20_poly1305_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_chacha20poly1305.c
437
struct chacha20_poly1305_ctx *cpx = ctx->cipher_data;
lib/libcrypto/evp/e_chacha20poly1305.c
496
if (!ctx->encrypt || out == NULL)
lib/libcrypto/evp/e_chacha20poly1305.c
50
aead_chacha20_poly1305_init(EVP_AEAD_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_chacha20poly1305.c
505
if (ctx->encrypt && out != NULL)
lib/libcrypto/evp/e_chacha20poly1305.c
516
if (ctx->encrypt) {
lib/libcrypto/evp/e_chacha20poly1305.c
537
chacha20_poly1305_cleanup(EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/e_chacha20poly1305.c
539
struct chacha20_poly1305_ctx *cpx = ctx->cipher_data;
lib/libcrypto/evp/e_chacha20poly1305.c
547
chacha20_poly1305_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr)
lib/libcrypto/evp/e_chacha20poly1305.c
549
struct chacha20_poly1305_ctx *cpx = ctx->cipher_data;
lib/libcrypto/evp/e_chacha20poly1305.c
570
if (ctx->encrypt)
lib/libcrypto/evp/e_chacha20poly1305.c
581
if (!ctx->encrypt)
lib/libcrypto/evp/e_chacha20poly1305.c
73
ctx->aead_state = c20_ctx;
lib/libcrypto/evp/e_chacha20poly1305.c
79
aead_chacha20_poly1305_cleanup(EVP_AEAD_CTX *ctx)
lib/libcrypto/evp/e_chacha20poly1305.c
81
struct aead_chacha20_poly1305_ctx *c20_ctx = ctx->aead_state;
lib/libcrypto/evp/e_des.c
102
bl = ctx->cipher->block_size;
lib/libcrypto/evp/e_des.c
111
ctx->cipher_data, ctx->encrypt);
lib/libcrypto/evp/e_des.c
117
des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des.c
123
DES_ofb64_encrypt(in, out, (long)chunk, ctx->cipher_data,
lib/libcrypto/evp/e_des.c
124
(DES_cblock *)ctx->iv, &ctx->num);
lib/libcrypto/evp/e_des.c
130
DES_ofb64_encrypt(in, out, (long)inl, ctx->cipher_data,
lib/libcrypto/evp/e_des.c
131
(DES_cblock *)ctx->iv, &ctx->num);
lib/libcrypto/evp/e_des.c
136
des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des.c
142
DES_ncbc_encrypt(in, out, (long)chunk, ctx->cipher_data,
lib/libcrypto/evp/e_des.c
143
(DES_cblock *)ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_des.c
149
DES_ncbc_encrypt(in, out, (long)inl, ctx->cipher_data,
lib/libcrypto/evp/e_des.c
150
(DES_cblock *)ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_des.c
155
des_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des.c
161
DES_cfb64_encrypt(in, out, (long)chunk, ctx->cipher_data,
lib/libcrypto/evp/e_des.c
162
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_des.c
168
DES_cfb64_encrypt(in, out, (long)inl, ctx->cipher_data,
lib/libcrypto/evp/e_des.c
169
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_des.c
176
des_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des.c
189
DES_cfb_encrypt(c, d, 1, 1, ctx->cipher_data,
lib/libcrypto/evp/e_des.c
190
(DES_cblock *)ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_des.c
206
des_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des.c
213
ctx->cipher_data, (DES_cblock *)ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_des.c
219
DES_cfb_encrypt(in, out, 8, (long)inl, ctx->cipher_data,
lib/libcrypto/evp/e_des.c
220
(DES_cblock *)ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_des.c
73
des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_des.c
78
DES_set_key_unchecked(deskey, ctx->cipher_data);
lib/libcrypto/evp/e_des.c
97
des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des3.c
101
DES_set_key_unchecked(&deskey[0], &data(ctx)->ks1);
lib/libcrypto/evp/e_des3.c
102
DES_set_key_unchecked(&deskey[1], &data(ctx)->ks2);
lib/libcrypto/evp/e_des3.c
103
DES_set_key_unchecked(&deskey[2], &data(ctx)->ks3);
lib/libcrypto/evp/e_des3.c
128
des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des3.c
133
bl = ctx->cipher->block_size;
lib/libcrypto/evp/e_des3.c
142
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3, ctx->encrypt);
lib/libcrypto/evp/e_des3.c
148
des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des3.c
155
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
lib/libcrypto/evp/e_des3.c
156
(DES_cblock *)ctx->iv, &ctx->num);
lib/libcrypto/evp/e_des3.c
163
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
lib/libcrypto/evp/e_des3.c
164
(DES_cblock *)ctx->iv, &ctx->num);
lib/libcrypto/evp/e_des3.c
170
des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des3.c
177
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
lib/libcrypto/evp/e_des3.c
178
(DES_cblock *)ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_des3.c
185
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
lib/libcrypto/evp/e_des3.c
186
(DES_cblock *)ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_des3.c
191
des_ede_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des3.c
198
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
lib/libcrypto/evp/e_des3.c
199
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_des3.c
206
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
lib/libcrypto/evp/e_des3.c
207
(DES_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_des3.c
214
des_ede3_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des3.c
220
if (!(ctx->flags & EVP_CIPH_FLAG_LENGTH_BITS))
lib/libcrypto/evp/e_des3.c
226
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
lib/libcrypto/evp/e_des3.c
227
(DES_cblock *)ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_des3.c
236
des_ede3_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_des3.c
243
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
lib/libcrypto/evp/e_des3.c
244
(DES_cblock *)ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_des3.c
251
&data(ctx)->ks1, &data(ctx)->ks2, &data(ctx)->ks3,
lib/libcrypto/evp/e_des3.c
252
(DES_cblock *)ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_des3.c
79
#define data(ctx) ((DES_EDE_KEY *)(ctx)->cipher_data)
lib/libcrypto/evp/e_des3.c
82
des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_des3.c
87
DES_set_key_unchecked(&deskey[0], &data(ctx)->ks1);
lib/libcrypto/evp/e_des3.c
88
DES_set_key_unchecked(&deskey[1], &data(ctx)->ks2);
lib/libcrypto/evp/e_des3.c
89
memcpy(&data(ctx)->ks3, &data(ctx)->ks1,
lib/libcrypto/evp/e_des3.c
90
sizeof(data(ctx)->ks1));
lib/libcrypto/evp/e_des3.c
95
des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_idea.c
101
idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_idea.c
106
bl = ctx->cipher->block_size;
lib/libcrypto/evp/e_idea.c
114
idea_ecb_encrypt(in + i, out + i, ctx->cipher_data);
lib/libcrypto/evp/e_idea.c
124
idea_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_idea.c
129
idea_cbc_encrypt(in, out, (long)chunk, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_idea.c
136
idea_cbc_encrypt(in, out, (long)inl, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_idea.c
142
idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_idea.c
147
idea_ofb64_encrypt(in, out, (long)chunk, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_idea.c
154
idea_ofb64_encrypt(in, out, (long)inl, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_idea.c
160
idea_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_idea.c
168
idea_cfb64_encrypt(in, out, (long)chunk, &((EVP_IDEA_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_idea.c
78
idea_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_idea.c
82
if (EVP_CIPHER_CTX_mode(ctx) == EVP_CIPH_OFB_MODE)
lib/libcrypto/evp/e_idea.c
84
else if (EVP_CIPHER_CTX_mode(ctx) == EVP_CIPH_CFB_MODE)
lib/libcrypto/evp/e_idea.c
88
idea_set_encrypt_key(key, ctx->cipher_data);
lib/libcrypto/evp/e_idea.c
93
idea_set_decrypt_key(&tmp, ctx->cipher_data);
lib/libcrypto/evp/e_null.c
103
null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_null.c
67
static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_null.c
69
static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_null.c
95
null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_rc2.c
101
RC2_cbc_encrypt(in, out, (long)inl, &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_rc2.c
107
rc2_cfb64_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_rc2.c
115
RC2_cfb64_encrypt(in, out, (long)chunk, &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_rc2.c
127
rc2_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_rc2.c
131
bl = ctx->cipher->block_size;
lib/libcrypto/evp/e_rc2.c
139
RC2_ecb_encrypt(in + i, out + i, &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
lib/libcrypto/evp/e_rc2.c
145
rc2_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_rc2.c
150
RC2_ofb64_encrypt(in, out, (long)chunk, &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_rc2.c
157
RC2_ofb64_encrypt(in, out, (long)inl, &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_rc2.c
299
rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_rc2.c
302
RC2_set_key(&data(ctx)->ks, EVP_CIPHER_CTX_key_length(ctx),
lib/libcrypto/evp/e_rc2.c
303
key, data(ctx)->key_bits);
lib/libcrypto/evp/e_rc2.c
73
static int rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_rc2.c
75
static int rc2_meth_to_magic(EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/e_rc2.c
86
#define data(ctx) ((EVP_RC2_KEY *)(ctx)->cipher_data)
lib/libcrypto/evp/e_rc2.c
89
rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_rc2.c
94
RC2_cbc_encrypt(in, out, (long)chunk, &((EVP_RC2_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_rc4.c
130
rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_rc4.c
133
RC4_set_key(&data(ctx)->ks, EVP_CIPHER_CTX_key_length(ctx), key);
lib/libcrypto/evp/e_rc4.c
138
rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_rc4.c
141
RC4(&data(ctx)->ks, inl, in, out);
lib/libcrypto/evp/e_rc4.c
78
#define data(ctx) ((EVP_RC4_KEY *)(ctx)->cipher_data)
lib/libcrypto/evp/e_rc4.c
80
static int rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_rc4.c
82
static int rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_sm4.c
102
sm4_cfb128_encrypt(in, out, chunk, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num, ctx->encrypt);
lib/libcrypto/evp/e_sm4.c
114
sm4_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_sm4.c
118
bl = ctx->cipher->block_size;
lib/libcrypto/evp/e_sm4.c
126
sm4_ecb_encrypt(in + i, out + i, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->encrypt);
lib/libcrypto/evp/e_sm4.c
132
sm4_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_sm4.c
135
sm4_ofb128_encrypt(in, out, EVP_MAXCHUNK, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_sm4.c
142
sm4_ofb128_encrypt(in, out, inl, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, &ctx->num);
lib/libcrypto/evp/e_sm4.c
236
sm4_ctr_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in,
lib/libcrypto/evp/e_sm4.c
239
EVP_SM4_KEY *key = ((EVP_SM4_KEY *)(ctx)->cipher_data);
lib/libcrypto/evp/e_sm4.c
241
CRYPTO_ctr128_encrypt(in, out, len, &key->ks, ctx->iv, ctx->buf,
lib/libcrypto/evp/e_sm4.c
242
&ctx->num, (block128_f)SM4_encrypt);
lib/libcrypto/evp/e_sm4.c
32
sm4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_sm4.c
35
SM4_set_key(key, ctx->cipher_data);
lib/libcrypto/evp/e_sm4.c
78
sm4_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_sm4.c
81
sm4_cbc_encrypt(in, out, EVP_MAXCHUNK, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_sm4.c
88
sm4_cbc_encrypt(in, out, inl, &((EVP_SM4_KEY *)ctx->cipher_data)->ks, ctx->iv, ctx->encrypt);
lib/libcrypto/evp/e_sm4.c
94
sm4_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl)
lib/libcrypto/evp/e_xcbc_d.c
109
desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_xcbc_d.c
114
DES_set_key_unchecked(deskey, &data(ctx)->ks);
lib/libcrypto/evp/e_xcbc_d.c
115
memcpy(&data(ctx)->inw[0], &key[8], 8);
lib/libcrypto/evp/e_xcbc_d.c
116
memcpy(&data(ctx)->outw[0], &key[16], 8);
lib/libcrypto/evp/e_xcbc_d.c
122
desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_xcbc_d.c
126
DES_xcbc_encrypt(in, out, (long)EVP_MAXCHUNK, &data(ctx)->ks,
lib/libcrypto/evp/e_xcbc_d.c
127
(DES_cblock *)&(ctx->iv[0]), &data(ctx)->inw,
lib/libcrypto/evp/e_xcbc_d.c
128
&data(ctx)->outw, ctx->encrypt);
lib/libcrypto/evp/e_xcbc_d.c
134
DES_xcbc_encrypt(in, out, (long)inl, &data(ctx)->ks,
lib/libcrypto/evp/e_xcbc_d.c
135
(DES_cblock *)&(ctx->iv[0]), &data(ctx)->inw,
lib/libcrypto/evp/e_xcbc_d.c
136
&data(ctx)->outw, ctx->encrypt);
lib/libcrypto/evp/e_xcbc_d.c
72
static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/e_xcbc_d.c
74
static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/e_xcbc_d.c
84
#define data(ctx) ((DESX_CBC_KEY *)(ctx)->cipher_data)
lib/libcrypto/evp/evp.h
1044
void EVP_AEAD_CTX_free(EVP_AEAD_CTX *ctx);
lib/libcrypto/evp/evp.h
1050
int EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead,
lib/libcrypto/evp/evp.h
1054
void EVP_AEAD_CTX_cleanup(EVP_AEAD_CTX *ctx);
lib/libcrypto/evp/evp.h
1075
int EVP_AEAD_CTX_seal(const EVP_AEAD_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/evp.h
1098
int EVP_AEAD_CTX_open(const EVP_AEAD_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/evp.h
311
typedef int EVP_PBE_KEYGEN(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
lib/libcrypto/evp/evp.h
348
const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
lib/libcrypto/evp/evp.h
349
void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx);
lib/libcrypto/evp/evp.h
350
EVP_PKEY_CTX *EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx);
lib/libcrypto/evp/evp.h
351
void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx);
lib/libcrypto/evp/evp.h
364
const EVP_CIPHER * EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/evp.h
365
int EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/evp.h
366
int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/evp.h
367
int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/evp.h
368
int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/evp.h
369
int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/evp.h
370
int EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx,
lib/libcrypto/evp/evp.h
372
int EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx,
lib/libcrypto/evp/evp.h
375
void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/evp.h
376
void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data);
lib/libcrypto/evp/evp.h
377
void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/evp.h
378
void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data);
lib/libcrypto/evp/evp.h
379
unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/evp.h
381
unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/evp.h
392
int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/evp.h
395
int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/evp.h
440
void EVP_MD_CTX_free(EVP_MD_CTX *ctx);
lib/libcrypto/evp/evp.h
441
int EVP_MD_CTX_init(EVP_MD_CTX *ctx);
lib/libcrypto/evp/evp.h
442
int EVP_MD_CTX_reset(EVP_MD_CTX *ctx);
lib/libcrypto/evp/evp.h
444
void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx);
lib/libcrypto/evp/evp.h
445
int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx);
lib/libcrypto/evp/evp.h
447
void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags);
lib/libcrypto/evp/evp.h
448
void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
lib/libcrypto/evp/evp.h
449
int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr);
lib/libcrypto/evp/evp.h
450
int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags);
lib/libcrypto/evp/evp.h
452
int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl);
lib/libcrypto/evp/evp.h
453
int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, size_t cnt);
lib/libcrypto/evp/evp.h
454
int EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
lib/libcrypto/evp/evp.h
459
int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type);
lib/libcrypto/evp/evp.h
460
int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s);
lib/libcrypto/evp/evp.h
472
void EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags);
lib/libcrypto/evp/evp.h
473
void EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags);
lib/libcrypto/evp/evp.h
474
int EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags);
lib/libcrypto/evp/evp.h
476
int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
lib/libcrypto/evp/evp.h
478
int EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
lib/libcrypto/evp/evp.h
480
int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
lib/libcrypto/evp/evp.h
482
int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
lib/libcrypto/evp/evp.h
483
int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
lib/libcrypto/evp/evp.h
485
int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
lib/libcrypto/evp/evp.h
487
int EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
lib/libcrypto/evp/evp.h
489
int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
lib/libcrypto/evp/evp.h
491
int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
lib/libcrypto/evp/evp.h
492
int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
lib/libcrypto/evp/evp.h
494
int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
lib/libcrypto/evp/evp.h
496
int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
lib/libcrypto/evp/evp.h
498
int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
lib/libcrypto/evp/evp.h
500
int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
lib/libcrypto/evp/evp.h
501
int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
lib/libcrypto/evp/evp.h
503
int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
lib/libcrypto/evp/evp.h
506
int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
lib/libcrypto/evp/evp.h
509
int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
lib/libcrypto/evp/evp.h
511
int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen);
lib/libcrypto/evp/evp.h
513
int EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen,
lib/libcrypto/evp/evp.h
516
int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
lib/libcrypto/evp/evp.h
518
int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig,
lib/libcrypto/evp/evp.h
521
int EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret,
lib/libcrypto/evp/evp.h
524
int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
lib/libcrypto/evp/evp.h
526
int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
lib/libcrypto/evp/evp.h
528
int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
lib/libcrypto/evp/evp.h
531
int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
lib/libcrypto/evp/evp.h
534
void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx);
lib/libcrypto/evp/evp.h
535
void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
lib/libcrypto/evp/evp.h
536
int EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
lib/libcrypto/evp/evp.h
538
void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
lib/libcrypto/evp/evp.h
541
void EVP_DecodeInit(EVP_ENCODE_CTX *ctx);
lib/libcrypto/evp/evp.h
542
int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
lib/libcrypto/evp/evp.h
544
int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl);
lib/libcrypto/evp/evp.h
554
int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
lib/libcrypto/evp/evp.h
555
int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
lib/libcrypto/evp/evp.h
831
int EVP_CIPHER_type(const EVP_CIPHER *ctx);
lib/libcrypto/evp/evp.h
888
#define EVP_PKEY_CTX_set_signature_md(ctx, md) \
lib/libcrypto/evp/evp.h
889
EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \
lib/libcrypto/evp/evp.h
892
#define EVP_PKEY_CTX_get_signature_md(ctx, pmd) \
lib/libcrypto/evp/evp.h
893
EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \
lib/libcrypto/evp/evp.h
930
EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
931
void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
933
int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd,
lib/libcrypto/evp/evp.h
935
int EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
lib/libcrypto/evp/evp.h
938
int EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
939
void EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen);
lib/libcrypto/evp/evp.h
946
void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
lib/libcrypto/evp/evp.h
947
void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
948
EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
950
EVP_PKEY *EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
952
void EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data);
lib/libcrypto/evp/evp.h
953
void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
955
int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
956
int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
lib/libcrypto/evp/evp.h
958
int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
959
int EVP_PKEY_verify(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen,
lib/libcrypto/evp/evp.h
961
int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
962
int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, unsigned char *rout,
lib/libcrypto/evp/evp.h
964
int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
965
int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
lib/libcrypto/evp/evp.h
967
int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
968
int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
lib/libcrypto/evp/evp.h
971
int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
972
int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
lib/libcrypto/evp/evp.h
973
int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
lib/libcrypto/evp/evp.h
975
typedef int EVP_PKEY_gen_cb(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
977
int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
978
int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
lib/libcrypto/evp/evp.h
979
int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
980
int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
lib/libcrypto/evp/evp.h
982
void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
lib/libcrypto/evp/evp.h
983
EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp.h
985
int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx);
lib/libcrypto/evp/evp_aead.c
114
EVP_AEAD_CTX_seal(const EVP_AEAD_CTX *ctx, unsigned char *out, size_t *out_len,
lib/libcrypto/evp/evp_aead.c
119
size_t possible_out_len = in_len + ctx->aead->overhead;
lib/libcrypto/evp/evp_aead.c
132
if (ctx->aead->seal(ctx, out, out_len, max_out_len, nonce, nonce_len,
lib/libcrypto/evp/evp_aead.c
147
EVP_AEAD_CTX_open(const EVP_AEAD_CTX *ctx, unsigned char *out, size_t *out_len,
lib/libcrypto/evp/evp_aead.c
157
if (ctx->aead->open(ctx, out, out_len, max_out_len, nonce, nonce_len,
lib/libcrypto/evp/evp_aead.c
55
EVP_AEAD_CTX_init(EVP_AEAD_CTX *ctx, const EVP_AEAD *aead,
lib/libcrypto/evp/evp_aead.c
58
ctx->aead = aead;
lib/libcrypto/evp/evp_aead.c
63
return aead->init(ctx, key, key_len, tag_len);
lib/libcrypto/evp/evp_aead.c
68
EVP_AEAD_CTX_cleanup(EVP_AEAD_CTX *ctx)
lib/libcrypto/evp/evp_aead.c
70
if (ctx->aead == NULL)
lib/libcrypto/evp/evp_aead.c
72
ctx->aead->cleanup(ctx);
lib/libcrypto/evp/evp_aead.c
73
ctx->aead = NULL;
lib/libcrypto/evp/evp_aead.c
85
EVP_AEAD_CTX_free(EVP_AEAD_CTX *ctx)
lib/libcrypto/evp/evp_aead.c
87
if (ctx == NULL)
lib/libcrypto/evp/evp_aead.c
90
EVP_AEAD_CTX_cleanup(ctx);
lib/libcrypto/evp/evp_aead.c
91
free(ctx);
lib/libcrypto/evp/evp_cipher.c
1168
int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/evp_cipher.c
1179
int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/evp_cipher.c
125
EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
lib/libcrypto/evp/evp_cipher.c
128
return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc);
lib/libcrypto/evp/evp_cipher.c
133
EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine,
lib/libcrypto/evp/evp_cipher.c
137
enc = ctx->encrypt;
lib/libcrypto/evp/evp_cipher.c
140
ctx->encrypt = enc;
lib/libcrypto/evp/evp_cipher.c
142
if (cipher == NULL && ctx->cipher == NULL) {
lib/libcrypto/evp/evp_cipher.c
152
unsigned long flags = ctx->flags;
lib/libcrypto/evp/evp_cipher.c
154
EVP_CIPHER_CTX_cleanup(ctx);
lib/libcrypto/evp/evp_cipher.c
155
ctx->encrypt = enc;
lib/libcrypto/evp/evp_cipher.c
156
ctx->flags = flags & EVP_CIPHER_CTX_FLAG_WRAP_ALLOW;
lib/libcrypto/evp/evp_cipher.c
158
ctx->cipher = cipher;
lib/libcrypto/evp/evp_cipher.c
159
ctx->key_len = cipher->key_len;
lib/libcrypto/evp/evp_cipher.c
161
if (ctx->cipher->ctx_size != 0) {
lib/libcrypto/evp/evp_cipher.c
162
ctx->cipher_data = calloc(1, ctx->cipher->ctx_size);
lib/libcrypto/evp/evp_cipher.c
163
if (ctx->cipher_data == NULL) {
lib/libcrypto/evp/evp_cipher.c
169
if ((ctx->cipher->flags & EVP_CIPH_CTRL_INIT) != 0) {
lib/libcrypto/evp/evp_cipher.c
170
if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL) <= 0) {
lib/libcrypto/evp/evp_cipher.c
178
if (ctx->cipher->block_size != 1 &&
lib/libcrypto/evp/evp_cipher.c
179
ctx->cipher->block_size != 8 &&
lib/libcrypto/evp/evp_cipher.c
180
ctx->cipher->block_size != 16) {
lib/libcrypto/evp/evp_cipher.c
185
if ((ctx->flags & EVP_CIPHER_CTX_FLAG_WRAP_ALLOW) == 0 &&
lib/libcrypto/evp/evp_cipher.c
186
EVP_CIPHER_CTX_mode(ctx) == EVP_CIPH_WRAP_MODE) {
lib/libcrypto/evp/evp_cipher.c
191
if ((EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_CUSTOM_IV) == 0) {
lib/libcrypto/evp/evp_cipher.c
194
switch (EVP_CIPHER_CTX_mode(ctx)) {
lib/libcrypto/evp/evp_cipher.c
203
ctx->num = 0;
lib/libcrypto/evp/evp_cipher.c
207
iv_len = EVP_CIPHER_CTX_iv_length(ctx);
lib/libcrypto/evp/evp_cipher.c
208
if (iv_len < 0 || iv_len > sizeof(ctx->oiv) ||
lib/libcrypto/evp/evp_cipher.c
209
iv_len > sizeof(ctx->iv)) {
lib/libcrypto/evp/evp_cipher.c
214
memcpy(ctx->oiv, iv, iv_len);
lib/libcrypto/evp/evp_cipher.c
215
memcpy(ctx->iv, ctx->oiv, iv_len);
lib/libcrypto/evp/evp_cipher.c
219
ctx->num = 0;
lib/libcrypto/evp/evp_cipher.c
220
iv_len = EVP_CIPHER_CTX_iv_length(ctx);
lib/libcrypto/evp/evp_cipher.c
221
if (iv_len < 0 || iv_len > sizeof(ctx->iv)) {
lib/libcrypto/evp/evp_cipher.c
227
memcpy(ctx->iv, iv, iv_len);
lib/libcrypto/evp/evp_cipher.c
236
if (key != NULL || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT) != 0) {
lib/libcrypto/evp/evp_cipher.c
237
if (!ctx->cipher->init(ctx, key, iv, enc))
lib/libcrypto/evp/evp_cipher.c
241
ctx->partial_len = 0;
lib/libcrypto/evp/evp_cipher.c
242
ctx->final_used = 0;
lib/libcrypto/evp/evp_cipher.c
249
EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len,
lib/libcrypto/evp/evp_cipher.c
252
if (ctx->encrypt)
lib/libcrypto/evp/evp_cipher.c
253
return EVP_EncryptUpdate(ctx, out, out_len, in, in_len);
lib/libcrypto/evp/evp_cipher.c
255
return EVP_DecryptUpdate(ctx, out, out_len, in, in_len);
lib/libcrypto/evp/evp_cipher.c
260
EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len)
lib/libcrypto/evp/evp_cipher.c
262
if (ctx->encrypt)
lib/libcrypto/evp/evp_cipher.c
263
return EVP_EncryptFinal_ex(ctx, out, out_len);
lib/libcrypto/evp/evp_cipher.c
265
return EVP_DecryptFinal_ex(ctx, out, out_len);
lib/libcrypto/evp/evp_cipher.c
270
EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len)
lib/libcrypto/evp/evp_cipher.c
272
if (ctx->encrypt)
lib/libcrypto/evp/evp_cipher.c
273
return EVP_EncryptFinal_ex(ctx, out, out_len);
lib/libcrypto/evp/evp_cipher.c
275
return EVP_DecryptFinal_ex(ctx, out, out_len);
lib/libcrypto/evp/evp_cipher.c
280
EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
lib/libcrypto/evp/evp_cipher.c
283
return EVP_CipherInit(ctx, cipher, key, iv, 1);
lib/libcrypto/evp/evp_cipher.c
288
EVP_EncryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine,
lib/libcrypto/evp/evp_cipher.c
291
return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, 1);
lib/libcrypto/evp/evp_cipher.c
308
EVP_Cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in,
lib/libcrypto/evp/evp_cipher.c
311
return ctx->cipher->do_cipher(ctx, out, in, in_len);
lib/libcrypto/evp/evp_cipher.c
316
evp_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len,
lib/libcrypto/evp/evp_cipher.c
326
if ((ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) != 0) {
lib/libcrypto/evp/evp_cipher.c
327
if ((len = ctx->cipher->do_cipher(ctx, out, in, in_len)) < 0)
lib/libcrypto/evp/evp_cipher.c
334
if (!ctx->cipher->do_cipher(ctx, out, in, in_len))
lib/libcrypto/evp/evp_cipher.c
343
EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len,
lib/libcrypto/evp/evp_cipher.c
346
const int block_size = ctx->cipher->block_size;
lib/libcrypto/evp/evp_cipher.c
348
int partial_len = ctx->partial_len;
lib/libcrypto/evp/evp_cipher.c
359
if (in_len == 0 && EVP_CIPHER_mode(ctx->cipher) != EVP_CIPH_CCM_MODE)
lib/libcrypto/evp/evp_cipher.c
362
if ((ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) != 0)
lib/libcrypto/evp/evp_cipher.c
363
return evp_cipher(ctx, out, out_len, in, in_len);
lib/libcrypto/evp/evp_cipher.c
366
return evp_cipher(ctx, out, out_len, in, in_len);
lib/libcrypto/evp/evp_cipher.c
369
block_size > sizeof(ctx->buf)) {
lib/libcrypto/evp/evp_cipher.c
378
memcpy(&ctx->buf[partial_len], in, in_len);
lib/libcrypto/evp/evp_cipher.c
379
ctx->partial_len += in_len;
lib/libcrypto/evp/evp_cipher.c
393
memcpy(&ctx->buf[partial_len], in, partial_needed);
lib/libcrypto/evp/evp_cipher.c
396
if (!evp_cipher(ctx, out, &len, ctx->buf, block_size))
lib/libcrypto/evp/evp_cipher.c
410
if (!evp_cipher(ctx, out, &len, in, in_len))
lib/libcrypto/evp/evp_cipher.c
417
if ((ctx->partial_len = partial_len) > 0)
lib/libcrypto/evp/evp_cipher.c
418
memcpy(ctx->buf, &in[in_len], partial_len);
lib/libcrypto/evp/evp_cipher.c
427
EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len)
lib/libcrypto/evp/evp_cipher.c
429
return EVP_EncryptFinal_ex(ctx, out, out_len);
lib/libcrypto/evp/evp_cipher.c
434
EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len)
lib/libcrypto/evp/evp_cipher.c
436
const int block_size = ctx->cipher->block_size;
lib/libcrypto/evp/evp_cipher.c
437
int partial_len = ctx->partial_len;
lib/libcrypto/evp/evp_cipher.c
442
if ((ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) != 0)
lib/libcrypto/evp/evp_cipher.c
443
return evp_cipher(ctx, out, out_len, NULL, 0);
lib/libcrypto/evp/evp_cipher.c
446
block_size > sizeof(ctx->buf)) {
lib/libcrypto/evp/evp_cipher.c
453
if ((ctx->flags & EVP_CIPH_NO_PADDING) != 0) {
lib/libcrypto/evp/evp_cipher.c
462
memset(&ctx->buf[partial_len], pad, pad);
lib/libcrypto/evp/evp_cipher.c
464
return evp_cipher(ctx, out, out_len, ctx->buf, block_size);
lib/libcrypto/evp/evp_cipher.c
469
EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
lib/libcrypto/evp/evp_cipher.c
472
return EVP_CipherInit(ctx, cipher, key, iv, 0);
lib/libcrypto/evp/evp_cipher.c
477
EVP_DecryptInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *engine,
lib/libcrypto/evp/evp_cipher.c
480
return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, 0);
lib/libcrypto/evp/evp_cipher.c
485
EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len,
lib/libcrypto/evp/evp_cipher.c
488
const int block_size = ctx->cipher->block_size;
lib/libcrypto/evp/evp_cipher.c
500
if (in_len == 0 && EVP_CIPHER_mode(ctx->cipher) != EVP_CIPH_CCM_MODE)
lib/libcrypto/evp/evp_cipher.c
503
if ((ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) != 0)
lib/libcrypto/evp/evp_cipher.c
504
return evp_cipher(ctx, out, out_len, in, in_len);
lib/libcrypto/evp/evp_cipher.c
506
if ((ctx->flags & EVP_CIPH_NO_PADDING) != 0)
lib/libcrypto/evp/evp_cipher.c
507
return EVP_EncryptUpdate(ctx, out, out_len, in, in_len);
lib/libcrypto/evp/evp_cipher.c
509
if (block_size > sizeof(ctx->final)) {
lib/libcrypto/evp/evp_cipher.c
514
if (ctx->final_used) {
lib/libcrypto/evp/evp_cipher.c
524
memcpy(out, ctx->final, block_size);
lib/libcrypto/evp/evp_cipher.c
529
ctx->final_used = 0;
lib/libcrypto/evp/evp_cipher.c
532
if (!EVP_EncryptUpdate(ctx, out, &len, in, in_len))
lib/libcrypto/evp/evp_cipher.c
536
if (block_size > 1 && ctx->partial_len == 0) {
lib/libcrypto/evp/evp_cipher.c
540
memcpy(ctx->final, &out[len], block_size);
lib/libcrypto/evp/evp_cipher.c
541
ctx->final_used = 1;
lib/libcrypto/evp/evp_cipher.c
555
EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len)
lib/libcrypto/evp/evp_cipher.c
557
return EVP_DecryptFinal_ex(ctx, out, out_len);
lib/libcrypto/evp/evp_cipher.c
562
EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *out_len)
lib/libcrypto/evp/evp_cipher.c
564
const int block_size = ctx->cipher->block_size;
lib/libcrypto/evp/evp_cipher.c
565
int partial_len = ctx->partial_len;
lib/libcrypto/evp/evp_cipher.c
570
if ((ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) != 0)
lib/libcrypto/evp/evp_cipher.c
571
return evp_cipher(ctx, out, out_len, NULL, 0);
lib/libcrypto/evp/evp_cipher.c
573
if ((ctx->flags & EVP_CIPH_NO_PADDING) != 0) {
lib/libcrypto/evp/evp_cipher.c
584
if (partial_len != 0 || !ctx->final_used) {
lib/libcrypto/evp/evp_cipher.c
589
if (block_size > sizeof(ctx->final)) {
lib/libcrypto/evp/evp_cipher.c
594
pad = ctx->final[block_size - 1];
lib/libcrypto/evp/evp_cipher.c
601
if (ctx->final[i] != pad) {
lib/libcrypto/evp/evp_cipher.c
607
memcpy(out, ctx->final, plain_len);
lib/libcrypto/evp/evp_cipher.c
622
EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
624
if (ctx == NULL)
lib/libcrypto/evp/evp_cipher.c
627
EVP_CIPHER_CTX_cleanup(ctx);
lib/libcrypto/evp/evp_cipher.c
629
free(ctx);
lib/libcrypto/evp/evp_cipher.c
634
EVP_CIPHER_CTX_legacy_clear(EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
636
memset(ctx, 0, sizeof(*ctx));
lib/libcrypto/evp/evp_cipher.c
640
EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
642
return EVP_CIPHER_CTX_cleanup(ctx);
lib/libcrypto/evp/evp_cipher.c
647
EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
649
return EVP_CIPHER_CTX_cleanup(ctx);
lib/libcrypto/evp/evp_cipher.c
654
EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
656
if (ctx == NULL)
lib/libcrypto/evp/evp_cipher.c
659
if (ctx->cipher != NULL) {
lib/libcrypto/evp/evp_cipher.c
661
if (ctx->cipher->cleanup != NULL)
lib/libcrypto/evp/evp_cipher.c
662
ctx->cipher->cleanup(ctx);
lib/libcrypto/evp/evp_cipher.c
663
if (ctx->cipher_data != NULL)
lib/libcrypto/evp/evp_cipher.c
664
explicit_bzero(ctx->cipher_data, ctx->cipher->ctx_size);
lib/libcrypto/evp/evp_cipher.c
668
free(ctx->cipher_data);
lib/libcrypto/evp/evp_cipher.c
670
explicit_bzero(ctx, sizeof(EVP_CIPHER_CTX));
lib/libcrypto/evp/evp_cipher.c
677
EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr)
lib/libcrypto/evp/evp_cipher.c
681
if (!ctx->cipher) {
lib/libcrypto/evp/evp_cipher.c
686
if (!ctx->cipher->ctrl) {
lib/libcrypto/evp/evp_cipher.c
691
ret = ctx->cipher->ctrl(ctx, type, arg, ptr);
lib/libcrypto/evp/evp_cipher.c
701
EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key)
lib/libcrypto/evp/evp_cipher.c
703
if (ctx->cipher->flags & EVP_CIPH_RAND_KEY)
lib/libcrypto/evp/evp_cipher.c
704
return EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_RAND_KEY, 0, key);
lib/libcrypto/evp/evp_cipher.c
705
arc4random_buf(key, ctx->key_len);
lib/libcrypto/evp/evp_cipher.c
755
EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
757
return ctx->cipher;
lib/libcrypto/evp/evp_cipher.c
762
EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
764
return ctx->encrypt;
lib/libcrypto/evp/evp_cipher.c
769
EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, unsigned char *iv, size_t len)
lib/libcrypto/evp/evp_cipher.c
771
if (ctx == NULL || len != EVP_CIPHER_CTX_iv_length(ctx))
lib/libcrypto/evp/evp_cipher.c
782
memcpy(iv, ctx->iv, len);
lib/libcrypto/evp/evp_cipher.c
789
EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len)
lib/libcrypto/evp/evp_cipher.c
791
if (ctx == NULL || len != EVP_CIPHER_CTX_iv_length(ctx))
lib/libcrypto/evp/evp_cipher.c
802
memcpy(ctx->iv, iv, len);
lib/libcrypto/evp/evp_cipher.c
809
EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
811
return ctx->buf;
lib/libcrypto/evp/evp_cipher.c
816
EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
818
return ctx->app_data;
lib/libcrypto/evp/evp_cipher.c
823
EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data)
lib/libcrypto/evp/evp_cipher.c
825
ctx->app_data = data;
lib/libcrypto/evp/evp_cipher.c
830
EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
832
return ctx->key_len;
lib/libcrypto/evp/evp_cipher.c
837
EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *ctx, int key_len)
lib/libcrypto/evp/evp_cipher.c
839
if (ctx->key_len == key_len)
lib/libcrypto/evp/evp_cipher.c
841
if (key_len > 0 && (ctx->cipher->flags & EVP_CIPH_VARIABLE_LENGTH)) {
lib/libcrypto/evp/evp_cipher.c
842
ctx->key_len = key_len;
lib/libcrypto/evp/evp_cipher.c
851
EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *ctx, int pad)
lib/libcrypto/evp/evp_cipher.c
854
ctx->flags &= ~EVP_CIPH_NO_PADDING;
lib/libcrypto/evp/evp_cipher.c
856
ctx->flags |= EVP_CIPH_NO_PADDING;
lib/libcrypto/evp/evp_cipher.c
862
EVP_CIPHER_CTX_set_flags(EVP_CIPHER_CTX *ctx, int flags)
lib/libcrypto/evp/evp_cipher.c
864
ctx->flags |= flags;
lib/libcrypto/evp/evp_cipher.c
869
EVP_CIPHER_CTX_clear_flags(EVP_CIPHER_CTX *ctx, int flags)
lib/libcrypto/evp/evp_cipher.c
871
ctx->flags &= ~flags;
lib/libcrypto/evp/evp_cipher.c
876
EVP_CIPHER_CTX_test_flags(const EVP_CIPHER_CTX *ctx, int flags)
lib/libcrypto/evp/evp_cipher.c
878
return (ctx->flags & flags);
lib/libcrypto/evp/evp_cipher.c
883
EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
885
return ctx->cipher_data;
lib/libcrypto/evp/evp_cipher.c
890
EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data)
lib/libcrypto/evp/evp_cipher.c
894
old_cipher_data = ctx->cipher_data;
lib/libcrypto/evp/evp_cipher.c
895
ctx->cipher_data = cipher_data;
lib/libcrypto/evp/evp_cipher.c
906
EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
908
return ctx->cipher->nid;
lib/libcrypto/evp/evp_cipher.c
913
EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
915
return ctx->cipher->block_size;
lib/libcrypto/evp/evp_cipher.c
920
EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
924
if ((ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_IV_LENGTH) == 0)
lib/libcrypto/evp/evp_cipher.c
925
return ctx->cipher->iv_len;
lib/libcrypto/evp/evp_cipher.c
931
if (EVP_CIPHER_CTX_ctrl((EVP_CIPHER_CTX *)ctx, EVP_CTRL_GET_IVLEN, 0,
lib/libcrypto/evp/evp_cipher.c
940
EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx)
lib/libcrypto/evp/evp_cipher.c
942
return ctx->cipher->flags;
lib/libcrypto/evp/evp_cipher.c
951
EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *ctx, ASN1_TYPE *type)
lib/libcrypto/evp/evp_cipher.c
955
if (ctx->cipher->get_asn1_parameters != NULL)
lib/libcrypto/evp/evp_cipher.c
956
return ctx->cipher->get_asn1_parameters(ctx, type);
lib/libcrypto/evp/evp_cipher.c
958
if ((ctx->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1) == 0)
lib/libcrypto/evp/evp_cipher.c
964
iv_len = EVP_CIPHER_CTX_iv_length(ctx);
lib/libcrypto/evp/evp_cipher.c
965
if (iv_len < 0 || iv_len > sizeof(ctx->oiv) || iv_len > sizeof(ctx->iv)) {
lib/libcrypto/evp/evp_cipher.c
969
if (ASN1_TYPE_get_octetstring(type, ctx->oiv, iv_len) != iv_len)
lib/libcrypto/evp/evp_cipher.c
973
memcpy(ctx->iv, ctx->oiv, iv_len);
lib/libcrypto/evp/evp_cipher.c
979
EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *ctx, ASN1_TYPE *type)
lib/libcrypto/evp/evp_cipher.c
983
if (ctx->cipher->set_asn1_parameters != NULL)
lib/libcrypto/evp/evp_cipher.c
984
return ctx->cipher->set_asn1_parameters(ctx, type);
lib/libcrypto/evp/evp_cipher.c
986
if ((ctx->cipher->flags & EVP_CIPH_FLAG_DEFAULT_ASN1) == 0)
lib/libcrypto/evp/evp_cipher.c
992
iv_len = EVP_CIPHER_CTX_iv_length(ctx);
lib/libcrypto/evp/evp_cipher.c
993
if (iv_len < 0 || iv_len > sizeof(ctx->oiv)) {
lib/libcrypto/evp/evp_cipher.c
998
return ASN1_TYPE_set_octetstring(type, ctx->oiv, iv_len);
lib/libcrypto/evp/evp_digest.c
124
EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type)
lib/libcrypto/evp/evp_digest.c
126
EVP_MD_CTX_legacy_clear(ctx);
lib/libcrypto/evp/evp_digest.c
127
return EVP_DigestInit_ex(ctx, type, NULL);
lib/libcrypto/evp/evp_digest.c
132
EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl)
lib/libcrypto/evp/evp_digest.c
134
EVP_MD_CTX_clear_flags(ctx, EVP_MD_CTX_FLAG_CLEANED);
lib/libcrypto/evp/evp_digest.c
136
if (ctx->digest != type) {
lib/libcrypto/evp/evp_digest.c
137
if (ctx->digest && ctx->digest->ctx_size && ctx->md_data &&
lib/libcrypto/evp/evp_digest.c
138
!EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE)) {
lib/libcrypto/evp/evp_digest.c
139
freezero(ctx->md_data, ctx->digest->ctx_size);
lib/libcrypto/evp/evp_digest.c
140
ctx->md_data = NULL;
lib/libcrypto/evp/evp_digest.c
142
ctx->digest = type;
lib/libcrypto/evp/evp_digest.c
143
if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) {
lib/libcrypto/evp/evp_digest.c
144
ctx->update = type->update;
lib/libcrypto/evp/evp_digest.c
145
ctx->md_data = calloc(1, type->ctx_size);
lib/libcrypto/evp/evp_digest.c
146
if (ctx->md_data == NULL) {
lib/libcrypto/evp/evp_digest.c
147
EVP_PKEY_CTX_free(ctx->pctx);
lib/libcrypto/evp/evp_digest.c
148
ctx->pctx = NULL;
lib/libcrypto/evp/evp_digest.c
154
if (ctx->pctx) {
lib/libcrypto/evp/evp_digest.c
156
r = EVP_PKEY_CTX_ctrl(ctx->pctx, -1, EVP_PKEY_OP_TYPE_SIG,
lib/libcrypto/evp/evp_digest.c
157
EVP_PKEY_CTRL_DIGESTINIT, 0, ctx);
lib/libcrypto/evp/evp_digest.c
161
if (ctx->flags & EVP_MD_CTX_FLAG_NO_INIT)
lib/libcrypto/evp/evp_digest.c
163
return ctx->digest->init(ctx);
lib/libcrypto/evp/evp_digest.c
168
EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/evp_digest.c
170
return ctx->update(ctx, data, count);
lib/libcrypto/evp/evp_digest.c
176
EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size)
lib/libcrypto/evp/evp_digest.c
180
ret = EVP_DigestFinal_ex(ctx, md, size);
lib/libcrypto/evp/evp_digest.c
181
EVP_MD_CTX_cleanup(ctx);
lib/libcrypto/evp/evp_digest.c
188
EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size)
lib/libcrypto/evp/evp_digest.c
192
if ((size_t)ctx->digest->md_size > EVP_MAX_MD_SIZE) {
lib/libcrypto/evp/evp_digest.c
196
ret = ctx->digest->final(ctx, md);
lib/libcrypto/evp/evp_digest.c
198
*size = ctx->digest->md_size;
lib/libcrypto/evp/evp_digest.c
199
if (ctx->digest->cleanup) {
lib/libcrypto/evp/evp_digest.c
200
ctx->digest->cleanup(ctx);
lib/libcrypto/evp/evp_digest.c
201
EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_CLEANED);
lib/libcrypto/evp/evp_digest.c
203
memset(ctx->md_data, 0, ctx->digest->ctx_size);
lib/libcrypto/evp/evp_digest.c
212
EVP_MD_CTX ctx;
lib/libcrypto/evp/evp_digest.c
215
EVP_MD_CTX_legacy_clear(&ctx);
lib/libcrypto/evp/evp_digest.c
216
EVP_MD_CTX_set_flags(&ctx, EVP_MD_CTX_FLAG_ONESHOT);
lib/libcrypto/evp/evp_digest.c
217
ret = EVP_DigestInit_ex(&ctx, type, NULL) &&
lib/libcrypto/evp/evp_digest.c
218
EVP_DigestUpdate(&ctx, data, count) &&
lib/libcrypto/evp/evp_digest.c
219
EVP_DigestFinal_ex(&ctx, md, size);
lib/libcrypto/evp/evp_digest.c
220
EVP_MD_CTX_cleanup(&ctx);
lib/libcrypto/evp/evp_digest.c
234
EVP_MD_CTX_free(EVP_MD_CTX *ctx)
lib/libcrypto/evp/evp_digest.c
236
if (ctx == NULL)
lib/libcrypto/evp/evp_digest.c
239
EVP_MD_CTX_cleanup(ctx);
lib/libcrypto/evp/evp_digest.c
241
free(ctx);
lib/libcrypto/evp/evp_digest.c
253
EVP_MD_CTX_destroy(EVP_MD_CTX *ctx)
lib/libcrypto/evp/evp_digest.c
255
EVP_MD_CTX_free(ctx);
lib/libcrypto/evp/evp_digest.c
260
EVP_MD_CTX_legacy_clear(EVP_MD_CTX *ctx)
lib/libcrypto/evp/evp_digest.c
262
memset(ctx, 0, sizeof(*ctx));
lib/libcrypto/evp/evp_digest.c
266
EVP_MD_CTX_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/evp_digest.c
268
return EVP_MD_CTX_cleanup(ctx);
lib/libcrypto/evp/evp_digest.c
273
EVP_MD_CTX_reset(EVP_MD_CTX *ctx)
lib/libcrypto/evp/evp_digest.c
275
return EVP_MD_CTX_cleanup(ctx);
lib/libcrypto/evp/evp_digest.c
280
EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx)
lib/libcrypto/evp/evp_digest.c
282
if (ctx == NULL)
lib/libcrypto/evp/evp_digest.c
289
if (ctx->digest && ctx->digest->cleanup &&
lib/libcrypto/evp/evp_digest.c
290
!EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_CLEANED))
lib/libcrypto/evp/evp_digest.c
291
ctx->digest->cleanup(ctx);
lib/libcrypto/evp/evp_digest.c
292
if (ctx->digest && ctx->digest->ctx_size && ctx->md_data &&
lib/libcrypto/evp/evp_digest.c
293
!EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE))
lib/libcrypto/evp/evp_digest.c
294
freezero(ctx->md_data, ctx->digest->ctx_size);
lib/libcrypto/evp/evp_digest.c
299
if (!EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX))
lib/libcrypto/evp/evp_digest.c
300
EVP_PKEY_CTX_free(ctx->pctx);
lib/libcrypto/evp/evp_digest.c
301
memset(ctx, 0, sizeof(*ctx));
lib/libcrypto/evp/evp_digest.c
372
EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr)
lib/libcrypto/evp/evp_digest.c
376
if (!ctx->digest) {
lib/libcrypto/evp/evp_digest.c
381
if (!ctx->digest->md_ctrl) {
lib/libcrypto/evp/evp_digest.c
386
ret = ctx->digest->md_ctrl(ctx, type, arg, ptr);
lib/libcrypto/evp/evp_digest.c
396
EVP_MD_CTX_md(const EVP_MD_CTX *ctx)
lib/libcrypto/evp/evp_digest.c
398
if (!ctx)
lib/libcrypto/evp/evp_digest.c
400
return ctx->digest;
lib/libcrypto/evp/evp_digest.c
405
EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags)
lib/libcrypto/evp/evp_digest.c
407
ctx->flags &= ~flags;
lib/libcrypto/evp/evp_digest.c
412
EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags)
lib/libcrypto/evp/evp_digest.c
414
ctx->flags |= flags;
lib/libcrypto/evp/evp_digest.c
419
EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags)
lib/libcrypto/evp/evp_digest.c
421
return (ctx->flags & flags);
lib/libcrypto/evp/evp_digest.c
426
EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx)
lib/libcrypto/evp/evp_digest.c
428
return ctx->md_data;
lib/libcrypto/evp/evp_digest.c
433
EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx)
lib/libcrypto/evp/evp_digest.c
435
return ctx->pctx;
lib/libcrypto/evp/evp_digest.c
440
EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx)
lib/libcrypto/evp/evp_digest.c
442
if (EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX)) {
lib/libcrypto/evp/evp_digest.c
443
EVP_MD_CTX_clear_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX);
lib/libcrypto/evp/evp_digest.c
445
EVP_PKEY_CTX_free(ctx->pctx);
lib/libcrypto/evp/evp_digest.c
448
ctx->pctx = pctx;
lib/libcrypto/evp/evp_digest.c
458
EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_KEEP_PKEY_CTX);
lib/libcrypto/evp/evp_encode.c
134
EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx)
lib/libcrypto/evp/evp_encode.c
136
free(ctx);
lib/libcrypto/evp/evp_encode.c
141
EVP_EncodeInit(EVP_ENCODE_CTX *ctx)
lib/libcrypto/evp/evp_encode.c
143
ctx->length = 48;
lib/libcrypto/evp/evp_encode.c
144
ctx->num = 0;
lib/libcrypto/evp/evp_encode.c
145
ctx->line_num = 0;
lib/libcrypto/evp/evp_encode.c
150
EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
lib/libcrypto/evp/evp_encode.c
159
OPENSSL_assert(ctx->length <= (int)sizeof(ctx->enc_data));
lib/libcrypto/evp/evp_encode.c
160
if (ctx->length - ctx->num > inl) {
lib/libcrypto/evp/evp_encode.c
161
memcpy(&(ctx->enc_data[ctx->num]), in, inl);
lib/libcrypto/evp/evp_encode.c
162
ctx->num += inl;
lib/libcrypto/evp/evp_encode.c
165
if (ctx->num != 0) {
lib/libcrypto/evp/evp_encode.c
166
i = ctx->length - ctx->num;
lib/libcrypto/evp/evp_encode.c
167
memcpy(&(ctx->enc_data[ctx->num]), in, i);
lib/libcrypto/evp/evp_encode.c
170
j = EVP_EncodeBlock(out, ctx->enc_data, ctx->length);
lib/libcrypto/evp/evp_encode.c
171
ctx->num = 0;
lib/libcrypto/evp/evp_encode.c
177
while (inl >= ctx->length && total <= INT_MAX) {
lib/libcrypto/evp/evp_encode.c
178
j = EVP_EncodeBlock(out, in, ctx->length);
lib/libcrypto/evp/evp_encode.c
179
in += ctx->length;
lib/libcrypto/evp/evp_encode.c
180
inl -= ctx->length;
lib/libcrypto/evp/evp_encode.c
192
memcpy(&(ctx->enc_data[0]), in, inl);
lib/libcrypto/evp/evp_encode.c
193
ctx->num = inl;
lib/libcrypto/evp/evp_encode.c
201
EVP_EncodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl)
lib/libcrypto/evp/evp_encode.c
205
if (ctx->num != 0) {
lib/libcrypto/evp/evp_encode.c
206
ret = EVP_EncodeBlock(out, ctx->enc_data, ctx->num);
lib/libcrypto/evp/evp_encode.c
209
ctx->num = 0;
lib/libcrypto/evp/evp_encode.c
249
EVP_DecodeInit(EVP_ENCODE_CTX *ctx)
lib/libcrypto/evp/evp_encode.c
251
ctx->num = 0;
lib/libcrypto/evp/evp_encode.c
252
ctx->length = 0;
lib/libcrypto/evp/evp_encode.c
253
ctx->line_num = 0;
lib/libcrypto/evp/evp_encode.c
254
ctx->expect_nl = 0;
lib/libcrypto/evp/evp_encode.c
259
EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
lib/libcrypto/evp/evp_encode.c
265
n = ctx->num;
lib/libcrypto/evp/evp_encode.c
266
d = ctx->enc_data;
lib/libcrypto/evp/evp_encode.c
319
OPENSSL_assert(n < (int)sizeof(ctx->enc_data));
lib/libcrypto/evp/evp_encode.c
362
ctx->num = n;
lib/libcrypto/evp/evp_encode.c
409
EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl)
lib/libcrypto/evp/evp_encode.c
414
if (ctx->num != 0) {
lib/libcrypto/evp/evp_encode.c
415
i = EVP_DecodeBlock(out, ctx->enc_data, ctx->num);
lib/libcrypto/evp/evp_encode.c
418
ctx->num = 0;
lib/libcrypto/evp/evp_local.h
138
int (*item_verify)(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
lib/libcrypto/evp/evp_local.h
140
int (*item_sign)(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
lib/libcrypto/evp/evp_local.h
184
int (*init)(EVP_MD_CTX *ctx);
lib/libcrypto/evp/evp_local.h
185
int (*update)(EVP_MD_CTX *ctx, const void *data, size_t count);
lib/libcrypto/evp/evp_local.h
186
int (*final)(EVP_MD_CTX *ctx, unsigned char *md);
lib/libcrypto/evp/evp_local.h
188
int (*cleanup)(EVP_MD_CTX *ctx);
lib/libcrypto/evp/evp_local.h
193
int (*md_ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
lib/libcrypto/evp/evp_local.h
203
int (*update)(EVP_MD_CTX *ctx, const void *data, size_t count);
lib/libcrypto/evp/evp_local.h
212
int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key,
lib/libcrypto/evp/evp_local.h
214
int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out,
lib/libcrypto/evp/evp_local.h
280
int (*init)(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp_local.h
282
void (*cleanup)(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp_local.h
284
int (*paramgen)(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey);
lib/libcrypto/evp/evp_local.h
286
int (*keygen)(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey);
lib/libcrypto/evp/evp_local.h
288
int (*sign_init)(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp_local.h
289
int (*sign)(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
lib/libcrypto/evp/evp_local.h
292
int (*verify_init)(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp_local.h
293
int (*verify)(EVP_PKEY_CTX *ctx,
lib/libcrypto/evp/evp_local.h
297
int (*verify_recover)(EVP_PKEY_CTX *ctx,
lib/libcrypto/evp/evp_local.h
301
int (*signctx_init)(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx);
lib/libcrypto/evp/evp_local.h
302
int (*signctx)(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
lib/libcrypto/evp/evp_local.h
305
int (*encrypt)(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
lib/libcrypto/evp/evp_local.h
308
int (*decrypt)(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
lib/libcrypto/evp/evp_local.h
311
int (*derive_init)(EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp_local.h
312
int (*derive)(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
lib/libcrypto/evp/evp_local.h
314
int (*ctrl)(EVP_PKEY_CTX *ctx, int type, int p1, void *p2);
lib/libcrypto/evp/evp_local.h
315
int (*ctrl_str)(EVP_PKEY_CTX *ctx, const char *type, const char *value);
lib/libcrypto/evp/evp_local.h
317
int (*digestsign)(EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen,
lib/libcrypto/evp/evp_local.h
319
int (*digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig,
lib/libcrypto/evp/evp_local.h
323
void evp_pkey_set_cb_translate(BN_GENCB *cb, EVP_PKEY_CTX *ctx);
lib/libcrypto/evp/evp_local.h
336
int (*seal)(const struct evp_aead_ctx_st *ctx, unsigned char *out,
lib/libcrypto/evp/evp_local.h
341
int (*open)(const struct evp_aead_ctx_st *ctx, unsigned char *out,
lib/libcrypto/evp/evp_local.h
360
ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
lib/libcrypto/evp/evp_local.h
362
int EVP_PKEY_CTX_str2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *str);
lib/libcrypto/evp/evp_local.h
363
int EVP_PKEY_CTX_hex2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *hex);
lib/libcrypto/evp/evp_local.h
364
int EVP_PKEY_CTX_md(EVP_PKEY_CTX *ctx, int optype, int cmd, const char *md_name);
lib/libcrypto/evp/evp_local.h
366
void EVP_CIPHER_CTX_legacy_clear(EVP_CIPHER_CTX *ctx);
lib/libcrypto/evp/evp_local.h
367
void EVP_MD_CTX_legacy_clear(EVP_MD_CTX *ctx);
lib/libcrypto/evp/evp_pbe.c
182
ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de)
lib/libcrypto/evp/evp_pbe.c
225
if (!cfg->keygen(ctx, pass, passlen, param, cipher, md, en_de)) {
lib/libcrypto/evp/evp_pbe.c
419
PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
lib/libcrypto/evp/evp_pbe.c
456
if (!EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, en_de))
lib/libcrypto/evp/evp_pbe.c
458
if (EVP_CIPHER_asn1_to_param(ctx, pbe2->encryption->parameter) < 0) {
lib/libcrypto/evp/evp_pbe.c
463
ret = PKCS5_v2_PBKDF2_keyivgen(ctx, pass, passlen,
lib/libcrypto/evp/evp_pbe.c
506
PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
lib/libcrypto/evp/evp_pbe.c
518
if (EVP_CIPHER_CTX_cipher(ctx) == NULL) {
lib/libcrypto/evp/evp_pbe.c
522
keylen = EVP_CIPHER_CTX_key_length(ctx);
lib/libcrypto/evp/evp_pbe.c
583
ret = EVP_CipherInit_ex(ctx, NULL, NULL, key, NULL, en_de);
lib/libcrypto/evp/evp_pbe.c
599
PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
lib/libcrypto/evp/evp_pbe.c
643
ret = EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, en_de);
lib/libcrypto/evp/evp_pbe.c
76
int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
lib/libcrypto/evp/evp_pbe.c
78
int PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
lib/libcrypto/evp/evp_pbe.c
80
int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
lib/libcrypto/evp/evp_pbe.c
83
int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
lib/libcrypto/evp/m_md4.c
77
init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_md4.c
79
return MD4_Init(ctx->md_data);
lib/libcrypto/evp/m_md4.c
83
update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_md4.c
85
return MD4_Update(ctx->md_data, data, count);
lib/libcrypto/evp/m_md4.c
89
final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_md4.c
91
return MD4_Final(md, ctx->md_data);
lib/libcrypto/evp/m_md5.c
77
init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_md5.c
79
return MD5_Init(ctx->md_data);
lib/libcrypto/evp/m_md5.c
83
update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_md5.c
85
return MD5_Update(ctx->md_data, data, count);
lib/libcrypto/evp/m_md5.c
89
final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_md5.c
91
return MD5_Final(md, ctx->md_data);
lib/libcrypto/evp/m_md5_sha1.c
35
md5_sha1_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_md5_sha1.c
37
struct md5_sha1_ctx *mdctx = ctx->md_data;
lib/libcrypto/evp/m_md5_sha1.c
48
md5_sha1_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_md5_sha1.c
50
struct md5_sha1_ctx *mdctx = ctx->md_data;
lib/libcrypto/evp/m_md5_sha1.c
61
md5_sha1_final(EVP_MD_CTX *ctx, unsigned char *out)
lib/libcrypto/evp/m_md5_sha1.c
63
struct md5_sha1_ctx *mdctx = ctx->md_data;
lib/libcrypto/evp/m_null.c
68
init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_null.c
74
update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_null.c
80
final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_ripemd.c
77
init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_ripemd.c
79
return RIPEMD160_Init(ctx->md_data);
lib/libcrypto/evp/m_ripemd.c
83
update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_ripemd.c
85
return RIPEMD160_Update(ctx->md_data, data, count);
lib/libcrypto/evp/m_ripemd.c
89
final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_ripemd.c
91
return RIPEMD160_Final(md, ctx->md_data);
lib/libcrypto/evp/m_sha1.c
118
sha224_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sha1.c
120
return SHA224_Init(ctx->md_data);
lib/libcrypto/evp/m_sha1.c
124
sha224_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sha1.c
131
return SHA256_Update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sha1.c
135
sha224_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sha1.c
137
return SHA224_Final(md, ctx->md_data);
lib/libcrypto/evp/m_sha1.c
162
sha256_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sha1.c
164
return SHA256_Init(ctx->md_data);
lib/libcrypto/evp/m_sha1.c
168
sha256_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sha1.c
170
return SHA256_Update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sha1.c
174
sha256_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sha1.c
176
return SHA256_Final(md, ctx->md_data);
lib/libcrypto/evp/m_sha1.c
203
sha384_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sha1.c
205
return SHA384_Init(ctx->md_data);
lib/libcrypto/evp/m_sha1.c
209
sha384_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sha1.c
212
return SHA512_Update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sha1.c
216
sha384_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sha1.c
218
return SHA384_Final(md, ctx->md_data);
lib/libcrypto/evp/m_sha1.c
243
sha512_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sha1.c
245
return SHA512_Init(ctx->md_data);
lib/libcrypto/evp/m_sha1.c
249
sha512_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sha1.c
251
return SHA512_Update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sha1.c
255
sha512_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sha1.c
257
return SHA512_Final(md, ctx->md_data);
lib/libcrypto/evp/m_sha1.c
282
sha512_224_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sha1.c
284
return SHA512_224_Init(ctx->md_data);
lib/libcrypto/evp/m_sha1.c
288
sha512_224_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sha1.c
290
return SHA512_224_Update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sha1.c
294
sha512_224_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sha1.c
296
return SHA512_224_Final(md, ctx->md_data);
lib/libcrypto/evp/m_sha1.c
321
sha512_256_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sha1.c
323
return SHA512_256_Init(ctx->md_data);
lib/libcrypto/evp/m_sha1.c
327
sha512_256_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sha1.c
329
return SHA512_256_Update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sha1.c
333
sha512_256_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sha1.c
335
return SHA512_256_Final(md, ctx->md_data);
lib/libcrypto/evp/m_sha1.c
77
sha1_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sha1.c
79
return SHA1_Init(ctx->md_data);
lib/libcrypto/evp/m_sha1.c
83
sha1_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sha1.c
85
return SHA1_Update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sha1.c
89
sha1_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sha1.c
91
return SHA1_Final(md, ctx->md_data);
lib/libcrypto/evp/m_sha3.c
102
sha3_384_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sha3.c
104
return sha3_init(ctx->md_data, SHA3_384_DIGEST_LENGTH);
lib/libcrypto/evp/m_sha3.c
108
sha3_384_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sha3.c
110
return sha3_update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sha3.c
114
sha3_384_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sha3.c
116
return sha3_final(md, ctx->md_data);
lib/libcrypto/evp/m_sha3.c
141
sha3_512_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sha3.c
143
return sha3_init(ctx->md_data, SHA3_512_DIGEST_LENGTH);
lib/libcrypto/evp/m_sha3.c
147
sha3_512_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sha3.c
149
return sha3_update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sha3.c
153
sha3_512_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sha3.c
155
return sha3_final(md, ctx->md_data);
lib/libcrypto/evp/m_sha3.c
24
sha3_224_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sha3.c
26
return sha3_init(ctx->md_data, SHA3_224_DIGEST_LENGTH);
lib/libcrypto/evp/m_sha3.c
30
sha3_224_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sha3.c
32
return sha3_update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sha3.c
36
sha3_224_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sha3.c
38
return sha3_final(md, ctx->md_data);
lib/libcrypto/evp/m_sha3.c
63
sha3_256_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sha3.c
65
return sha3_init(ctx->md_data, SHA3_256_DIGEST_LENGTH);
lib/libcrypto/evp/m_sha3.c
69
sha3_256_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sha3.c
71
return sha3_update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sha3.c
75
sha3_256_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sha3.c
77
return sha3_final(md, ctx->md_data);
lib/libcrypto/evp/m_sigver.c
100
ctx->update = update_oneshot_only;
lib/libcrypto/evp/m_sigver.c
101
} else if (EVP_PKEY_verify_init(ctx->pctx) <= 0)
lib/libcrypto/evp/m_sigver.c
104
if (ctx->pctx->pmeth->signctx_init) {
lib/libcrypto/evp/m_sigver.c
105
if (ctx->pctx->pmeth->signctx_init(ctx->pctx, ctx) <= 0)
lib/libcrypto/evp/m_sigver.c
107
ctx->pctx->operation = EVP_PKEY_OP_SIGNCTX;
lib/libcrypto/evp/m_sigver.c
108
} else if (ctx->pctx->pmeth->digestsign != NULL) {
lib/libcrypto/evp/m_sigver.c
109
ctx->pctx->operation = EVP_PKEY_OP_SIGN;
lib/libcrypto/evp/m_sigver.c
110
ctx->update = update_oneshot_only;
lib/libcrypto/evp/m_sigver.c
111
} else if (EVP_PKEY_sign_init(ctx->pctx) <= 0)
lib/libcrypto/evp/m_sigver.c
114
if (EVP_PKEY_CTX_set_signature_md(ctx->pctx, type) <= 0)
lib/libcrypto/evp/m_sigver.c
117
*pctx = ctx->pctx;
lib/libcrypto/evp/m_sigver.c
118
if (ctx->pctx->pmeth->flags & EVP_PKEY_FLAG_SIGCTX_CUSTOM)
lib/libcrypto/evp/m_sigver.c
120
if (!EVP_DigestInit_ex(ctx, type, NULL))
lib/libcrypto/evp/m_sigver.c
126
EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type,
lib/libcrypto/evp/m_sigver.c
129
return do_sigver_init(ctx, pctx, type, pkey, 0);
lib/libcrypto/evp/m_sigver.c
134
EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type,
lib/libcrypto/evp/m_sigver.c
137
return do_sigver_init(ctx, pctx, type, pkey, 1);
lib/libcrypto/evp/m_sigver.c
142
evp_digestsignfinal_sigctx_custom(EVP_MD_CTX *ctx, unsigned char *sigret,
lib/libcrypto/evp/m_sigver.c
145
EVP_PKEY_CTX *pctx = ctx->pctx;
lib/libcrypto/evp/m_sigver.c
150
return pctx->pmeth->signctx(pctx, sigret, siglen, ctx);
lib/libcrypto/evp/m_sigver.c
156
if (!dctx->pmeth->signctx(dctx, sigret, siglen, ctx))
lib/libcrypto/evp/m_sigver.c
168
EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen)
lib/libcrypto/evp/m_sigver.c
170
EVP_PKEY_CTX *pctx = ctx->pctx;
lib/libcrypto/evp/m_sigver.c
178
return evp_digestsignfinal_sigctx_custom(ctx, sigret, siglen);
lib/libcrypto/evp/m_sigver.c
181
if (ctx->pctx->pmeth->signctx != NULL) {
lib/libcrypto/evp/m_sigver.c
182
if (ctx->pctx->pmeth->signctx(ctx->pctx, NULL,
lib/libcrypto/evp/m_sigver.c
183
siglen, ctx) <= 0)
lib/libcrypto/evp/m_sigver.c
188
if ((s = EVP_MD_size(ctx->digest)) < 0)
lib/libcrypto/evp/m_sigver.c
190
if (EVP_PKEY_sign(ctx->pctx, NULL, siglen, NULL, s) <= 0)
lib/libcrypto/evp/m_sigver.c
199
if (!EVP_MD_CTX_copy_ex(md_ctx, ctx))
lib/libcrypto/evp/m_sigver.c
209
if (EVP_PKEY_sign(ctx->pctx, sigret, siglen, md, mdlen) <= 0)
lib/libcrypto/evp/m_sigver.c
223
EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen,
lib/libcrypto/evp/m_sigver.c
226
if (ctx->pctx->pmeth->digestsign != NULL)
lib/libcrypto/evp/m_sigver.c
227
return ctx->pctx->pmeth->digestsign(ctx, sigret, siglen,
lib/libcrypto/evp/m_sigver.c
231
if (EVP_DigestSignUpdate(ctx, tbs, tbslen) <= 0)
lib/libcrypto/evp/m_sigver.c
235
return EVP_DigestSignFinal(ctx, sigret, siglen);
lib/libcrypto/evp/m_sigver.c
240
EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig, size_t siglen)
lib/libcrypto/evp/m_sigver.c
248
if (!EVP_MD_CTX_copy_ex(&tmp_ctx, ctx))
lib/libcrypto/evp/m_sigver.c
254
return EVP_PKEY_verify(ctx->pctx, sig, siglen, md, mdlen);
lib/libcrypto/evp/m_sigver.c
259
EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret, size_t siglen,
lib/libcrypto/evp/m_sigver.c
262
if (ctx->pctx->pmeth->digestverify != NULL)
lib/libcrypto/evp/m_sigver.c
263
return ctx->pctx->pmeth->digestverify(ctx, sigret, siglen,
lib/libcrypto/evp/m_sigver.c
266
if (EVP_DigestVerifyUpdate(ctx, tbs, tbslen) <= 0)
lib/libcrypto/evp/m_sigver.c
269
return EVP_DigestVerifyFinal(ctx, sigret, siglen);
lib/libcrypto/evp/m_sigver.c
69
update_oneshot_only(EVP_MD_CTX *ctx, const void *data, size_t datalen)
lib/libcrypto/evp/m_sigver.c
76
do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type,
lib/libcrypto/evp/m_sigver.c
79
if (ctx->pctx == NULL)
lib/libcrypto/evp/m_sigver.c
80
ctx->pctx = EVP_PKEY_CTX_new(pkey, NULL);
lib/libcrypto/evp/m_sigver.c
81
if (ctx->pctx == NULL)
lib/libcrypto/evp/m_sigver.c
84
if (!(ctx->pctx->pmeth->flags & EVP_PKEY_FLAG_SIGCTX_CUSTOM)) {
lib/libcrypto/evp/m_sigver.c
98
if (ctx->pctx->pmeth->digestverify != NULL) {
lib/libcrypto/evp/m_sigver.c
99
ctx->pctx->operation = EVP_PKEY_OP_VERIFY;
lib/libcrypto/evp/m_sm3.c
31
sm3_init(EVP_MD_CTX *ctx)
lib/libcrypto/evp/m_sm3.c
33
return SM3_Init(ctx->md_data);
lib/libcrypto/evp/m_sm3.c
37
sm3_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/evp/m_sm3.c
39
return SM3_Update(ctx->md_data, data, count);
lib/libcrypto/evp/m_sm3.c
43
sm3_final(EVP_MD_CTX *ctx, unsigned char *md)
lib/libcrypto/evp/m_sm3.c
45
return SM3_Final(md, ctx->md_data);
lib/libcrypto/evp/p_legacy.c
105
if (!EVP_DecryptInit_ex(ctx, type, NULL, NULL, NULL))
lib/libcrypto/evp/p_legacy.c
130
if ((i <= 0) || !EVP_CIPHER_CTX_set_key_length(ctx, i)) {
lib/libcrypto/evp/p_legacy.c
134
if (!EVP_DecryptInit_ex(ctx, NULL, NULL, key, iv))
lib/libcrypto/evp/p_legacy.c
148
EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
lib/libcrypto/evp/p_legacy.c
152
i = EVP_DecryptFinal_ex(ctx, out, outl);
lib/libcrypto/evp/p_legacy.c
154
i = EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, NULL);
lib/libcrypto/evp/p_legacy.c
160
EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek,
lib/libcrypto/evp/p_legacy.c
168
if (!EVP_EncryptInit_ex(ctx, type, NULL, NULL, NULL))
lib/libcrypto/evp/p_legacy.c
181
if (EVP_CIPHER_CTX_rand_key(ctx, key) <= 0)
lib/libcrypto/evp/p_legacy.c
184
if ((iv_len = EVP_CIPHER_CTX_iv_length(ctx)) < 0)
lib/libcrypto/evp/p_legacy.c
189
if (!EVP_EncryptInit_ex(ctx, NULL, NULL, key, iv))
lib/libcrypto/evp/p_legacy.c
194
EVP_CIPHER_CTX_key_length(ctx), pubk[i]);
lib/libcrypto/evp/p_legacy.c
210
EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
lib/libcrypto/evp/p_legacy.c
214
i = EVP_EncryptFinal_ex(ctx, out, outl);
lib/libcrypto/evp/p_legacy.c
216
i = EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, NULL);
lib/libcrypto/evp/p_legacy.c
97
EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
lib/libcrypto/evp/p_sign.c
68
EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen,
lib/libcrypto/evp/p_sign.c
82
if (!EVP_MD_CTX_copy_ex(md_ctx, ctx))
lib/libcrypto/evp/p_sign.c
93
if (EVP_PKEY_CTX_set_signature_md(pkctx, ctx->digest) <= 0)
lib/libcrypto/evp/p_verify.c
68
EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
lib/libcrypto/evp/p_verify.c
79
if (!EVP_MD_CTX_copy_ex(md_ctx, ctx))
lib/libcrypto/evp/p_verify.c
89
if (EVP_PKEY_CTX_set_signature_md(pkctx, ctx->digest) <= 0)
lib/libcrypto/evp/pmeth_fn.c
104
EVP_PKEY_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
lib/libcrypto/evp/pmeth_fn.c
107
if (!ctx || !ctx->pmeth || !ctx->pmeth->sign) {
lib/libcrypto/evp/pmeth_fn.c
111
if (ctx->operation != EVP_PKEY_OP_SIGN) {
lib/libcrypto/evp/pmeth_fn.c
115
M_check_autoarg(ctx, sig, siglen, EVP_F_EVP_PKEY_SIGN)
lib/libcrypto/evp/pmeth_fn.c
116
return ctx->pmeth->sign(ctx, sig, siglen, tbs, tbslen);
lib/libcrypto/evp/pmeth_fn.c
121
EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_fn.c
125
if (!ctx || !ctx->pmeth || !ctx->pmeth->verify) {
lib/libcrypto/evp/pmeth_fn.c
129
ctx->operation = EVP_PKEY_OP_VERIFY;
lib/libcrypto/evp/pmeth_fn.c
130
if (!ctx->pmeth->verify_init)
lib/libcrypto/evp/pmeth_fn.c
132
ret = ctx->pmeth->verify_init(ctx);
lib/libcrypto/evp/pmeth_fn.c
134
ctx->operation = EVP_PKEY_OP_UNDEFINED;
lib/libcrypto/evp/pmeth_fn.c
140
EVP_PKEY_verify(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen,
lib/libcrypto/evp/pmeth_fn.c
143
if (!ctx || !ctx->pmeth || !ctx->pmeth->verify) {
lib/libcrypto/evp/pmeth_fn.c
147
if (ctx->operation != EVP_PKEY_OP_VERIFY) {
lib/libcrypto/evp/pmeth_fn.c
151
return ctx->pmeth->verify(ctx, sig, siglen, tbs, tbslen);
lib/libcrypto/evp/pmeth_fn.c
156
EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_fn.c
158
if (ctx == NULL || ctx->pmeth == NULL ||
lib/libcrypto/evp/pmeth_fn.c
159
ctx->pmeth->verify_recover == NULL) {
lib/libcrypto/evp/pmeth_fn.c
164
ctx->operation = EVP_PKEY_OP_VERIFYRECOVER;
lib/libcrypto/evp/pmeth_fn.c
171
EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, unsigned char *rout, size_t *routlen,
lib/libcrypto/evp/pmeth_fn.c
174
if (!ctx || !ctx->pmeth || !ctx->pmeth->verify_recover) {
lib/libcrypto/evp/pmeth_fn.c
178
if (ctx->operation != EVP_PKEY_OP_VERIFYRECOVER) {
lib/libcrypto/evp/pmeth_fn.c
182
M_check_autoarg(ctx, rout, routlen, EVP_F_EVP_PKEY_VERIFY_RECOVER)
lib/libcrypto/evp/pmeth_fn.c
183
return ctx->pmeth->verify_recover(ctx, rout, routlen, sig, siglen);
lib/libcrypto/evp/pmeth_fn.c
188
EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_fn.c
190
if (ctx == NULL || ctx->pmeth == NULL || ctx->pmeth->encrypt == NULL) {
lib/libcrypto/evp/pmeth_fn.c
195
ctx->operation = EVP_PKEY_OP_ENCRYPT;
lib/libcrypto/evp/pmeth_fn.c
202
EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
lib/libcrypto/evp/pmeth_fn.c
205
if (!ctx || !ctx->pmeth || !ctx->pmeth->encrypt) {
lib/libcrypto/evp/pmeth_fn.c
209
if (ctx->operation != EVP_PKEY_OP_ENCRYPT) {
lib/libcrypto/evp/pmeth_fn.c
213
M_check_autoarg(ctx, out, outlen, EVP_F_EVP_PKEY_ENCRYPT)
lib/libcrypto/evp/pmeth_fn.c
214
return ctx->pmeth->encrypt(ctx, out, outlen, in, inlen);
lib/libcrypto/evp/pmeth_fn.c
219
EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_fn.c
221
if (ctx == NULL || ctx->pmeth == NULL || ctx->pmeth->decrypt == NULL) {
lib/libcrypto/evp/pmeth_fn.c
226
ctx->operation = EVP_PKEY_OP_DECRYPT;
lib/libcrypto/evp/pmeth_fn.c
233
EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
lib/libcrypto/evp/pmeth_fn.c
236
if (!ctx || !ctx->pmeth || !ctx->pmeth->decrypt) {
lib/libcrypto/evp/pmeth_fn.c
240
if (ctx->operation != EVP_PKEY_OP_DECRYPT) {
lib/libcrypto/evp/pmeth_fn.c
244
M_check_autoarg(ctx, out, outlen, EVP_F_EVP_PKEY_DECRYPT)
lib/libcrypto/evp/pmeth_fn.c
245
return ctx->pmeth->decrypt(ctx, out, outlen, in, inlen);
lib/libcrypto/evp/pmeth_fn.c
250
EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_fn.c
254
if (!ctx || !ctx->pmeth || !ctx->pmeth->derive) {
lib/libcrypto/evp/pmeth_fn.c
258
ctx->operation = EVP_PKEY_OP_DERIVE;
lib/libcrypto/evp/pmeth_fn.c
259
if (!ctx->pmeth->derive_init)
lib/libcrypto/evp/pmeth_fn.c
261
ret = ctx->pmeth->derive_init(ctx);
lib/libcrypto/evp/pmeth_fn.c
263
ctx->operation = EVP_PKEY_OP_UNDEFINED;
lib/libcrypto/evp/pmeth_fn.c
269
EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer)
lib/libcrypto/evp/pmeth_fn.c
273
if (!ctx || !ctx->pmeth || !(ctx->pmeth->derive ||
lib/libcrypto/evp/pmeth_fn.c
274
ctx->pmeth->encrypt || ctx->pmeth->decrypt) ||
lib/libcrypto/evp/pmeth_fn.c
275
!ctx->pmeth->ctrl) {
lib/libcrypto/evp/pmeth_fn.c
279
if (ctx->operation != EVP_PKEY_OP_DERIVE &&
lib/libcrypto/evp/pmeth_fn.c
280
ctx->operation != EVP_PKEY_OP_ENCRYPT &&
lib/libcrypto/evp/pmeth_fn.c
281
ctx->operation != EVP_PKEY_OP_DECRYPT) {
lib/libcrypto/evp/pmeth_fn.c
286
ret = ctx->pmeth->ctrl(ctx, EVP_PKEY_CTRL_PEER_KEY, 0, peer);
lib/libcrypto/evp/pmeth_fn.c
294
if (!ctx->pkey) {
lib/libcrypto/evp/pmeth_fn.c
299
if (ctx->pkey->type != peer->type) {
lib/libcrypto/evp/pmeth_fn.c
310
!EVP_PKEY_cmp_parameters(ctx->pkey, peer)) {
lib/libcrypto/evp/pmeth_fn.c
315
EVP_PKEY_free(ctx->peerkey);
lib/libcrypto/evp/pmeth_fn.c
316
ctx->peerkey = peer;
lib/libcrypto/evp/pmeth_fn.c
318
ret = ctx->pmeth->ctrl(ctx, EVP_PKEY_CTRL_PEER_KEY, 1, peer);
lib/libcrypto/evp/pmeth_fn.c
321
ctx->peerkey = NULL;
lib/libcrypto/evp/pmeth_fn.c
331
EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *pkeylen)
lib/libcrypto/evp/pmeth_fn.c
333
if (!ctx || !ctx->pmeth || !ctx->pmeth->derive) {
lib/libcrypto/evp/pmeth_fn.c
337
if (ctx->operation != EVP_PKEY_OP_DERIVE) {
lib/libcrypto/evp/pmeth_fn.c
341
M_check_autoarg(ctx, key, pkeylen, EVP_F_EVP_PKEY_DERIVE)
lib/libcrypto/evp/pmeth_fn.c
342
return ctx->pmeth->derive(ctx, key, pkeylen);
lib/libcrypto/evp/pmeth_fn.c
68
#define M_check_autoarg(ctx, arg, arglen, err) \
lib/libcrypto/evp/pmeth_fn.c
69
if (ctx->pmeth->flags & EVP_PKEY_FLAG_AUTOARGLEN) \
lib/libcrypto/evp/pmeth_fn.c
71
size_t pksize = (size_t)EVP_PKEY_size(ctx->pkey); \
lib/libcrypto/evp/pmeth_fn.c
85
EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_fn.c
89
if (!ctx || !ctx->pmeth || !ctx->pmeth->sign) {
lib/libcrypto/evp/pmeth_fn.c
93
ctx->operation = EVP_PKEY_OP_SIGN;
lib/libcrypto/evp/pmeth_fn.c
94
if (!ctx->pmeth->sign_init)
lib/libcrypto/evp/pmeth_fn.c
96
ret = ctx->pmeth->sign_init(ctx);
lib/libcrypto/evp/pmeth_fn.c
98
ctx->operation = EVP_PKEY_OP_UNDEFINED;
lib/libcrypto/evp/pmeth_gn.c
108
if ((ret = ctx->pmeth->paramgen(ctx, *ppkey)) <= 0) {
lib/libcrypto/evp/pmeth_gn.c
118
EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_gn.c
120
if (ctx == NULL || ctx->pmeth == NULL || ctx->pmeth->keygen == NULL) {
lib/libcrypto/evp/pmeth_gn.c
125
ctx->operation = EVP_PKEY_OP_KEYGEN;
lib/libcrypto/evp/pmeth_gn.c
132
EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey)
lib/libcrypto/evp/pmeth_gn.c
136
if (ctx == NULL || ctx->pmeth == NULL || ctx->pmeth->keygen == NULL) {
lib/libcrypto/evp/pmeth_gn.c
140
if (ctx->operation != EVP_PKEY_OP_KEYGEN) {
lib/libcrypto/evp/pmeth_gn.c
153
if ((ret = ctx->pmeth->keygen(ctx, *ppkey)) <= 0) {
lib/libcrypto/evp/pmeth_gn.c
163
EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb)
lib/libcrypto/evp/pmeth_gn.c
165
ctx->pkey_gencb = cb;
lib/libcrypto/evp/pmeth_gn.c
170
EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_gn.c
172
return ctx->pkey_gencb;
lib/libcrypto/evp/pmeth_gn.c
183
EVP_PKEY_CTX *ctx = gcb->arg;
lib/libcrypto/evp/pmeth_gn.c
184
ctx->keygen_info[0] = a;
lib/libcrypto/evp/pmeth_gn.c
185
ctx->keygen_info[1] = b;
lib/libcrypto/evp/pmeth_gn.c
186
return ctx->pkey_gencb(ctx);
lib/libcrypto/evp/pmeth_gn.c
190
evp_pkey_set_cb_translate(BN_GENCB *cb, EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_gn.c
192
BN_GENCB_set(cb, trans_cb, ctx);
lib/libcrypto/evp/pmeth_gn.c
196
EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx)
lib/libcrypto/evp/pmeth_gn.c
199
return ctx->keygen_info_count;
lib/libcrypto/evp/pmeth_gn.c
200
if (idx < 0 || idx >= ctx->keygen_info_count)
lib/libcrypto/evp/pmeth_gn.c
202
return ctx->keygen_info[idx];
lib/libcrypto/evp/pmeth_gn.c
72
EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_gn.c
74
if (ctx == NULL || ctx->pmeth == NULL || ctx->pmeth->paramgen == NULL) {
lib/libcrypto/evp/pmeth_gn.c
79
ctx->operation = EVP_PKEY_OP_PARAMGEN;
lib/libcrypto/evp/pmeth_gn.c
86
EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey)
lib/libcrypto/evp/pmeth_gn.c
90
if (ctx == NULL || ctx->pmeth == NULL || ctx->pmeth->paramgen == NULL) {
lib/libcrypto/evp/pmeth_gn.c
95
if (ctx->operation != EVP_PKEY_OP_PARAMGEN) {
lib/libcrypto/evp/pmeth_lib.c
202
EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_lib.c
204
if (ctx == NULL)
lib/libcrypto/evp/pmeth_lib.c
206
if (ctx->pmeth && ctx->pmeth->cleanup)
lib/libcrypto/evp/pmeth_lib.c
207
ctx->pmeth->cleanup(ctx);
lib/libcrypto/evp/pmeth_lib.c
208
EVP_PKEY_free(ctx->pkey);
lib/libcrypto/evp/pmeth_lib.c
209
EVP_PKEY_free(ctx->peerkey);
lib/libcrypto/evp/pmeth_lib.c
210
free(ctx);
lib/libcrypto/evp/pmeth_lib.c
215
EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd,
lib/libcrypto/evp/pmeth_lib.c
220
if (!ctx || !ctx->pmeth || !ctx->pmeth->ctrl) {
lib/libcrypto/evp/pmeth_lib.c
224
if ((keytype != -1) && (ctx->pmeth->pkey_id != keytype))
lib/libcrypto/evp/pmeth_lib.c
227
if (ctx->operation == EVP_PKEY_OP_UNDEFINED) {
lib/libcrypto/evp/pmeth_lib.c
232
if ((optype != -1) && !(ctx->operation & optype)) {
lib/libcrypto/evp/pmeth_lib.c
237
ret = ctx->pmeth->ctrl(ctx, cmd, p1, p2);
lib/libcrypto/evp/pmeth_lib.c
253
EVP_PKEY_CTX_ctrl_str(EVP_PKEY_CTX *ctx, const char *name, const char *value)
lib/libcrypto/evp/pmeth_lib.c
255
if (!ctx || !ctx->pmeth || !ctx->pmeth->ctrl_str) {
lib/libcrypto/evp/pmeth_lib.c
260
return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_TYPE_SIG,
lib/libcrypto/evp/pmeth_lib.c
263
return ctx->pmeth->ctrl_str(ctx, name, value);
lib/libcrypto/evp/pmeth_lib.c
268
EVP_PKEY_CTX_str2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *str)
lib/libcrypto/evp/pmeth_lib.c
275
return ctx->pmeth->ctrl(ctx, cmd, len, (void *)str);
lib/libcrypto/evp/pmeth_lib.c
279
EVP_PKEY_CTX_hex2ctrl(EVP_PKEY_CTX *ctx, int cmd, const char *hexstr)
lib/libcrypto/evp/pmeth_lib.c
292
ret = ctx->pmeth->ctrl(ctx, cmd, length, hex);
lib/libcrypto/evp/pmeth_lib.c
300
EVP_PKEY_CTX_md(EVP_PKEY_CTX *ctx, int optype, int cmd, const char *md_name)
lib/libcrypto/evp/pmeth_lib.c
308
return EVP_PKEY_CTX_ctrl(ctx, -1, optype, cmd, 0, (void *)md);
lib/libcrypto/evp/pmeth_lib.c
312
EVP_PKEY_CTX_get_operation(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_lib.c
314
return ctx->operation;
lib/libcrypto/evp/pmeth_lib.c
319
EVP_PKEY_CTX_set0_keygen_info(EVP_PKEY_CTX *ctx, int *dat, int datlen)
lib/libcrypto/evp/pmeth_lib.c
321
ctx->keygen_info = dat;
lib/libcrypto/evp/pmeth_lib.c
322
ctx->keygen_info_count = datlen;
lib/libcrypto/evp/pmeth_lib.c
327
EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data)
lib/libcrypto/evp/pmeth_lib.c
329
ctx->data = data;
lib/libcrypto/evp/pmeth_lib.c
334
EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_lib.c
336
return ctx->data;
lib/libcrypto/evp/pmeth_lib.c
341
EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_lib.c
343
return ctx->pkey;
lib/libcrypto/evp/pmeth_lib.c
348
EVP_PKEY_CTX_get0_peerkey(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_lib.c
350
return ctx->peerkey;
lib/libcrypto/evp/pmeth_lib.c
355
EVP_PKEY_CTX_set_app_data(EVP_PKEY_CTX *ctx, void *data)
lib/libcrypto/evp/pmeth_lib.c
357
ctx->app_data = data;
lib/libcrypto/evp/pmeth_lib.c
362
EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx)
lib/libcrypto/evp/pmeth_lib.c
364
return ctx->app_data;
lib/libcrypto/hmac/hm_pmeth.c
105
HMAC_CTX_init(&dctx->ctx);
lib/libcrypto/hmac/hm_pmeth.c
106
if (!HMAC_CTX_copy(&dctx->ctx, &sctx->ctx))
lib/libcrypto/hmac/hm_pmeth.c
117
pkey_hmac_cleanup(EVP_PKEY_CTX *ctx)
lib/libcrypto/hmac/hm_pmeth.c
121
if ((hctx = ctx->data) == NULL)
lib/libcrypto/hmac/hm_pmeth.c
124
HMAC_CTX_cleanup(&hctx->ctx);
lib/libcrypto/hmac/hm_pmeth.c
130
pkey_hmac_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
lib/libcrypto/hmac/hm_pmeth.c
133
HMAC_PKEY_CTX *hctx = ctx->data;
lib/libcrypto/hmac/hm_pmeth.c
153
int_update(EVP_MD_CTX *ctx, const void *data, size_t count)
lib/libcrypto/hmac/hm_pmeth.c
155
HMAC_PKEY_CTX *hctx = ctx->pctx->data;
lib/libcrypto/hmac/hm_pmeth.c
157
if (!HMAC_Update(&hctx->ctx, data, count))
lib/libcrypto/hmac/hm_pmeth.c
163
hmac_signctx_init(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx)
lib/libcrypto/hmac/hm_pmeth.c
165
HMAC_PKEY_CTX *hctx = ctx->data;
lib/libcrypto/hmac/hm_pmeth.c
167
HMAC_CTX_set_flags(&hctx->ctx, mctx->flags & ~EVP_MD_CTX_FLAG_NO_INIT);
lib/libcrypto/hmac/hm_pmeth.c
174
hmac_signctx(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
lib/libcrypto/hmac/hm_pmeth.c
178
HMAC_PKEY_CTX *hctx = ctx->data;
lib/libcrypto/hmac/hm_pmeth.c
187
if (!HMAC_Final(&hctx->ctx, sig, &hlen))
lib/libcrypto/hmac/hm_pmeth.c
194
pkey_hmac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
lib/libcrypto/hmac/hm_pmeth.c
196
HMAC_PKEY_CTX *hctx = ctx->data;
lib/libcrypto/hmac/hm_pmeth.c
212
key = ctx->pkey->pkey.ptr;
lib/libcrypto/hmac/hm_pmeth.c
213
if (!HMAC_Init_ex(&hctx->ctx, key->data, key->length, hctx->md,
lib/libcrypto/hmac/hm_pmeth.c
225
pkey_hmac_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
lib/libcrypto/hmac/hm_pmeth.c
231
return pkey_hmac_ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY, -1, p);
lib/libcrypto/hmac/hm_pmeth.c
240
r = pkey_hmac_ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY, keylen, key);
lib/libcrypto/hmac/hm_pmeth.c
75
HMAC_CTX ctx;
lib/libcrypto/hmac/hm_pmeth.c
79
pkey_hmac_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/hmac/hm_pmeth.c
87
HMAC_CTX_init(&hctx->ctx);
lib/libcrypto/hmac/hm_pmeth.c
89
ctx->data = hctx;
lib/libcrypto/hmac/hm_pmeth.c
90
ctx->keygen_info_count = 0;
lib/libcrypto/hmac/hmac.c
100
if (!EVP_DigestFinal_ex(&(ctx->md_ctx), ctx->key,
lib/libcrypto/hmac/hmac.c
101
&ctx->key_length))
lib/libcrypto/hmac/hmac.c
104
if (len < 0 || (size_t)len > sizeof(ctx->key)) {
lib/libcrypto/hmac/hmac.c
108
memcpy(ctx->key, key, len);
lib/libcrypto/hmac/hmac.c
109
ctx->key_length = len;
lib/libcrypto/hmac/hmac.c
111
if (ctx->key_length != HMAC_MAX_MD_CBLOCK)
lib/libcrypto/hmac/hmac.c
112
memset(&ctx->key[ctx->key_length], 0,
lib/libcrypto/hmac/hmac.c
113
HMAC_MAX_MD_CBLOCK - ctx->key_length);
lib/libcrypto/hmac/hmac.c
118
pad[i] = 0x36 ^ ctx->key[i];
lib/libcrypto/hmac/hmac.c
119
if (!EVP_DigestInit_ex(&ctx->i_ctx, md, impl))
lib/libcrypto/hmac/hmac.c
121
if (!EVP_DigestUpdate(&ctx->i_ctx, pad, EVP_MD_block_size(md)))
lib/libcrypto/hmac/hmac.c
125
pad[i] = 0x5c ^ ctx->key[i];
lib/libcrypto/hmac/hmac.c
126
if (!EVP_DigestInit_ex(&ctx->o_ctx, md, impl))
lib/libcrypto/hmac/hmac.c
128
if (!EVP_DigestUpdate(&ctx->o_ctx, pad, EVP_MD_block_size(md)))
lib/libcrypto/hmac/hmac.c
131
if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->i_ctx))
lib/libcrypto/hmac/hmac.c
140
HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len)
lib/libcrypto/hmac/hmac.c
142
if (ctx->md == NULL)
lib/libcrypto/hmac/hmac.c
145
return EVP_DigestUpdate(&ctx->md_ctx, data, len);
lib/libcrypto/hmac/hmac.c
150
HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len)
lib/libcrypto/hmac/hmac.c
155
if (ctx->md == NULL)
lib/libcrypto/hmac/hmac.c
158
if (!EVP_DigestFinal_ex(&ctx->md_ctx, buf, &i))
lib/libcrypto/hmac/hmac.c
160
if (!EVP_MD_CTX_copy_ex(&ctx->md_ctx, &ctx->o_ctx))
lib/libcrypto/hmac/hmac.c
162
if (!EVP_DigestUpdate(&ctx->md_ctx, buf, i))
lib/libcrypto/hmac/hmac.c
164
if (!EVP_DigestFinal_ex(&ctx->md_ctx, md, len))
lib/libcrypto/hmac/hmac.c
180
HMAC_CTX_free(HMAC_CTX *ctx)
lib/libcrypto/hmac/hmac.c
182
if (ctx == NULL)
lib/libcrypto/hmac/hmac.c
185
HMAC_CTX_cleanup(ctx);
lib/libcrypto/hmac/hmac.c
187
free(ctx);
lib/libcrypto/hmac/hmac.c
192
HMAC_CTX_reset(HMAC_CTX *ctx)
lib/libcrypto/hmac/hmac.c
194
HMAC_CTX_cleanup(ctx);
lib/libcrypto/hmac/hmac.c
195
HMAC_CTX_init(ctx);
lib/libcrypto/hmac/hmac.c
201
HMAC_CTX_init(HMAC_CTX *ctx)
lib/libcrypto/hmac/hmac.c
203
EVP_MD_CTX_legacy_clear(&ctx->i_ctx);
lib/libcrypto/hmac/hmac.c
204
EVP_MD_CTX_legacy_clear(&ctx->o_ctx);
lib/libcrypto/hmac/hmac.c
205
EVP_MD_CTX_legacy_clear(&ctx->md_ctx);
lib/libcrypto/hmac/hmac.c
206
ctx->md = NULL;
lib/libcrypto/hmac/hmac.c
228
HMAC_CTX_cleanup(HMAC_CTX *ctx)
lib/libcrypto/hmac/hmac.c
230
EVP_MD_CTX_cleanup(&ctx->i_ctx);
lib/libcrypto/hmac/hmac.c
231
EVP_MD_CTX_cleanup(&ctx->o_ctx);
lib/libcrypto/hmac/hmac.c
232
EVP_MD_CTX_cleanup(&ctx->md_ctx);
lib/libcrypto/hmac/hmac.c
233
explicit_bzero(ctx, sizeof(*ctx));
lib/libcrypto/hmac/hmac.c
237
HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags)
lib/libcrypto/hmac/hmac.c
239
EVP_MD_CTX_set_flags(&ctx->i_ctx, flags);
lib/libcrypto/hmac/hmac.c
240
EVP_MD_CTX_set_flags(&ctx->o_ctx, flags);
lib/libcrypto/hmac/hmac.c
241
EVP_MD_CTX_set_flags(&ctx->md_ctx, flags);
lib/libcrypto/hmac/hmac.c
246
HMAC_CTX_get_md(const HMAC_CTX *ctx)
lib/libcrypto/hmac/hmac.c
248
return ctx->md;
lib/libcrypto/hmac/hmac.c
70
HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md,
lib/libcrypto/hmac/hmac.c
77
if (md != NULL && md != ctx->md && (key == NULL || len < 0))
lib/libcrypto/hmac/hmac.c
82
ctx->md = md;
lib/libcrypto/hmac/hmac.c
83
} else if (ctx->md != NULL)
lib/libcrypto/hmac/hmac.c
84
md = ctx->md;
lib/libcrypto/hmac/hmac.c
91
if ((size_t)j > sizeof(ctx->key)) {
lib/libcrypto/hmac/hmac.c
96
if (!EVP_DigestInit_ex(&ctx->md_ctx, md, impl))
lib/libcrypto/hmac/hmac.c
98
if (!EVP_DigestUpdate(&ctx->md_ctx, key, len))
lib/libcrypto/hmac/hmac.h
78
void HMAC_CTX_free(HMAC_CTX *ctx);
lib/libcrypto/hmac/hmac.h
79
int HMAC_CTX_reset(HMAC_CTX *ctx);
lib/libcrypto/hmac/hmac.h
81
int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md,
lib/libcrypto/hmac/hmac.h
84
int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len)
lib/libcrypto/hmac/hmac.h
86
int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
lib/libcrypto/hmac/hmac.h
94
void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
lib/libcrypto/hmac/hmac.h
95
const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx);
lib/libcrypto/hmac/hmac_local.h
78
void HMAC_CTX_init(HMAC_CTX *ctx);
lib/libcrypto/hmac/hmac_local.h
79
void HMAC_CTX_cleanup(HMAC_CTX *ctx);
lib/libcrypto/kdf/hkdf_evp.c
102
pkey_hkdf_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
lib/libcrypto/kdf/hkdf_evp.c
104
HKDF_PKEY_CTX *kctx = ctx->data;
lib/libcrypto/kdf/hkdf_evp.c
169
pkey_hkdf_ctrl_str(EVP_PKEY_CTX *ctx, const char *type,
lib/libcrypto/kdf/hkdf_evp.c
184
return EVP_PKEY_CTX_hkdf_mode(ctx, mode);
lib/libcrypto/kdf/hkdf_evp.c
188
return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_DERIVE,
lib/libcrypto/kdf/hkdf_evp.c
192
return EVP_PKEY_CTX_str2ctrl(ctx, EVP_PKEY_CTRL_HKDF_SALT,
lib/libcrypto/kdf/hkdf_evp.c
196
return EVP_PKEY_CTX_hex2ctrl(ctx, EVP_PKEY_CTRL_HKDF_SALT,
lib/libcrypto/kdf/hkdf_evp.c
200
return EVP_PKEY_CTX_str2ctrl(ctx, EVP_PKEY_CTRL_HKDF_KEY, value);
lib/libcrypto/kdf/hkdf_evp.c
203
return EVP_PKEY_CTX_hex2ctrl(ctx, EVP_PKEY_CTRL_HKDF_KEY, value);
lib/libcrypto/kdf/hkdf_evp.c
206
return EVP_PKEY_CTX_str2ctrl(ctx, EVP_PKEY_CTRL_HKDF_INFO,
lib/libcrypto/kdf/hkdf_evp.c
210
return EVP_PKEY_CTX_hex2ctrl(ctx, EVP_PKEY_CTRL_HKDF_INFO,
lib/libcrypto/kdf/hkdf_evp.c
218
pkey_hkdf_derive_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/kdf/hkdf_evp.c
220
HKDF_PKEY_CTX *kctx = ctx->data;
lib/libcrypto/kdf/hkdf_evp.c
230
pkey_hkdf_derive(EVP_PKEY_CTX *ctx, unsigned char *key,
lib/libcrypto/kdf/hkdf_evp.c
233
HKDF_PKEY_CTX *kctx = ctx->data;
lib/libcrypto/kdf/hkdf_evp.c
74
pkey_hkdf_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/kdf/hkdf_evp.c
83
ctx->data = kctx;
lib/libcrypto/kdf/hkdf_evp.c
89
pkey_hkdf_cleanup(EVP_PKEY_CTX *ctx)
lib/libcrypto/kdf/hkdf_evp.c
91
HKDF_PKEY_CTX *kctx = ctx->data;
lib/libcrypto/kdf/tls1_prf.c
107
pkey_tls1_prf_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
lib/libcrypto/kdf/tls1_prf.c
109
struct tls1_prf_ctx *kctx = ctx->data;
lib/libcrypto/kdf/tls1_prf.c
152
pkey_tls1_prf_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
lib/libcrypto/kdf/tls1_prf.c
159
struct tls1_prf_ctx *kctx = ctx->data;
lib/libcrypto/kdf/tls1_prf.c
170
return EVP_PKEY_CTX_str2ctrl(ctx, EVP_PKEY_CTRL_TLS_SECRET, value);
lib/libcrypto/kdf/tls1_prf.c
172
return EVP_PKEY_CTX_hex2ctrl(ctx, EVP_PKEY_CTRL_TLS_SECRET, value);
lib/libcrypto/kdf/tls1_prf.c
174
return EVP_PKEY_CTX_str2ctrl(ctx, EVP_PKEY_CTRL_TLS_SEED, value);
lib/libcrypto/kdf/tls1_prf.c
176
return EVP_PKEY_CTX_hex2ctrl(ctx, EVP_PKEY_CTRL_TLS_SEED, value);
lib/libcrypto/kdf/tls1_prf.c
187
EVP_MD_CTX *ctx = NULL, *ctx_tmp = NULL, *ctx_init = NULL;
lib/libcrypto/kdf/tls1_prf.c
196
if ((ctx = EVP_MD_CTX_new()) == NULL)
lib/libcrypto/kdf/tls1_prf.c
211
if (!EVP_MD_CTX_copy_ex(ctx, ctx_init))
lib/libcrypto/kdf/tls1_prf.c
213
if (seed != NULL && !EVP_DigestSignUpdate(ctx, seed, seed_len))
lib/libcrypto/kdf/tls1_prf.c
215
if (!EVP_DigestSignFinal(ctx, A1, &A1_len))
lib/libcrypto/kdf/tls1_prf.c
220
if (!EVP_MD_CTX_copy_ex(ctx, ctx_init))
lib/libcrypto/kdf/tls1_prf.c
222
if (!EVP_DigestSignUpdate(ctx, A1, A1_len))
lib/libcrypto/kdf/tls1_prf.c
224
if (out_len > (size_t)chunk && !EVP_MD_CTX_copy_ex(ctx_tmp, ctx))
lib/libcrypto/kdf/tls1_prf.c
226
if (seed != NULL && !EVP_DigestSignUpdate(ctx, seed, seed_len))
lib/libcrypto/kdf/tls1_prf.c
231
if (!EVP_DigestSignFinal(ctx, out, &mac_len))
lib/libcrypto/kdf/tls1_prf.c
238
if (!EVP_DigestSignFinal(ctx, A1, &A1_len))
lib/libcrypto/kdf/tls1_prf.c
249
EVP_MD_CTX_free(ctx);
lib/libcrypto/kdf/tls1_prf.c
295
pkey_tls1_prf_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *key_len)
lib/libcrypto/kdf/tls1_prf.c
297
struct tls1_prf_ctx *kctx = ctx->data;
lib/libcrypto/kdf/tls1_prf.c
81
pkey_tls1_prf_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/kdf/tls1_prf.c
89
ctx->data = kctx;
lib/libcrypto/kdf/tls1_prf.c
95
pkey_tls1_prf_cleanup(EVP_PKEY_CTX *ctx)
lib/libcrypto/kdf/tls1_prf.c
97
struct tls1_prf_ctx *kctx = ctx->data;
lib/libcrypto/mlkem/mlkem_internal.c
40
sha3_ctx ctx;
lib/libcrypto/mlkem/mlkem_internal.c
41
shake256_init(&ctx);
lib/libcrypto/mlkem/mlkem_internal.c
42
shake_update(&ctx, in, 33);
lib/libcrypto/mlkem/mlkem_internal.c
43
shake_xof(&ctx);
lib/libcrypto/mlkem/mlkem_internal.c
44
shake_out(&ctx, out, out_len);
lib/libcrypto/mlkem/mlkem_internal.c
51
sha3_ctx ctx;
lib/libcrypto/mlkem/mlkem_internal.c
52
sha3_init(&ctx, 32);
lib/libcrypto/mlkem/mlkem_internal.c
53
sha3_update(&ctx, in, len);
lib/libcrypto/mlkem/mlkem_internal.c
54
sha3_final(out, &ctx);
lib/libcrypto/mlkem/mlkem_internal.c
60
sha3_ctx ctx;
lib/libcrypto/mlkem/mlkem_internal.c
61
sha3_init(&ctx, 64);
lib/libcrypto/mlkem/mlkem_internal.c
62
sha3_update(&ctx, in, len);
lib/libcrypto/mlkem/mlkem_internal.c
63
sha3_final(out, &ctx);
lib/libcrypto/mlkem/mlkem_internal.c
71
sha3_ctx ctx;
lib/libcrypto/mlkem/mlkem_internal.c
72
shake256_init(&ctx);
lib/libcrypto/mlkem/mlkem_internal.c
73
shake_update(&ctx, failure_secret, 32);
lib/libcrypto/mlkem/mlkem_internal.c
74
shake_update(&ctx, in, len);
lib/libcrypto/mlkem/mlkem_internal.c
75
shake_xof(&ctx);
lib/libcrypto/mlkem/mlkem_internal.c
76
shake_out(&ctx, out, MLKEM_SHARED_SECRET_LENGTH);
lib/libcrypto/modes/ccm128.c
105
CRYPTO_ccm128_aad(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/ccm128.c
109
block128_f block = ctx->block;
lib/libcrypto/modes/ccm128.c
114
ctx->nonce.c[0] |= 0x40; /* set Adata flag */
lib/libcrypto/modes/ccm128.c
115
(*block)(ctx->nonce.c, ctx->cmac.c, ctx->key),
lib/libcrypto/modes/ccm128.c
116
ctx->blocks++;
lib/libcrypto/modes/ccm128.c
119
ctx->cmac.c[0] ^= (uint8_t)(alen >> 8);
lib/libcrypto/modes/ccm128.c
120
ctx->cmac.c[1] ^= (uint8_t)alen;
lib/libcrypto/modes/ccm128.c
124
ctx->cmac.c[0] ^= 0xFF;
lib/libcrypto/modes/ccm128.c
125
ctx->cmac.c[1] ^= 0xFF;
lib/libcrypto/modes/ccm128.c
126
ctx->cmac.c[2] ^= (uint8_t)(alen >> (56 % (sizeof(alen)*8)));
lib/libcrypto/modes/ccm128.c
127
ctx->cmac.c[3] ^= (uint8_t)(alen >> (48 % (sizeof(alen)*8)));
lib/libcrypto/modes/ccm128.c
128
ctx->cmac.c[4] ^= (uint8_t)(alen >> (40 % (sizeof(alen)*8)));
lib/libcrypto/modes/ccm128.c
129
ctx->cmac.c[5] ^= (uint8_t)(alen >> (32 % (sizeof(alen)*8)));
lib/libcrypto/modes/ccm128.c
130
ctx->cmac.c[6] ^= (uint8_t)(alen >> 24);
lib/libcrypto/modes/ccm128.c
131
ctx->cmac.c[7] ^= (uint8_t)(alen >> 16);
lib/libcrypto/modes/ccm128.c
132
ctx->cmac.c[8] ^= (uint8_t)(alen >> 8);
lib/libcrypto/modes/ccm128.c
133
ctx->cmac.c[9] ^= (uint8_t)alen;
lib/libcrypto/modes/ccm128.c
136
ctx->cmac.c[0] ^= 0xFF;
lib/libcrypto/modes/ccm128.c
137
ctx->cmac.c[1] ^= 0xFE;
lib/libcrypto/modes/ccm128.c
138
ctx->cmac.c[2] ^= (uint8_t)(alen >> 24);
lib/libcrypto/modes/ccm128.c
139
ctx->cmac.c[3] ^= (uint8_t)(alen >> 16);
lib/libcrypto/modes/ccm128.c
140
ctx->cmac.c[4] ^= (uint8_t)(alen >> 8);
lib/libcrypto/modes/ccm128.c
141
ctx->cmac.c[5] ^= (uint8_t)alen;
lib/libcrypto/modes/ccm128.c
147
ctx->cmac.c[i] ^= *aad;
lib/libcrypto/modes/ccm128.c
148
(*block)(ctx->cmac.c, ctx->cmac.c, ctx->key),
lib/libcrypto/modes/ccm128.c
149
ctx->blocks++;
lib/libcrypto/modes/ccm128.c
177
CRYPTO_ccm128_encrypt(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/ccm128.c
183
unsigned char flags0 = ctx->nonce.c[0];
lib/libcrypto/modes/ccm128.c
184
block128_f block = ctx->block;
lib/libcrypto/modes/ccm128.c
185
void *key = ctx->key;
lib/libcrypto/modes/ccm128.c
192
(*block)(ctx->nonce.c, ctx->cmac.c, key),
lib/libcrypto/modes/ccm128.c
193
ctx->blocks++;
lib/libcrypto/modes/ccm128.c
195
ctx->nonce.c[0] = L = flags0 & 7;
lib/libcrypto/modes/ccm128.c
197
n |= ctx->nonce.c[i];
lib/libcrypto/modes/ccm128.c
198
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
201
n |= ctx->nonce.c[15]; /* reconstructed length */
lib/libcrypto/modes/ccm128.c
202
ctx->nonce.c[15] = 1;
lib/libcrypto/modes/ccm128.c
207
ctx->blocks += ((len + 15) >> 3)|1;
lib/libcrypto/modes/ccm128.c
208
if (ctx->blocks > (U64(1) << 61))
lib/libcrypto/modes/ccm128.c
219
ctx->cmac.u[0] ^= temp.u[0];
lib/libcrypto/modes/ccm128.c
220
ctx->cmac.u[1] ^= temp.u[1];
lib/libcrypto/modes/ccm128.c
222
ctx->cmac.u[0] ^= ((uint64_t *)inp)[0];
lib/libcrypto/modes/ccm128.c
223
ctx->cmac.u[1] ^= ((uint64_t *)inp)[1];
lib/libcrypto/modes/ccm128.c
225
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
226
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
227
ctr64_inc(ctx->nonce.c);
lib/libcrypto/modes/ccm128.c
243
ctx->cmac.c[i] ^= inp[i];
lib/libcrypto/modes/ccm128.c
244
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
245
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
251
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
253
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
254
ctx->cmac.u[0] ^= scratch.u[0];
lib/libcrypto/modes/ccm128.c
255
ctx->cmac.u[1] ^= scratch.u[1];
lib/libcrypto/modes/ccm128.c
257
ctx->nonce.c[0] = flags0;
lib/libcrypto/modes/ccm128.c
264
CRYPTO_ccm128_decrypt(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/ccm128.c
270
unsigned char flags0 = ctx->nonce.c[0];
lib/libcrypto/modes/ccm128.c
271
block128_f block = ctx->block;
lib/libcrypto/modes/ccm128.c
272
void *key = ctx->key;
lib/libcrypto/modes/ccm128.c
279
(*block)(ctx->nonce.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
281
ctx->nonce.c[0] = L = flags0 & 7;
lib/libcrypto/modes/ccm128.c
283
n |= ctx->nonce.c[i];
lib/libcrypto/modes/ccm128.c
284
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
287
n |= ctx->nonce.c[15]; /* reconstructed length */
lib/libcrypto/modes/ccm128.c
288
ctx->nonce.c[15] = 1;
lib/libcrypto/modes/ccm128.c
300
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
301
ctr64_inc(ctx->nonce.c);
lib/libcrypto/modes/ccm128.c
304
ctx->cmac.u[0] ^= (scratch.u[0] ^= temp.u[0]);
lib/libcrypto/modes/ccm128.c
305
ctx->cmac.u[1] ^= (scratch.u[1] ^= temp.u[1]);
lib/libcrypto/modes/ccm128.c
308
ctx->cmac.u[0] ^= (((uint64_t *)out)[0] = scratch.u[0] ^
lib/libcrypto/modes/ccm128.c
310
ctx->cmac.u[1] ^= (((uint64_t *)out)[1] = scratch.u[1] ^
lib/libcrypto/modes/ccm128.c
313
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
321
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
323
ctx->cmac.c[i] ^= (out[i] = scratch.c[i] ^ inp[i]);
lib/libcrypto/modes/ccm128.c
324
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
328
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
330
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
331
ctx->cmac.u[0] ^= scratch.u[0];
lib/libcrypto/modes/ccm128.c
332
ctx->cmac.u[1] ^= scratch.u[1];
lib/libcrypto/modes/ccm128.c
334
ctx->nonce.c[0] = flags0;
lib/libcrypto/modes/ccm128.c
356
CRYPTO_ccm128_encrypt_ccm64(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/ccm128.c
362
unsigned char flags0 = ctx->nonce.c[0];
lib/libcrypto/modes/ccm128.c
363
block128_f block = ctx->block;
lib/libcrypto/modes/ccm128.c
364
void *key = ctx->key;
lib/libcrypto/modes/ccm128.c
371
(*block)(ctx->nonce.c, ctx->cmac.c, key),
lib/libcrypto/modes/ccm128.c
372
ctx->blocks++;
lib/libcrypto/modes/ccm128.c
374
ctx->nonce.c[0] = L = flags0 & 7;
lib/libcrypto/modes/ccm128.c
376
n |= ctx->nonce.c[i];
lib/libcrypto/modes/ccm128.c
377
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
380
n |= ctx->nonce.c[15]; /* reconstructed length */
lib/libcrypto/modes/ccm128.c
381
ctx->nonce.c[15] = 1;
lib/libcrypto/modes/ccm128.c
386
ctx->blocks += ((len + 15) >> 3)|1;
lib/libcrypto/modes/ccm128.c
387
if (ctx->blocks > (U64(1) << 61))
lib/libcrypto/modes/ccm128.c
391
(*stream)(inp, out, n, key, ctx->nonce.c, ctx->cmac.c);
lib/libcrypto/modes/ccm128.c
397
ctr64_add(ctx->nonce.c, n/16);
lib/libcrypto/modes/ccm128.c
402
ctx->cmac.c[i] ^= inp[i];
lib/libcrypto/modes/ccm128.c
403
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
404
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
410
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
412
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
413
ctx->cmac.u[0] ^= scratch.u[0];
lib/libcrypto/modes/ccm128.c
414
ctx->cmac.u[1] ^= scratch.u[1];
lib/libcrypto/modes/ccm128.c
416
ctx->nonce.c[0] = flags0;
lib/libcrypto/modes/ccm128.c
423
CRYPTO_ccm128_decrypt_ccm64(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/ccm128.c
429
unsigned char flags0 = ctx->nonce.c[0];
lib/libcrypto/modes/ccm128.c
430
block128_f block = ctx->block;
lib/libcrypto/modes/ccm128.c
431
void *key = ctx->key;
lib/libcrypto/modes/ccm128.c
438
(*block)(ctx->nonce.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
440
ctx->nonce.c[0] = L = flags0 & 7;
lib/libcrypto/modes/ccm128.c
442
n |= ctx->nonce.c[i];
lib/libcrypto/modes/ccm128.c
443
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
446
n |= ctx->nonce.c[15]; /* reconstructed length */
lib/libcrypto/modes/ccm128.c
447
ctx->nonce.c[15] = 1;
lib/libcrypto/modes/ccm128.c
453
(*stream)(inp, out, n, key, ctx->nonce.c, ctx->cmac.c);
lib/libcrypto/modes/ccm128.c
459
ctr64_add(ctx->nonce.c, n/16);
lib/libcrypto/modes/ccm128.c
463
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
465
ctx->cmac.c[i] ^= (out[i] = scratch.c[i] ^ inp[i]);
lib/libcrypto/modes/ccm128.c
466
(*block)(ctx->cmac.c, ctx->cmac.c, key);
lib/libcrypto/modes/ccm128.c
470
ctx->nonce.c[i] = 0;
lib/libcrypto/modes/ccm128.c
472
(*block)(ctx->nonce.c, scratch.c, key);
lib/libcrypto/modes/ccm128.c
473
ctx->cmac.u[0] ^= scratch.u[0];
lib/libcrypto/modes/ccm128.c
474
ctx->cmac.u[1] ^= scratch.u[1];
lib/libcrypto/modes/ccm128.c
476
ctx->nonce.c[0] = flags0;
lib/libcrypto/modes/ccm128.c
483
CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
lib/libcrypto/modes/ccm128.c
485
unsigned int M = (ctx->nonce.c[0] >> 3) & 7; /* the M parameter */
lib/libcrypto/modes/ccm128.c
491
memcpy(tag, ctx->cmac.c, M);
lib/libcrypto/modes/ccm128.c
60
CRYPTO_ccm128_init(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/ccm128.c
63
memset(ctx->nonce.c, 0, sizeof(ctx->nonce.c));
lib/libcrypto/modes/ccm128.c
64
ctx->nonce.c[0] = ((uint8_t)(L - 1) & 7) | (uint8_t)(((M - 2)/2) & 7) << 3;
lib/libcrypto/modes/ccm128.c
65
ctx->blocks = 0;
lib/libcrypto/modes/ccm128.c
66
ctx->block = block;
lib/libcrypto/modes/ccm128.c
67
ctx->key = key;
lib/libcrypto/modes/ccm128.c
75
CRYPTO_ccm128_setiv(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/ccm128.c
78
unsigned int L = ctx->nonce.c[0] & 7; /* the L parameter */
lib/libcrypto/modes/ccm128.c
84
ctx->nonce.c[8] = (uint8_t)(mlen >> (56 % (sizeof(mlen)*8)));
lib/libcrypto/modes/ccm128.c
85
ctx->nonce.c[9] = (uint8_t)(mlen >> (48 % (sizeof(mlen)*8)));
lib/libcrypto/modes/ccm128.c
86
ctx->nonce.c[10] = (uint8_t)(mlen >> (40 % (sizeof(mlen)*8)));
lib/libcrypto/modes/ccm128.c
87
ctx->nonce.c[11] = (uint8_t)(mlen >> (32 % (sizeof(mlen)*8)));
lib/libcrypto/modes/ccm128.c
89
ctx->nonce.u[1] = 0;
lib/libcrypto/modes/ccm128.c
91
ctx->nonce.c[12] = (uint8_t)(mlen >> 24);
lib/libcrypto/modes/ccm128.c
92
ctx->nonce.c[13] = (uint8_t)(mlen >> 16);
lib/libcrypto/modes/ccm128.c
93
ctx->nonce.c[14] = (uint8_t)(mlen >> 8);
lib/libcrypto/modes/ccm128.c
94
ctx->nonce.c[15] = (uint8_t)mlen;
lib/libcrypto/modes/ccm128.c
96
ctx->nonce.c[0] &= ~0x40; /* clear Adata flag */
lib/libcrypto/modes/ccm128.c
97
memcpy(&ctx->nonce.c[1], nonce, 14 - L);
lib/libcrypto/modes/gcm128.c
195
gcm_mul(GCM128_CONTEXT *ctx, uint64_t u[2])
lib/libcrypto/modes/gcm128.c
197
ctx->gmult(u, ctx->Htable);
lib/libcrypto/modes/gcm128.c
201
gcm_ghash(GCM128_CONTEXT *ctx, const uint8_t *in, size_t len)
lib/libcrypto/modes/gcm128.c
203
ctx->ghash(ctx->Xi.u, ctx->Htable, in, len);
lib/libcrypto/modes/gcm128.c
207
void gcm128_init(GCM128_CONTEXT *ctx);
lib/libcrypto/modes/gcm128.c
211
gcm128_init(GCM128_CONTEXT *ctx)
lib/libcrypto/modes/gcm128.c
213
gcm_init_4bit(ctx->Htable, ctx->H.u);
lib/libcrypto/modes/gcm128.c
214
ctx->gmult = gcm_gmult_4bit;
lib/libcrypto/modes/gcm128.c
215
ctx->ghash = gcm_ghash_4bit;
lib/libcrypto/modes/gcm128.c
220
CRYPTO_gcm128_init(GCM128_CONTEXT *ctx, void *key, block128_f block)
lib/libcrypto/modes/gcm128.c
222
memset(ctx, 0, sizeof(*ctx));
lib/libcrypto/modes/gcm128.c
223
ctx->block = block;
lib/libcrypto/modes/gcm128.c
224
ctx->key = key;
lib/libcrypto/modes/gcm128.c
226
(*block)(ctx->H.c, ctx->H.c, key);
lib/libcrypto/modes/gcm128.c
229
ctx->H.u[0] = be64toh(ctx->H.u[0]);
lib/libcrypto/modes/gcm128.c
230
ctx->H.u[1] = be64toh(ctx->H.u[1]);
lib/libcrypto/modes/gcm128.c
232
gcm128_init(ctx);
lib/libcrypto/modes/gcm128.c
239
GCM128_CONTEXT *ctx;
lib/libcrypto/modes/gcm128.c
241
if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
lib/libcrypto/modes/gcm128.c
244
CRYPTO_gcm128_init(ctx, key, block);
lib/libcrypto/modes/gcm128.c
246
return ctx;
lib/libcrypto/modes/gcm128.c
251
CRYPTO_gcm128_release(GCM128_CONTEXT *ctx)
lib/libcrypto/modes/gcm128.c
253
freezero(ctx, sizeof(*ctx));
lib/libcrypto/modes/gcm128.c
258
CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx, const unsigned char *iv, size_t len)
lib/libcrypto/modes/gcm128.c
262
ctx->Yi.u[0] = 0;
lib/libcrypto/modes/gcm128.c
263
ctx->Yi.u[1] = 0;
lib/libcrypto/modes/gcm128.c
264
ctx->Xi.u[0] = 0;
lib/libcrypto/modes/gcm128.c
265
ctx->Xi.u[1] = 0;
lib/libcrypto/modes/gcm128.c
266
ctx->len.u[0] = 0; /* AAD length */
lib/libcrypto/modes/gcm128.c
267
ctx->len.u[1] = 0; /* message length */
lib/libcrypto/modes/gcm128.c
268
ctx->ares = 0;
lib/libcrypto/modes/gcm128.c
269
ctx->mres = 0;
lib/libcrypto/modes/gcm128.c
272
memcpy(ctx->Yi.c, iv, 12);
lib/libcrypto/modes/gcm128.c
273
ctx->Yi.c[15] = 1;
lib/libcrypto/modes/gcm128.c
281
ctx->Yi.c[i] ^= iv[i];
lib/libcrypto/modes/gcm128.c
282
gcm_mul(ctx, ctx->Yi.u);
lib/libcrypto/modes/gcm128.c
288
ctx->Yi.c[i] ^= iv[i];
lib/libcrypto/modes/gcm128.c
289
gcm_mul(ctx, ctx->Yi.u);
lib/libcrypto/modes/gcm128.c
292
ctx->Yi.u[1] ^= htobe64(len0);
lib/libcrypto/modes/gcm128.c
294
gcm_mul(ctx, ctx->Yi.u);
lib/libcrypto/modes/gcm128.c
296
ctr = be32toh(ctx->Yi.d[3]);
lib/libcrypto/modes/gcm128.c
299
(*ctx->block)(ctx->Yi.c, ctx->EK0.c, ctx->key);
lib/libcrypto/modes/gcm128.c
300
ctx->Yi.d[3] = htobe32(++ctr);
lib/libcrypto/modes/gcm128.c
305
CRYPTO_gcm128_aad(GCM128_CONTEXT *ctx, const unsigned char *aad, size_t len)
lib/libcrypto/modes/gcm128.c
311
if (ctx->len.u[1] != 0)
lib/libcrypto/modes/gcm128.c
314
alen = ctx->len.u[0] + len;
lib/libcrypto/modes/gcm128.c
317
ctx->len.u[0] = alen;
lib/libcrypto/modes/gcm128.c
319
if ((n = ctx->ares) > 0) {
lib/libcrypto/modes/gcm128.c
321
ctx->Xi.c[n] ^= *(aad++);
lib/libcrypto/modes/gcm128.c
326
ctx->ares = n;
lib/libcrypto/modes/gcm128.c
329
gcm_mul(ctx, ctx->Xi.u);
lib/libcrypto/modes/gcm128.c
333
gcm_ghash(ctx, aad, i);
lib/libcrypto/modes/gcm128.c
340
ctx->Xi.c[i] ^= aad[i];
lib/libcrypto/modes/gcm128.c
342
ctx->ares = n;
lib/libcrypto/modes/gcm128.c
349
CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx, const unsigned char *in,
lib/libcrypto/modes/gcm128.c
356
mlen = ctx->len.u[1] + len;
lib/libcrypto/modes/gcm128.c
359
ctx->len.u[1] = mlen;
lib/libcrypto/modes/gcm128.c
361
if (ctx->ares > 0) {
lib/libcrypto/modes/gcm128.c
363
gcm_mul(ctx, ctx->Xi.u);
lib/libcrypto/modes/gcm128.c
364
ctx->ares = 0;
lib/libcrypto/modes/gcm128.c
367
ctr = be32toh(ctx->Yi.d[3]);
lib/libcrypto/modes/gcm128.c
369
n = ctx->mres;
lib/libcrypto/modes/gcm128.c
373
ctx->block(ctx->Yi.c, ctx->EKi.c, ctx->key);
lib/libcrypto/modes/gcm128.c
374
ctx->Yi.d[3] = htobe32(++ctr);
lib/libcrypto/modes/gcm128.c
376
ctx->Xi.c[n] ^= out[i] = in[i] ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
379
gcm_mul(ctx, ctx->Xi.u);
lib/libcrypto/modes/gcm128.c
382
ctx->mres = n;
lib/libcrypto/modes/gcm128.c
389
CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx, const unsigned char *in,
lib/libcrypto/modes/gcm128.c
397
mlen = ctx->len.u[1] + len;
lib/libcrypto/modes/gcm128.c
400
ctx->len.u[1] = mlen;
lib/libcrypto/modes/gcm128.c
402
if (ctx->ares) {
lib/libcrypto/modes/gcm128.c
404
gcm_mul(ctx, ctx->Xi.u);
lib/libcrypto/modes/gcm128.c
405
ctx->ares = 0;
lib/libcrypto/modes/gcm128.c
408
ctr = be32toh(ctx->Yi.d[3]);
lib/libcrypto/modes/gcm128.c
410
n = ctx->mres;
lib/libcrypto/modes/gcm128.c
414
ctx->block(ctx->Yi.c, ctx->EKi.c, ctx->key);
lib/libcrypto/modes/gcm128.c
415
ctx->Yi.d[3] = htobe32(++ctr);
lib/libcrypto/modes/gcm128.c
418
out[i] = c ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
419
ctx->Xi.c[n] ^= c;
lib/libcrypto/modes/gcm128.c
422
gcm_mul(ctx, ctx->Xi.u);
lib/libcrypto/modes/gcm128.c
425
ctx->mres = n;
lib/libcrypto/modes/gcm128.c
432
CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx, const unsigned char *in,
lib/libcrypto/modes/gcm128.c
439
mlen = ctx->len.u[1] + len;
lib/libcrypto/modes/gcm128.c
442
ctx->len.u[1] = mlen;
lib/libcrypto/modes/gcm128.c
444
if (ctx->ares > 0) {
lib/libcrypto/modes/gcm128.c
446
gcm_mul(ctx, ctx->Xi.u);
lib/libcrypto/modes/gcm128.c
447
ctx->ares = 0;
lib/libcrypto/modes/gcm128.c
450
ctr = be32toh(ctx->Yi.d[3]);
lib/libcrypto/modes/gcm128.c
452
if ((n = ctx->mres) > 0) {
lib/libcrypto/modes/gcm128.c
454
ctx->Xi.c[n] ^= *(out++) = *(in++) ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
459
ctx->mres = n;
lib/libcrypto/modes/gcm128.c
462
gcm_mul(ctx, ctx->Xi.u);
lib/libcrypto/modes/gcm128.c
466
stream(in, out, j, ctx->key, ctx->Yi.c);
lib/libcrypto/modes/gcm128.c
468
ctx->Yi.d[3] = htobe32(ctr);
lib/libcrypto/modes/gcm128.c
469
gcm_ghash(ctx, out, i);
lib/libcrypto/modes/gcm128.c
475
ctx->block(ctx->Yi.c, ctx->EKi.c, ctx->key);
lib/libcrypto/modes/gcm128.c
476
ctx->Yi.d[3] = htobe32(++ctr);
lib/libcrypto/modes/gcm128.c
478
ctx->Xi.c[n] ^= out[n] = in[n] ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
483
ctx->mres = n;
lib/libcrypto/modes/gcm128.c
490
CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx, const unsigned char *in,
lib/libcrypto/modes/gcm128.c
498
mlen = ctx->len.u[1] + len;
lib/libcrypto/modes/gcm128.c
501
ctx->len.u[1] = mlen;
lib/libcrypto/modes/gcm128.c
503
if (ctx->ares > 0) {
lib/libcrypto/modes/gcm128.c
505
gcm_mul(ctx, ctx->Xi.u);
lib/libcrypto/modes/gcm128.c
506
ctx->ares = 0;
lib/libcrypto/modes/gcm128.c
509
ctr = be32toh(ctx->Yi.d[3]);
lib/libcrypto/modes/gcm128.c
511
if ((n = ctx->mres) > 0) {
lib/libcrypto/modes/gcm128.c
514
*(out++) = c ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
515
ctx->Xi.c[n] ^= c;
lib/libcrypto/modes/gcm128.c
520
ctx->mres = n;
lib/libcrypto/modes/gcm128.c
523
gcm_mul(ctx, ctx->Xi.u);
lib/libcrypto/modes/gcm128.c
527
gcm_ghash(ctx, in, i);
lib/libcrypto/modes/gcm128.c
528
stream(in, out, j, ctx->key, ctx->Yi.c);
lib/libcrypto/modes/gcm128.c
530
ctx->Yi.d[3] = htobe32(ctr);
lib/libcrypto/modes/gcm128.c
536
ctx->block(ctx->Yi.c, ctx->EKi.c, ctx->key);
lib/libcrypto/modes/gcm128.c
537
ctx->Yi.d[3] = htobe32(++ctr);
lib/libcrypto/modes/gcm128.c
540
ctx->Xi.c[n] ^= c;
lib/libcrypto/modes/gcm128.c
541
out[n] = c ^ ctx->EKi.c[n];
lib/libcrypto/modes/gcm128.c
546
ctx->mres = n;
lib/libcrypto/modes/gcm128.c
553
CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx, const unsigned char *tag,
lib/libcrypto/modes/gcm128.c
558
alen = ctx->len.u[0] << 3;
lib/libcrypto/modes/gcm128.c
559
clen = ctx->len.u[1] << 3;
lib/libcrypto/modes/gcm128.c
561
if (ctx->ares > 0 || ctx->mres > 0)
lib/libcrypto/modes/gcm128.c
562
gcm_mul(ctx, ctx->Xi.u);
lib/libcrypto/modes/gcm128.c
564
ctx->Xi.u[0] ^= htobe64(alen);
lib/libcrypto/modes/gcm128.c
565
ctx->Xi.u[1] ^= htobe64(clen);
lib/libcrypto/modes/gcm128.c
566
gcm_mul(ctx, ctx->Xi.u);
lib/libcrypto/modes/gcm128.c
568
ctx->Xi.u[0] ^= ctx->EK0.u[0];
lib/libcrypto/modes/gcm128.c
569
ctx->Xi.u[1] ^= ctx->EK0.u[1];
lib/libcrypto/modes/gcm128.c
571
if (tag == NULL || len > sizeof(ctx->Xi))
lib/libcrypto/modes/gcm128.c
574
return timingsafe_memcmp(ctx->Xi.c, tag, len);
lib/libcrypto/modes/gcm128.c
579
CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
lib/libcrypto/modes/gcm128.c
581
CRYPTO_gcm128_finish(ctx, NULL, 0);
lib/libcrypto/modes/gcm128.c
583
if (len > sizeof(ctx->Xi.c))
lib/libcrypto/modes/gcm128.c
584
len = sizeof(ctx->Xi.c);
lib/libcrypto/modes/gcm128.c
586
memcpy(tag, ctx->Xi.c, len);
lib/libcrypto/modes/gcm128_amd64.c
32
gcm128_init(GCM128_CONTEXT *ctx)
lib/libcrypto/modes/gcm128_amd64.c
35
gcm_init_clmul(ctx->Htable, ctx->H.u);
lib/libcrypto/modes/gcm128_amd64.c
36
ctx->gmult = gcm_gmult_clmul;
lib/libcrypto/modes/gcm128_amd64.c
37
ctx->ghash = gcm_ghash_clmul;
lib/libcrypto/modes/gcm128_amd64.c
41
gcm_init_4bit(ctx->Htable, ctx->H.u);
lib/libcrypto/modes/gcm128_amd64.c
42
ctx->gmult = gcm_gmult_4bit;
lib/libcrypto/modes/gcm128_amd64.c
43
ctx->ghash = gcm_ghash_4bit;
lib/libcrypto/modes/gcm128_i386.c
37
gcm128_init(GCM128_CONTEXT *ctx)
lib/libcrypto/modes/gcm128_i386.c
40
gcm_init_clmul(ctx->Htable, ctx->H.u);
lib/libcrypto/modes/gcm128_i386.c
41
ctx->gmult = gcm_gmult_clmul;
lib/libcrypto/modes/gcm128_i386.c
42
ctx->ghash = gcm_ghash_clmul;
lib/libcrypto/modes/gcm128_i386.c
47
gcm_init_4bit(ctx->Htable, ctx->H.u);
lib/libcrypto/modes/gcm128_i386.c
48
ctx->gmult = gcm_gmult_4bit_mmx;
lib/libcrypto/modes/gcm128_i386.c
49
ctx->ghash = gcm_ghash_4bit_mmx;
lib/libcrypto/modes/gcm128_i386.c
53
gcm_init_4bit(ctx->Htable, ctx->H.u);
lib/libcrypto/modes/gcm128_i386.c
54
ctx->gmult = gcm_gmult_4bit_x86;
lib/libcrypto/modes/gcm128_i386.c
55
ctx->ghash = gcm_ghash_4bit_x86;
lib/libcrypto/modes/modes.h
101
int CRYPTO_ccm128_decrypt(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/modes.h
103
int CRYPTO_ccm128_encrypt_ccm64(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/modes.h
106
int CRYPTO_ccm128_decrypt_ccm64(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/modes.h
109
size_t CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx, unsigned char *tag, size_t len);
lib/libcrypto/modes/modes.h
113
int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const unsigned char iv[16],
lib/libcrypto/modes/modes.h
69
void CRYPTO_gcm128_init(GCM128_CONTEXT *ctx, void *key, block128_f block);
lib/libcrypto/modes/modes.h
70
void CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx, const unsigned char *iv,
lib/libcrypto/modes/modes.h
72
int CRYPTO_gcm128_aad(GCM128_CONTEXT *ctx, const unsigned char *aad,
lib/libcrypto/modes/modes.h
74
int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx,
lib/libcrypto/modes/modes.h
77
int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,
lib/libcrypto/modes/modes.h
80
int CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx,
lib/libcrypto/modes/modes.h
83
int CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx,
lib/libcrypto/modes/modes.h
86
int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx, const unsigned char *tag,
lib/libcrypto/modes/modes.h
88
void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len);
lib/libcrypto/modes/modes.h
89
void CRYPTO_gcm128_release(GCM128_CONTEXT *ctx);
lib/libcrypto/modes/modes.h
93
void CRYPTO_ccm128_init(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/modes.h
95
int CRYPTO_ccm128_setiv(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/modes.h
97
void CRYPTO_ccm128_aad(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/modes.h
99
int CRYPTO_ccm128_encrypt(CCM128_CONTEXT *ctx,
lib/libcrypto/modes/xts128.c
132
(*ctx->block1)(scratch.c, scratch.c, ctx->key1);
lib/libcrypto/modes/xts128.c
168
(*ctx->block1)(scratch.c, scratch.c, ctx->key1);
lib/libcrypto/modes/xts128.c
179
(*ctx->block1)(scratch.c, scratch.c, ctx->key1);
lib/libcrypto/modes/xts128.c
59
CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const unsigned char iv[16],
lib/libcrypto/modes/xts128.c
75
(*ctx->block2)(tweak.c, tweak.c, ctx->key2);
lib/libcrypto/modes/xts128.c
89
(*ctx->block1)(scratch.c, scratch.c, ctx->key1);
lib/libcrypto/ocsp/ocsp_ht.c
453
OCSP_REQ_CTX *ctx;
lib/libcrypto/ocsp/ocsp_ht.c
456
ctx = OCSP_sendreq_new(b, path, req, -1);
lib/libcrypto/ocsp/ocsp_ht.c
457
if (ctx == NULL)
lib/libcrypto/ocsp/ocsp_ht.c
461
rv = OCSP_sendreq_nbio(&resp, ctx);
lib/libcrypto/ocsp/ocsp_ht.c
464
OCSP_REQ_CTX_free(ctx);
lib/libcrypto/ocsp/ocsp_vfy.c
128
init_res = X509_STORE_CTX_init(&ctx, st, signer, untrusted);
lib/libcrypto/ocsp/ocsp_vfy.c
135
if (X509_STORE_CTX_set_purpose(&ctx,
lib/libcrypto/ocsp/ocsp_vfy.c
137
X509_STORE_CTX_cleanup(&ctx);
lib/libcrypto/ocsp/ocsp_vfy.c
141
ret = X509_verify_cert(&ctx);
lib/libcrypto/ocsp/ocsp_vfy.c
142
chain = X509_STORE_CTX_get1_chain(&ctx);
lib/libcrypto/ocsp/ocsp_vfy.c
143
X509_STORE_CTX_cleanup(&ctx);
lib/libcrypto/ocsp/ocsp_vfy.c
145
i = X509_STORE_CTX_get_error(&ctx);
lib/libcrypto/ocsp/ocsp_vfy.c
395
X509_STORE_CTX ctx;
lib/libcrypto/ocsp/ocsp_vfy.c
429
init_res = X509_STORE_CTX_init(&ctx, store, signer,
lib/libcrypto/ocsp/ocsp_vfy.c
432
init_res = X509_STORE_CTX_init(&ctx, store, signer,
lib/libcrypto/ocsp/ocsp_vfy.c
439
if (X509_STORE_CTX_set_purpose(&ctx,
lib/libcrypto/ocsp/ocsp_vfy.c
441
X509_STORE_CTX_set_trust(&ctx,
lib/libcrypto/ocsp/ocsp_vfy.c
443
X509_STORE_CTX_cleanup(&ctx);
lib/libcrypto/ocsp/ocsp_vfy.c
446
ret = X509_verify_cert(&ctx);
lib/libcrypto/ocsp/ocsp_vfy.c
447
X509_STORE_CTX_cleanup(&ctx);
lib/libcrypto/ocsp/ocsp_vfy.c
449
ret = X509_STORE_CTX_get_error(&ctx);
lib/libcrypto/ocsp/ocsp_vfy.c
87
X509_STORE_CTX ctx;
lib/libcrypto/pem/pem.h
353
int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type);
lib/libcrypto/pem/pem.h
354
int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt);
lib/libcrypto/pem/pem.h
355
int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
lib/libcrypto/pem/pem_lib.c
348
EVP_CIPHER_CTX ctx;
lib/libcrypto/pem/pem_lib.c
415
EVP_CIPHER_CTX_legacy_clear(&ctx);
lib/libcrypto/pem/pem_lib.c
417
if (!EVP_EncryptInit_ex(&ctx, enc, NULL, key, iv) ||
lib/libcrypto/pem/pem_lib.c
418
!EVP_EncryptUpdate(&ctx, data, &j, data, i) ||
lib/libcrypto/pem/pem_lib.c
419
!EVP_EncryptFinal_ex(&ctx, &(data[j]), &i))
lib/libcrypto/pem/pem_lib.c
421
EVP_CIPHER_CTX_cleanup(&ctx);
lib/libcrypto/pem/pem_lib.c
435
explicit_bzero((char *)&ctx, sizeof(ctx));
lib/libcrypto/pem/pem_lib.c
448
EVP_CIPHER_CTX ctx;
lib/libcrypto/pem/pem_lib.c
469
EVP_CIPHER_CTX_legacy_clear(&ctx);
lib/libcrypto/pem/pem_lib.c
470
o = EVP_DecryptInit_ex(&ctx, cipher->cipher, NULL, key,
lib/libcrypto/pem/pem_lib.c
473
o = EVP_DecryptUpdate(&ctx, data, &i, data, j);
lib/libcrypto/pem/pem_lib.c
475
o = EVP_DecryptFinal_ex(&ctx, &(data[i]), &j);
lib/libcrypto/pem/pem_lib.c
476
EVP_CIPHER_CTX_cleanup(&ctx);
lib/libcrypto/pem/pem_lib.c
603
EVP_ENCODE_CTX ctx;
lib/libcrypto/pem/pem_lib.c
606
EVP_EncodeInit(&ctx);
lib/libcrypto/pem/pem_lib.c
629
if (!EVP_EncodeUpdate(&ctx, buf, &outl, &(data[j]), n))
lib/libcrypto/pem/pem_lib.c
637
EVP_EncodeFinal(&ctx, buf, &outl);
lib/libcrypto/pem/pem_lib.c
676
EVP_ENCODE_CTX ctx;
lib/libcrypto/pem/pem_lib.c
811
EVP_DecodeInit(&ctx);
lib/libcrypto/pem/pem_lib.c
812
i = EVP_DecodeUpdate(&ctx,
lib/libcrypto/pem/pem_lib.c
819
i = EVP_DecodeFinal(&ctx, (unsigned char *)&(dataB->data[bl]), &k);
lib/libcrypto/pem/pem_sign.c
69
PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type)
lib/libcrypto/pem/pem_sign.c
71
return EVP_DigestInit_ex(ctx, type, NULL);
lib/libcrypto/pem/pem_sign.c
76
PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *data,
lib/libcrypto/pem/pem_sign.c
79
return EVP_DigestUpdate(ctx, data, count);
lib/libcrypto/pem/pem_sign.c
84
PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, unsigned int *siglen,
lib/libcrypto/pem/pem_sign.c
97
if (EVP_SignFinal(ctx, m, &m_len, pkey) <= 0)
lib/libcrypto/pem/pvkfmt.c
318
BN_CTX *ctx = NULL;
lib/libcrypto/pem/pvkfmt.c
342
if (!(ctx = BN_CTX_new()))
lib/libcrypto/pem/pvkfmt.c
345
dsa->priv_key, dsa->p, ctx))
lib/libcrypto/pem/pvkfmt.c
347
BN_CTX_free(ctx);
lib/libcrypto/pem/pvkfmt.c
359
BN_CTX_free(ctx);
lib/libcrypto/pkcs12/p12_decr.c
102
if (!EVP_CipherFinal_ex(&ctx, out + i, &i)) {
lib/libcrypto/pkcs12/p12_decr.c
115
EVP_CIPHER_CTX_cleanup(&ctx);
lib/libcrypto/pkcs12/p12_decr.c
78
EVP_CIPHER_CTX ctx;
lib/libcrypto/pkcs12/p12_decr.c
80
EVP_CIPHER_CTX_legacy_clear(&ctx);
lib/libcrypto/pkcs12/p12_decr.c
83
algor->parameter, &ctx, en_de)) {
lib/libcrypto/pkcs12/p12_decr.c
89
if (!(out = malloc(inlen + EVP_CIPHER_CTX_block_size(&ctx)))) {
lib/libcrypto/pkcs12/p12_decr.c
94
if (!EVP_CipherUpdate(&ctx, out, &i, in, inlen)) {
lib/libcrypto/pkcs12/p12_key.c
103
EVP_MD_CTX *ctx = NULL;
lib/libcrypto/pkcs12/p12_key.c
110
if ((ctx = EVP_MD_CTX_new()) == NULL)
lib/libcrypto/pkcs12/p12_key.c
146
if (!EVP_DigestInit_ex(ctx, md_type, NULL))
lib/libcrypto/pkcs12/p12_key.c
148
if (!EVP_DigestUpdate(ctx, D, v))
lib/libcrypto/pkcs12/p12_key.c
150
if (!EVP_DigestUpdate(ctx, I, Ilen))
lib/libcrypto/pkcs12/p12_key.c
152
if (!EVP_DigestFinal_ex(ctx, Ai, NULL))
lib/libcrypto/pkcs12/p12_key.c
155
if (!EVP_DigestInit_ex(ctx, md_type, NULL))
lib/libcrypto/pkcs12/p12_key.c
157
if (!EVP_DigestUpdate(ctx, Ai, u))
lib/libcrypto/pkcs12/p12_key.c
159
if (!EVP_DigestFinal_ex(ctx, Ai, NULL))
lib/libcrypto/pkcs12/p12_key.c
193
EVP_MD_CTX_free(ctx);
lib/libcrypto/pkcs7/pk7_doit.c
336
EVP_CIPHER_CTX *ctx;
lib/libcrypto/pkcs7/pk7_doit.c
342
BIO_get_cipher_ctx(btmp, &ctx);
lib/libcrypto/pkcs7/pk7_doit.c
348
if (EVP_CipherInit_ex(ctx, evp_cipher, NULL, NULL,
lib/libcrypto/pkcs7/pk7_doit.c
351
if (EVP_CIPHER_CTX_rand_key(ctx, key) <= 0)
lib/libcrypto/pkcs7/pk7_doit.c
353
if (EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, 1) <= 0)
lib/libcrypto/pkcs7/pk7_doit.c
362
if (EVP_CIPHER_param_to_asn1(ctx, xalg->parameter) < 0)
lib/libcrypto/pkcs7/pk7_doit.c
929
PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, BIO *bio,
lib/libcrypto/pkcs7/pk7_doit.c
967
if (!X509_STORE_CTX_init(ctx, cert_store, x509, cert)) {
lib/libcrypto/pkcs7/pk7_doit.c
971
if (X509_STORE_CTX_set_purpose(ctx, X509_PURPOSE_SMIME_SIGN) == 0) {
lib/libcrypto/pkcs7/pk7_doit.c
972
X509_STORE_CTX_cleanup(ctx);
lib/libcrypto/pkcs7/pk7_doit.c
975
i = X509_verify_cert(ctx);
lib/libcrypto/pkcs7/pk7_doit.c
978
X509_STORE_CTX_cleanup(ctx);
lib/libcrypto/pkcs7/pk7_doit.c
981
X509_STORE_CTX_cleanup(ctx);
lib/libcrypto/pkcs7/pkcs7.h
337
int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
lib/libcrypto/poly1305/poly1305-donna.c
10
static inline void poly1305_init(poly1305_context *ctx,
lib/libcrypto/poly1305/poly1305-donna.c
12
static inline void poly1305_update(poly1305_context *ctx,
lib/libcrypto/poly1305/poly1305-donna.c
14
static inline void poly1305_finish(poly1305_context *ctx,
lib/libcrypto/poly1305/poly1305-donna.c
177
poly1305_update(poly1305_context *ctx, const unsigned char *m, size_t bytes)
lib/libcrypto/poly1305/poly1305-donna.c
179
poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx;
lib/libcrypto/poly1305/poly1305-donna.c
215
poly1305_finish(poly1305_context *ctx, unsigned char mac[16])
lib/libcrypto/poly1305/poly1305-donna.c
217
poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx;
lib/libcrypto/poly1305/poly1305-donna.c
55
poly1305_init(poly1305_context *ctx, const unsigned char key[32])
lib/libcrypto/poly1305/poly1305-donna.c
57
poly1305_state_internal_t *st = (poly1305_state_internal_t *)ctx;
lib/libcrypto/poly1305/poly1305.c
22
CRYPTO_poly1305_init(poly1305_context *ctx, const unsigned char key[32])
lib/libcrypto/poly1305/poly1305.c
24
poly1305_init(ctx, key);
lib/libcrypto/poly1305/poly1305.c
29
CRYPTO_poly1305_update(poly1305_context *ctx, const unsigned char *in,
lib/libcrypto/poly1305/poly1305.c
32
poly1305_update(ctx, in, len);
lib/libcrypto/poly1305/poly1305.c
37
CRYPTO_poly1305_finish(poly1305_context *ctx, unsigned char mac[16])
lib/libcrypto/poly1305/poly1305.c
39
poly1305_finish(ctx, mac);
lib/libcrypto/poly1305/poly1305.h
36
void CRYPTO_poly1305_init(poly1305_context *ctx, const unsigned char key[32]);
lib/libcrypto/poly1305/poly1305.h
37
void CRYPTO_poly1305_update(poly1305_context *ctx, const unsigned char *in,
lib/libcrypto/poly1305/poly1305.h
39
void CRYPTO_poly1305_finish(poly1305_context *ctx, unsigned char mac[16]);
lib/libcrypto/ripemd/ripemd.c
128
ripemd160_block_data_order(RIPEMD160_CTX *ctx, const void *_in, size_t num)
lib/libcrypto/ripemd/ripemd.c
138
A = ctx->A;
lib/libcrypto/ripemd/ripemd.c
139
B = ctx->B;
lib/libcrypto/ripemd/ripemd.c
140
C = ctx->C;
lib/libcrypto/ripemd/ripemd.c
141
D = ctx->D;
lib/libcrypto/ripemd/ripemd.c
142
E = ctx->E;
lib/libcrypto/ripemd/ripemd.c
275
A = ctx->A;
lib/libcrypto/ripemd/ripemd.c
276
B = ctx->B;
lib/libcrypto/ripemd/ripemd.c
277
C = ctx->C;
lib/libcrypto/ripemd/ripemd.c
278
D = ctx->D;
lib/libcrypto/ripemd/ripemd.c
279
E = ctx->E;
lib/libcrypto/ripemd/ripemd.c
366
D = ctx->B + c + D;
lib/libcrypto/ripemd/ripemd.c
367
ctx->B = ctx->C + d + E;
lib/libcrypto/ripemd/ripemd.c
368
ctx->C = ctx->D + e + A;
lib/libcrypto/ripemd/ripemd.c
369
ctx->D = ctx->E + a + B;
lib/libcrypto/ripemd/ripemd.c
370
ctx->E = ctx->A + b + C;
lib/libcrypto/ripemd/ripemd.c
371
ctx->A = D;
lib/libcrypto/rsa/rsa.h
145
#define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \
lib/libcrypto/rsa/rsa.h
146
RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_RSA_PADDING, pad, NULL)
lib/libcrypto/rsa/rsa.h
148
#define EVP_PKEY_CTX_get_rsa_padding(ctx, ppad) \
lib/libcrypto/rsa/rsa.h
149
RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_GET_RSA_PADDING, 0, ppad)
lib/libcrypto/rsa/rsa.h
151
#define EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, len) \
lib/libcrypto/rsa/rsa.h
152
RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \
lib/libcrypto/rsa/rsa.h
155
#define EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, len) \
lib/libcrypto/rsa/rsa.h
156
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \
lib/libcrypto/rsa/rsa.h
159
#define EVP_PKEY_CTX_get_rsa_pss_saltlen(ctx, plen) \
lib/libcrypto/rsa/rsa.h
160
RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \
lib/libcrypto/rsa/rsa.h
163
#define EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) \
lib/libcrypto/rsa/rsa.h
164
RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \
lib/libcrypto/rsa/rsa.h
167
#define EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx, pubexp) \
lib/libcrypto/rsa/rsa.h
168
RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \
lib/libcrypto/rsa/rsa.h
171
#define EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, md) \
lib/libcrypto/rsa/rsa.h
172
RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \
lib/libcrypto/rsa/rsa.h
175
#define EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(ctx, md) \
lib/libcrypto/rsa/rsa.h
176
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \
lib/libcrypto/rsa/rsa.h
179
#define EVP_PKEY_CTX_set_rsa_oaep_md(ctx, md) \
lib/libcrypto/rsa/rsa.h
180
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \
lib/libcrypto/rsa/rsa.h
183
#define EVP_PKEY_CTX_get_rsa_mgf1_md(ctx, pmd) \
lib/libcrypto/rsa/rsa.h
184
RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \
lib/libcrypto/rsa/rsa.h
187
#define EVP_PKEY_CTX_get_rsa_oaep_md(ctx, pmd) \
lib/libcrypto/rsa/rsa.h
188
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \
lib/libcrypto/rsa/rsa.h
191
#define EVP_PKEY_CTX_set0_rsa_oaep_label(ctx, l, llen) \
lib/libcrypto/rsa/rsa.h
192
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \
lib/libcrypto/rsa/rsa.h
195
#define EVP_PKEY_CTX_get0_rsa_oaep_label(ctx, l) \
lib/libcrypto/rsa/rsa.h
196
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \
lib/libcrypto/rsa/rsa.h
199
#define EVP_PKEY_CTX_set_rsa_pss_keygen_md(ctx, md) \
lib/libcrypto/rsa/rsa.h
200
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, \
lib/libcrypto/rsa/rsa.h
273
int RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2);
lib/libcrypto/rsa/rsa.h
316
int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
lib/libcrypto/rsa/rsa.h
424
const BIGNUM *i, RSA *rsa, BN_CTX *ctx));
lib/libcrypto/rsa/rsa.h
426
const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
lib/libcrypto/rsa/rsa.h
443
RSA *rsa, BN_CTX *ctx);
lib/libcrypto/rsa/rsa.h
445
const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
lib/libcrypto/rsa/rsa_ameth.c
1070
rsa_item_sign(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
lib/libcrypto/rsa/rsa_ameth.c
1073
EVP_PKEY_CTX *pkey_ctx = ctx->pctx;
lib/libcrypto/rsa/rsa_ameth.c
501
rsa_pub_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/rsa/rsa_ameth.c
507
rsa_priv_print(BIO *bp, const EVP_PKEY *pkey, int indent, ASN1_PCTX *ctx)
lib/libcrypto/rsa/rsa_ameth.c
770
rsa_pss_to_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pkey_ctx,
lib/libcrypto/rsa/rsa_ameth.c
793
if (!EVP_DigestVerifyInit(ctx, &pkey_ctx, md, NULL, pkey))
lib/libcrypto/rsa/rsa_ameth.c
940
rsa_item_verify(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn,
lib/libcrypto/rsa/rsa_ameth.c
948
if (rsa_pss_to_ctx(ctx, NULL, sigalg, pkey) > 0) {
lib/libcrypto/rsa/rsa_blinding.c
134
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
lib/libcrypto/rsa/rsa_blinding.c
138
BN_BLINDING_new(const BIGNUM *e, const BIGNUM *mod, BN_CTX *ctx,
lib/libcrypto/rsa/rsa_blinding.c
140
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx), BN_MONT_CTX *m_ctx)
lib/libcrypto/rsa/rsa_blinding.c
190
BN_BLINDING_setup(BN_BLINDING *b, BN_CTX *ctx)
lib/libcrypto/rsa/rsa_blinding.c
194
if (BN_mod_inverse_ct(b->Ai, b->A, b->mod, ctx) == NULL)
lib/libcrypto/rsa/rsa_blinding.c
198
if (!b->bn_mod_exp(b->A, b->A, b->e, b->mod, ctx, b->m_ctx))
lib/libcrypto/rsa/rsa_blinding.c
201
if (!BN_mod_exp_ct(b->A, b->A, b->e, b->mod, ctx))
lib/libcrypto/rsa/rsa_blinding.c
209
BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx)
lib/libcrypto/rsa/rsa_blinding.c
214
if (!BN_BLINDING_setup(b, ctx))
lib/libcrypto/rsa/rsa_blinding.c
218
if (!BN_mod_sqr(b->A, b->A, b->mod, ctx))
lib/libcrypto/rsa/rsa_blinding.c
220
if (!BN_mod_sqr(b->Ai, b->Ai, b->mod, ctx))
lib/libcrypto/rsa/rsa_blinding.c
231
BN_BLINDING_convert(BIGNUM *n, BIGNUM *inv, BN_BLINDING *b, BN_CTX *ctx)
lib/libcrypto/rsa/rsa_blinding.c
235
if (!BN_BLINDING_update(b, ctx))
lib/libcrypto/rsa/rsa_blinding.c
243
ret = BN_mod_mul(n, n, b->A, b->mod, ctx);
lib/libcrypto/rsa/rsa_blinding.c
250
BN_BLINDING_invert(BIGNUM *n, const BIGNUM *inv, BN_BLINDING *b, BN_CTX *ctx)
lib/libcrypto/rsa/rsa_blinding.c
255
return BN_mod_mul(n, n, inv, b->mod, ctx);
lib/libcrypto/rsa/rsa_blinding.c
266
BN_CTX *ctx)
lib/libcrypto/rsa/rsa_blinding.c
273
BN_CTX_start(ctx);
lib/libcrypto/rsa/rsa_blinding.c
274
if ((r0 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/rsa/rsa_blinding.c
276
if ((r1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/rsa/rsa_blinding.c
278
if ((r2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/rsa/rsa_blinding.c
285
if (!BN_mul(r0, r1, r2, ctx))
lib/libcrypto/rsa/rsa_blinding.c
288
ret = BN_mod_inverse_ct(NULL, d, r0, ctx);
lib/libcrypto/rsa/rsa_blinding.c
290
BN_CTX_end(ctx);
lib/libcrypto/rsa/rsa_blinding.c
299
BN_CTX *ctx = NULL;
lib/libcrypto/rsa/rsa_blinding.c
302
if ((ctx = in_ctx) == NULL)
lib/libcrypto/rsa/rsa_blinding.c
303
ctx = BN_CTX_new();
lib/libcrypto/rsa/rsa_blinding.c
304
if (ctx == NULL)
lib/libcrypto/rsa/rsa_blinding.c
307
BN_CTX_start(ctx);
lib/libcrypto/rsa/rsa_blinding.c
310
e = rsa_get_public_exp(rsa->d, rsa->p, rsa->q, ctx);
lib/libcrypto/rsa/rsa_blinding.c
319
if ((ret = BN_BLINDING_new(e, &n, ctx, rsa->meth->bn_mod_exp,
lib/libcrypto/rsa/rsa_blinding.c
326
BN_CTX_end(ctx);
lib/libcrypto/rsa/rsa_blinding.c
327
if (ctx != in_ctx)
lib/libcrypto/rsa/rsa_blinding.c
328
BN_CTX_free(ctx);
lib/libcrypto/rsa/rsa_blinding.c
345
RSA_blinding_on(RSA *rsa, BN_CTX *ctx)
lib/libcrypto/rsa/rsa_blinding.c
352
rsa->blinding = RSA_setup_blinding(rsa, ctx);
lib/libcrypto/rsa/rsa_chk.c
112
r = BN_mul(i, key->p, key->q, ctx);
lib/libcrypto/rsa/rsa_chk.c
137
r = BN_mul(l, i, j, ctx);
lib/libcrypto/rsa/rsa_chk.c
142
r = BN_gcd_ct(m, i, j, ctx);
lib/libcrypto/rsa/rsa_chk.c
147
r = BN_div_ct(k, NULL, l, m, ctx); /* remainder is 0 */
lib/libcrypto/rsa/rsa_chk.c
153
r = BN_mod_mul(i, key->d, key->e, k, ctx);
lib/libcrypto/rsa/rsa_chk.c
172
r = BN_mod_ct(j, key->d, i, ctx);
lib/libcrypto/rsa/rsa_chk.c
190
r = BN_mod_ct(j, key->d, i, ctx);
lib/libcrypto/rsa/rsa_chk.c
202
if (BN_mod_inverse_ct(i, key->q, key->p, ctx) == NULL) {
lib/libcrypto/rsa/rsa_chk.c
219
BN_CTX_free(ctx);
lib/libcrypto/rsa/rsa_chk.c
62
BN_CTX *ctx;
lib/libcrypto/rsa/rsa_chk.c
76
ctx = BN_CTX_new();
lib/libcrypto/rsa/rsa_chk.c
78
ctx == NULL) {
lib/libcrypto/rsa/rsa_eay.c
131
BN_CTX *ctx = NULL;
lib/libcrypto/rsa/rsa_eay.c
151
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/rsa/rsa_eay.c
154
BN_CTX_start(ctx);
lib/libcrypto/rsa/rsa_eay.c
155
f = BN_CTX_get(ctx);
lib/libcrypto/rsa/rsa_eay.c
156
ret = BN_CTX_get(ctx);
lib/libcrypto/rsa/rsa_eay.c
195
CRYPTO_LOCK_RSA, rsa->n, ctx))
lib/libcrypto/rsa/rsa_eay.c
199
if (!rsa->meth->bn_mod_exp(ret, f, rsa->e, rsa->n, ctx,
lib/libcrypto/rsa/rsa_eay.c
212
if (ctx != NULL) {
lib/libcrypto/rsa/rsa_eay.c
213
BN_CTX_end(ctx);
lib/libcrypto/rsa/rsa_eay.c
214
BN_CTX_free(ctx);
lib/libcrypto/rsa/rsa_eay.c
221
rsa_get_blinding(RSA *rsa, int *local, BN_CTX *ctx)
lib/libcrypto/rsa/rsa_eay.c
234
rsa->blinding = RSA_setup_blinding(rsa, ctx);
lib/libcrypto/rsa/rsa_eay.c
253
rsa->mt_blinding = RSA_setup_blinding(rsa, ctx);
lib/libcrypto/rsa/rsa_eay.c
268
rsa_blinding_convert(BN_BLINDING *b, BIGNUM *f, BIGNUM *unblind, BN_CTX *ctx)
lib/libcrypto/rsa/rsa_eay.c
275
return BN_BLINDING_convert(f, NULL, b, ctx);
lib/libcrypto/rsa/rsa_eay.c
283
ret = BN_BLINDING_convert(f, unblind, b, ctx);
lib/libcrypto/rsa/rsa_eay.c
290
rsa_blinding_invert(BN_BLINDING *b, BIGNUM *f, BIGNUM *unblind, BN_CTX *ctx)
lib/libcrypto/rsa/rsa_eay.c
300
return BN_BLINDING_invert(f, unblind, b, ctx);
lib/libcrypto/rsa/rsa_eay.c
311
BN_CTX *ctx = NULL;
lib/libcrypto/rsa/rsa_eay.c
321
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/rsa/rsa_eay.c
324
BN_CTX_start(ctx);
lib/libcrypto/rsa/rsa_eay.c
325
f = BN_CTX_get(ctx);
lib/libcrypto/rsa/rsa_eay.c
326
ret = BN_CTX_get(ctx);
lib/libcrypto/rsa/rsa_eay.c
363
CRYPTO_LOCK_RSA, rsa->n, ctx))
lib/libcrypto/rsa/rsa_eay.c
368
blinding = rsa_get_blinding(rsa, &local_blinding, ctx);
lib/libcrypto/rsa/rsa_eay.c
376
if (!local_blinding && ((unblind = BN_CTX_get(ctx)) == NULL)) {
lib/libcrypto/rsa/rsa_eay.c
380
if (!rsa_blinding_convert(blinding, f, unblind, ctx))
lib/libcrypto/rsa/rsa_eay.c
387
if (!rsa->meth->rsa_mod_exp(ret, f, rsa, ctx))
lib/libcrypto/rsa/rsa_eay.c
395
if (!rsa->meth->bn_mod_exp(ret, f, &d, rsa->n, ctx,
lib/libcrypto/rsa/rsa_eay.c
402
if (!rsa_blinding_invert(blinding, ret, unblind, ctx))
lib/libcrypto/rsa/rsa_eay.c
424
if (ctx != NULL) {
lib/libcrypto/rsa/rsa_eay.c
425
BN_CTX_end(ctx);
lib/libcrypto/rsa/rsa_eay.c
426
BN_CTX_free(ctx);
lib/libcrypto/rsa/rsa_eay.c
440
BN_CTX *ctx = NULL;
lib/libcrypto/rsa/rsa_eay.c
450
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/rsa/rsa_eay.c
453
BN_CTX_start(ctx);
lib/libcrypto/rsa/rsa_eay.c
454
f = BN_CTX_get(ctx);
lib/libcrypto/rsa/rsa_eay.c
455
ret = BN_CTX_get(ctx);
lib/libcrypto/rsa/rsa_eay.c
482
CRYPTO_LOCK_RSA, rsa->n, ctx))
lib/libcrypto/rsa/rsa_eay.c
487
blinding = rsa_get_blinding(rsa, &local_blinding, ctx);
lib/libcrypto/rsa/rsa_eay.c
495
if (!local_blinding && ((unblind = BN_CTX_get(ctx)) == NULL)) {
lib/libcrypto/rsa/rsa_eay.c
499
if (!rsa_blinding_convert(blinding, f, unblind, ctx))
lib/libcrypto/rsa/rsa_eay.c
507
if (!rsa->meth->rsa_mod_exp(ret, f, rsa, ctx))
lib/libcrypto/rsa/rsa_eay.c
515
if (!rsa->meth->bn_mod_exp(ret, f, &d, rsa->n, ctx,
lib/libcrypto/rsa/rsa_eay.c
522
if (!rsa_blinding_invert(blinding, ret, unblind, ctx))
lib/libcrypto/rsa/rsa_eay.c
548
if (ctx != NULL) {
lib/libcrypto/rsa/rsa_eay.c
549
BN_CTX_end(ctx);
lib/libcrypto/rsa/rsa_eay.c
550
BN_CTX_free(ctx);
lib/libcrypto/rsa/rsa_eay.c
565
BN_CTX *ctx = NULL;
lib/libcrypto/rsa/rsa_eay.c
585
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/rsa/rsa_eay.c
588
BN_CTX_start(ctx);
lib/libcrypto/rsa/rsa_eay.c
589
f = BN_CTX_get(ctx);
lib/libcrypto/rsa/rsa_eay.c
590
ret = BN_CTX_get(ctx);
lib/libcrypto/rsa/rsa_eay.c
616
CRYPTO_LOCK_RSA, rsa->n, ctx))
lib/libcrypto/rsa/rsa_eay.c
620
if (!rsa->meth->bn_mod_exp(ret, f, rsa->e, rsa->n, ctx,
lib/libcrypto/rsa/rsa_eay.c
649
if (ctx != NULL) {
lib/libcrypto/rsa/rsa_eay.c
650
BN_CTX_end(ctx);
lib/libcrypto/rsa/rsa_eay.c
651
BN_CTX_free(ctx);
lib/libcrypto/rsa/rsa_eay.c
658
rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
lib/libcrypto/rsa/rsa_eay.c
664
BN_CTX_start(ctx);
lib/libcrypto/rsa/rsa_eay.c
665
r1 = BN_CTX_get(ctx);
lib/libcrypto/rsa/rsa_eay.c
666
m1 = BN_CTX_get(ctx);
lib/libcrypto/rsa/rsa_eay.c
667
vrfy = BN_CTX_get(ctx);
lib/libcrypto/rsa/rsa_eay.c
687
CRYPTO_LOCK_RSA, &p, ctx) ||
lib/libcrypto/rsa/rsa_eay.c
689
CRYPTO_LOCK_RSA, &q, ctx)) {
lib/libcrypto/rsa/rsa_eay.c
697
CRYPTO_LOCK_RSA, rsa->n, ctx))
lib/libcrypto/rsa/rsa_eay.c
705
if (!BN_mod_ct(r1, &c, rsa->q, ctx))
lib/libcrypto/rsa/rsa_eay.c
712
if (!rsa->meth->bn_mod_exp(m1, r1, &dmq1, rsa->q, ctx,
lib/libcrypto/rsa/rsa_eay.c
720
if (!BN_mod_ct(r1, &c, rsa->p, ctx))
lib/libcrypto/rsa/rsa_eay.c
727
if (!rsa->meth->bn_mod_exp(r0, r1, &dmp1, rsa->p, ctx,
lib/libcrypto/rsa/rsa_eay.c
742
if (!BN_mul(r1, r0, rsa->iqmp, ctx))
lib/libcrypto/rsa/rsa_eay.c
749
if (!BN_mod_ct(r0, &pr1, rsa->p, ctx))
lib/libcrypto/rsa/rsa_eay.c
763
if (!BN_mul(r1, r0, rsa->q, ctx))
lib/libcrypto/rsa/rsa_eay.c
769
if (!rsa->meth->bn_mod_exp(vrfy, r0, rsa->e, rsa->n, ctx,
lib/libcrypto/rsa/rsa_eay.c
780
if (!BN_mod_ct(vrfy, vrfy, rsa->n, ctx))
lib/libcrypto/rsa/rsa_eay.c
796
if (!rsa->meth->bn_mod_exp(r0, I, &d, rsa->n, ctx,
lib/libcrypto/rsa/rsa_eay.c
804
BN_CTX_end(ctx);
lib/libcrypto/rsa/rsa_gen.c
101
if ((diff = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/rsa/rsa_gen.c
103
if ((mindiff = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/rsa/rsa_gen.c
146
if (!BN_gcd_ct(r1, r2, rsa->e, ctx))
lib/libcrypto/rsa/rsa_gen.c
176
if (!BN_gcd_ct(r1, r2, rsa->e, ctx))
lib/libcrypto/rsa/rsa_gen.c
192
if (!BN_mul(rsa->n, rsa->p, rsa->q, ctx))
lib/libcrypto/rsa/rsa_gen.c
200
if (!BN_mul(r0, r1, r2, ctx)) /* (p-1)(q-1) */
lib/libcrypto/rsa/rsa_gen.c
206
if (BN_mod_inverse_ct(rsa->d, rsa->e, &pr0, ctx) == NULL) /* d */
lib/libcrypto/rsa/rsa_gen.c
214
if (!BN_mod_ct(rsa->dmp1, &d, r1, ctx))
lib/libcrypto/rsa/rsa_gen.c
218
if (!BN_mod_ct(rsa->dmq1, &d, r2, ctx))
lib/libcrypto/rsa/rsa_gen.c
224
if (BN_mod_inverse_ct(rsa->iqmp, rsa->q, &p, ctx) == NULL)
lib/libcrypto/rsa/rsa_gen.c
233
if (ctx != NULL) {
lib/libcrypto/rsa/rsa_gen.c
234
BN_CTX_end(ctx);
lib/libcrypto/rsa/rsa_gen.c
235
BN_CTX_free(ctx);
lib/libcrypto/rsa/rsa_gen.c
86
BN_CTX *ctx = NULL;
lib/libcrypto/rsa/rsa_gen.c
89
ctx = BN_CTX_new();
lib/libcrypto/rsa/rsa_gen.c
90
if (ctx == NULL)
lib/libcrypto/rsa/rsa_gen.c
92
BN_CTX_start(ctx);
lib/libcrypto/rsa/rsa_gen.c
93
if ((r0 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/rsa/rsa_gen.c
95
if ((r1 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/rsa/rsa_gen.c
97
if ((r2 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/rsa/rsa_gen.c
99
if ((r3 = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/rsa/rsa_lib.c
416
RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2)
lib/libcrypto/rsa/rsa_lib.c
419
if (ctx != NULL && ctx->pmeth != NULL &&
lib/libcrypto/rsa/rsa_lib.c
420
ctx->pmeth->pkey_id != EVP_PKEY_RSA &&
lib/libcrypto/rsa/rsa_lib.c
421
ctx->pmeth->pkey_id != EVP_PKEY_RSA_PSS)
lib/libcrypto/rsa/rsa_lib.c
424
return EVP_PKEY_CTX_ctrl(ctx, -1, optype, cmd, p1, p2);
lib/libcrypto/rsa/rsa_local.h
148
BN_BLINDING *BN_BLINDING_new(const BIGNUM *e, const BIGNUM *mod, BN_CTX *ctx,
lib/libcrypto/rsa/rsa_local.h
150
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx), BN_MONT_CTX *m_ctx);
lib/libcrypto/rsa/rsa_local.h
155
BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
lib/libcrypto/rsa/rsa_local.h
77
BN_CTX *ctx); /* Can be null */
lib/libcrypto/rsa/rsa_local.h
79
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); /* Can be null */
lib/libcrypto/rsa/rsa_meth.c
136
const BIGNUM *i, RSA *rsa, BN_CTX *ctx))
lib/libcrypto/rsa/rsa_meth.c
145
const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
lib/libcrypto/rsa/rsa_meth.c
227
RSA *rsa, BN_CTX *ctx)
lib/libcrypto/rsa/rsa_meth.c
235
const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,
lib/libcrypto/rsa/rsa_pmeth.c
107
pkey_rsa_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/rsa/rsa_pmeth.c
116
if (ctx->pmeth->pkey_id == EVP_PKEY_RSA_PSS)
lib/libcrypto/rsa/rsa_pmeth.c
125
ctx->data = rctx;
lib/libcrypto/rsa/rsa_pmeth.c
126
ctx->keygen_info = rctx->gentmp;
lib/libcrypto/rsa/rsa_pmeth.c
127
ctx->keygen_info_count = 2;
lib/libcrypto/rsa/rsa_pmeth.c
163
setup_tbuf(RSA_PKEY_CTX *ctx, EVP_PKEY_CTX *pk)
lib/libcrypto/rsa/rsa_pmeth.c
165
if (ctx->tbuf != NULL)
lib/libcrypto/rsa/rsa_pmeth.c
167
if ((ctx->tbuf = calloc(1, EVP_PKEY_size(pk->pkey))) == NULL) {
lib/libcrypto/rsa/rsa_pmeth.c
175
pkey_rsa_cleanup(EVP_PKEY_CTX *ctx)
lib/libcrypto/rsa/rsa_pmeth.c
177
RSA_PKEY_CTX *rctx = ctx->data;
lib/libcrypto/rsa/rsa_pmeth.c
188
pkey_rsa_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
lib/libcrypto/rsa/rsa_pmeth.c
192
RSA_PKEY_CTX *rctx = ctx->data;
lib/libcrypto/rsa/rsa_pmeth.c
193
RSA *rsa = ctx->pkey->pkey.rsa;
lib/libcrypto/rsa/rsa_pmeth.c
202
if ((size_t)EVP_PKEY_size(ctx->pkey) < tbslen + 1) {
lib/libcrypto/rsa/rsa_pmeth.c
206
if (!setup_tbuf(rctx, ctx)) {
lib/libcrypto/rsa/rsa_pmeth.c
224
if (!setup_tbuf(rctx, ctx))
lib/libcrypto/rsa/rsa_pmeth.c
235
ret = RSA_private_encrypt(tbslen, tbs, sig, ctx->pkey->pkey.rsa,
lib/libcrypto/rsa/rsa_pmeth.c
245
pkey_rsa_verifyrecover(EVP_PKEY_CTX *ctx, unsigned char *rout, size_t *routlen,
lib/libcrypto/rsa/rsa_pmeth.c
249
RSA_PKEY_CTX *rctx = ctx->data;
lib/libcrypto/rsa/rsa_pmeth.c
253
if (!setup_tbuf(rctx, ctx))
lib/libcrypto/rsa/rsa_pmeth.c
256
ctx->pkey->pkey.rsa, RSA_X931_PADDING);
lib/libcrypto/rsa/rsa_pmeth.c
275
rout, &sltmp, sig, siglen, ctx->pkey->pkey.rsa);
lib/libcrypto/rsa/rsa_pmeth.c
283
ret = RSA_public_decrypt(siglen, sig, rout, ctx->pkey->pkey.rsa,
lib/libcrypto/rsa/rsa_pmeth.c
293
pkey_rsa_verify(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen,
lib/libcrypto/rsa/rsa_pmeth.c
296
RSA_PKEY_CTX *rctx = ctx->data;
lib/libcrypto/rsa/rsa_pmeth.c
297
RSA *rsa = ctx->pkey->pkey.rsa;
lib/libcrypto/rsa/rsa_pmeth.c
309
if (pkey_rsa_verifyrecover(ctx, NULL, &rslen, sig,
lib/libcrypto/rsa/rsa_pmeth.c
315
if (!setup_tbuf(rctx, ctx))
lib/libcrypto/rsa/rsa_pmeth.c
332
if (!setup_tbuf(rctx, ctx))
lib/libcrypto/rsa/rsa_pmeth.c
349
pkey_rsa_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
lib/libcrypto/rsa/rsa_pmeth.c
352
RSA_PKEY_CTX *rctx = ctx->data;
lib/libcrypto/rsa/rsa_pmeth.c
356
int klen = RSA_size(ctx->pkey->pkey.rsa);
lib/libcrypto/rsa/rsa_pmeth.c
357
if (!setup_tbuf(rctx, ctx))
lib/libcrypto/rsa/rsa_pmeth.c
364
ctx->pkey->pkey.rsa, RSA_NO_PADDING);
lib/libcrypto/rsa/rsa_pmeth.c
366
ret = RSA_public_encrypt(inlen, in, out, ctx->pkey->pkey.rsa,
lib/libcrypto/rsa/rsa_pmeth.c
376
pkey_rsa_decrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
lib/libcrypto/rsa/rsa_pmeth.c
380
RSA_PKEY_CTX *rctx = ctx->data;
lib/libcrypto/rsa/rsa_pmeth.c
383
if (!setup_tbuf(rctx, ctx))
lib/libcrypto/rsa/rsa_pmeth.c
386
ctx->pkey->pkey.rsa, RSA_NO_PADDING);
lib/libcrypto/rsa/rsa_pmeth.c
393
ret = RSA_private_decrypt(inlen, in, out, ctx->pkey->pkey.rsa,
lib/libcrypto/rsa/rsa_pmeth.c
449
pkey_rsa_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
lib/libcrypto/rsa/rsa_pmeth.c
451
RSA_PKEY_CTX *rctx = ctx->data;
lib/libcrypto/rsa/rsa_pmeth.c
459
if (!(ctx->operation &
lib/libcrypto/rsa/rsa_pmeth.c
464
} else if (ctx->pmeth->pkey_id == EVP_PKEY_RSA_PSS) {
lib/libcrypto/rsa/rsa_pmeth.c
468
if (!(ctx->operation & EVP_PKEY_OP_TYPE_CRYPT))
lib/libcrypto/rsa/rsa_pmeth.c
497
ctx->operation == EVP_PKEY_OP_VERIFY) {
lib/libcrypto/rsa/rsa_pmeth.c
617
if (ctx->pmeth->pkey_id != EVP_PKEY_RSA_PSS)
lib/libcrypto/rsa/rsa_pmeth.c
632
pkey_rsa_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
lib/libcrypto/rsa/rsa_pmeth.c
656
return EVP_PKEY_CTX_set_rsa_padding(ctx, pm);
lib/libcrypto/rsa/rsa_pmeth.c
680
return EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, saltlen);
lib/libcrypto/rsa/rsa_pmeth.c
692
return EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, nbits);
lib/libcrypto/rsa/rsa_pmeth.c
701
ret = EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx, pubexp);
lib/libcrypto/rsa/rsa_pmeth.c
708
return EVP_PKEY_CTX_md(ctx,
lib/libcrypto/rsa/rsa_pmeth.c
712
if (ctx->pmeth->pkey_id == EVP_PKEY_RSA_PSS) {
lib/libcrypto/rsa/rsa_pmeth.c
714
return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_KEYGEN,
lib/libcrypto/rsa/rsa_pmeth.c
718
return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_KEYGEN,
lib/libcrypto/rsa/rsa_pmeth.c
735
return EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, saltlen);
lib/libcrypto/rsa/rsa_pmeth.c
740
return EVP_PKEY_CTX_md(ctx, EVP_PKEY_OP_TYPE_CRYPT,
lib/libcrypto/rsa/rsa_pmeth.c
750
ret = EVP_PKEY_CTX_set0_rsa_oaep_label(ctx, lab, lablen);
lib/libcrypto/rsa/rsa_pmeth.c
762
rsa_set_pss_param(RSA *rsa, EVP_PKEY_CTX *ctx)
lib/libcrypto/rsa/rsa_pmeth.c
764
RSA_PKEY_CTX *rctx = ctx->data;
lib/libcrypto/rsa/rsa_pmeth.c
766
if (ctx->pmeth->pkey_id != EVP_PKEY_RSA_PSS)
lib/libcrypto/rsa/rsa_pmeth.c
783
pkey_rsa_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
lib/libcrypto/rsa/rsa_pmeth.c
786
RSA_PKEY_CTX *rctx = ctx->data;
lib/libcrypto/rsa/rsa_pmeth.c
800
if (ctx->pkey_gencb != NULL) {
lib/libcrypto/rsa/rsa_pmeth.c
802
evp_pkey_set_cb_translate(pcb, ctx);
lib/libcrypto/rsa/rsa_pmeth.c
806
if (!rsa_set_pss_param(rsa, ctx))
lib/libcrypto/rsa/rsa_pmeth.c
808
if (!EVP_PKEY_assign(pkey, ctx->pmeth->pkey_id, rsa))
lib/libcrypto/rsa/rsa_pmeth.c
850
pkey_pss_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/rsa/rsa_pmeth.c
853
RSA_PKEY_CTX *rctx = ctx->data;
lib/libcrypto/rsa/rsa_pmeth.c
859
if (ctx->pmeth->pkey_id != EVP_PKEY_RSA_PSS)
lib/libcrypto/rsa/rsa_pmeth.c
861
rsa = ctx->pkey->pkey.rsa;
lib/libcrypto/sha/sha1.c
167
sha1_block_generic(SHA_CTX *ctx, const void *_in, size_t num)
lib/libcrypto/sha/sha1.c
176
a = ctx->h0;
lib/libcrypto/sha/sha1.c
177
b = ctx->h1;
lib/libcrypto/sha/sha1.c
178
c = ctx->h2;
lib/libcrypto/sha/sha1.c
179
d = ctx->h3;
lib/libcrypto/sha/sha1.c
180
e = ctx->h4;
lib/libcrypto/sha/sha1.c
375
ctx->h0 += a;
lib/libcrypto/sha/sha1.c
376
ctx->h1 += b;
lib/libcrypto/sha/sha1.c
377
ctx->h2 += c;
lib/libcrypto/sha/sha1.c
378
ctx->h3 += d;
lib/libcrypto/sha/sha1.c
379
ctx->h4 += e;
lib/libcrypto/sha/sha1.c
386
sha1_block_data_order(SHA_CTX *ctx, const void *_in, size_t num)
lib/libcrypto/sha/sha1.c
388
sha1_block_generic(ctx, _in, num);
lib/libcrypto/sha/sha1.c
74
void sha1_block_data_order(SHA_CTX *ctx, const void *p, size_t num);
lib/libcrypto/sha/sha1.c
75
void sha1_block_generic(SHA_CTX *ctx, const void *p, size_t num);
lib/libcrypto/sha/sha1_aarch64.c
22
void sha1_block_ce(SHA256_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha1_aarch64.c
23
void sha1_block_generic(SHA256_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha1_aarch64.c
26
sha1_block_data_order(SHA256_CTX *ctx, const void *in, size_t num)
lib/libcrypto/sha/sha1_aarch64.c
29
sha1_block_ce(ctx, in, num);
lib/libcrypto/sha/sha1_aarch64.c
33
sha1_block_generic(ctx, in, num);
lib/libcrypto/sha/sha1_amd64.c
22
void sha1_block_generic(SHA_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha1_amd64.c
23
void sha1_block_shani(SHA_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha1_amd64.c
26
sha1_block_data_order(SHA_CTX *ctx, const void *in, size_t num)
lib/libcrypto/sha/sha1_amd64.c
29
sha1_block_shani(ctx, in, num);
lib/libcrypto/sha/sha1_amd64.c
33
sha1_block_generic(ctx, in, num);
lib/libcrypto/sha/sha256.c
158
sha256_block_generic(SHA256_CTX *ctx, const void *_in, size_t num)
lib/libcrypto/sha/sha256.c
167
a = ctx->h[0];
lib/libcrypto/sha/sha256.c
168
b = ctx->h[1];
lib/libcrypto/sha/sha256.c
169
c = ctx->h[2];
lib/libcrypto/sha/sha256.c
170
d = ctx->h[3];
lib/libcrypto/sha/sha256.c
171
e = ctx->h[4];
lib/libcrypto/sha/sha256.c
172
f = ctx->h[5];
lib/libcrypto/sha/sha256.c
173
g = ctx->h[6];
lib/libcrypto/sha/sha256.c
174
h = ctx->h[7];
lib/libcrypto/sha/sha256.c
269
ctx->h[0] += a;
lib/libcrypto/sha/sha256.c
270
ctx->h[1] += b;
lib/libcrypto/sha/sha256.c
271
ctx->h[2] += c;
lib/libcrypto/sha/sha256.c
272
ctx->h[3] += d;
lib/libcrypto/sha/sha256.c
273
ctx->h[4] += e;
lib/libcrypto/sha/sha256.c
274
ctx->h[5] += f;
lib/libcrypto/sha/sha256.c
275
ctx->h[6] += g;
lib/libcrypto/sha/sha256.c
276
ctx->h[7] += h;
lib/libcrypto/sha/sha256.c
283
sha256_block_data_order(SHA256_CTX *ctx, const void *_in, size_t num)
lib/libcrypto/sha/sha256.c
285
sha256_block_generic(ctx, _in, num);
lib/libcrypto/sha/sha256.c
71
void sha256_block_data_order(SHA256_CTX *ctx, const void *_in, size_t num);
lib/libcrypto/sha/sha256.c
72
void sha256_block_generic(SHA256_CTX *ctx, const void *_in, size_t num);
lib/libcrypto/sha/sha256_aarch64.c
22
void sha256_block_ce(SHA256_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha256_aarch64.c
23
void sha256_block_generic(SHA256_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha256_aarch64.c
26
sha256_block_data_order(SHA256_CTX *ctx, const void *in, size_t num)
lib/libcrypto/sha/sha256_aarch64.c
29
sha256_block_ce(ctx, in, num);
lib/libcrypto/sha/sha256_aarch64.c
33
sha256_block_generic(ctx, in, num);
lib/libcrypto/sha/sha256_amd64.c
22
void sha256_block_generic(SHA256_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha256_amd64.c
23
void sha256_block_shani(SHA256_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha256_amd64.c
26
sha256_block_data_order(SHA256_CTX *ctx, const void *in, size_t num)
lib/libcrypto/sha/sha256_amd64.c
29
sha256_block_shani(ctx, in, num);
lib/libcrypto/sha/sha256_amd64.c
33
sha256_block_generic(ctx, in, num);
lib/libcrypto/sha/sha3.c
100
sha3_init(sha3_ctx *ctx, int mdlen)
lib/libcrypto/sha/sha3.c
105
memset(ctx, 0, sizeof(*ctx));
lib/libcrypto/sha/sha3.c
107
ctx->mdlen = mdlen;
lib/libcrypto/sha/sha3.c
108
ctx->rsize = KECCAK_BYTE_WIDTH - 2 * mdlen;
lib/libcrypto/sha/sha3.c
114
sha3_update(sha3_ctx *ctx, const void *_data, size_t len)
lib/libcrypto/sha/sha3.c
119
j = ctx->pt;
lib/libcrypto/sha/sha3.c
121
ctx->state.b[j++] ^= data[i];
lib/libcrypto/sha/sha3.c
122
if (j >= ctx->rsize) {
lib/libcrypto/sha/sha3.c
123
sha3_keccakf(ctx->state.q);
lib/libcrypto/sha/sha3.c
127
ctx->pt = j;
lib/libcrypto/sha/sha3.c
133
sha3_final(void *_md, sha3_ctx *ctx)
lib/libcrypto/sha/sha3.c
138
ctx->state.b[ctx->pt] ^= 0x06;
lib/libcrypto/sha/sha3.c
139
ctx->state.b[ctx->rsize - 1] ^= 0x80;
lib/libcrypto/sha/sha3.c
140
sha3_keccakf(ctx->state.q);
lib/libcrypto/sha/sha3.c
142
for (i = 0; i < ctx->mdlen; i++)
lib/libcrypto/sha/sha3.c
143
md[i] = ctx->state.b[i];
lib/libcrypto/sha/sha3.c
150
shake_xof(sha3_ctx *ctx)
lib/libcrypto/sha/sha3.c
152
ctx->state.b[ctx->pt] ^= 0x1f;
lib/libcrypto/sha/sha3.c
153
ctx->state.b[ctx->rsize - 1] ^= 0x80;
lib/libcrypto/sha/sha3.c
154
sha3_keccakf(ctx->state.q);
lib/libcrypto/sha/sha3.c
155
ctx->pt = 0;
lib/libcrypto/sha/sha3.c
159
shake_out(sha3_ctx *ctx, void *_out, size_t len)
lib/libcrypto/sha/sha3.c
164
j = ctx->pt;
lib/libcrypto/sha/sha3.c
166
if (j >= ctx->rsize) {
lib/libcrypto/sha/sha3.c
167
sha3_keccakf(ctx->state.q);
lib/libcrypto/sha/sha3.c
170
out[i] = ctx->state.b[j++];
lib/libcrypto/sha/sha3.c
172
ctx->pt = j;
lib/libcrypto/sha/sha3_internal.h
69
int sha3_init(sha3_ctx *ctx, int mdlen);
lib/libcrypto/sha/sha3_internal.h
70
int sha3_update(sha3_ctx *ctx, const void *data, size_t len);
lib/libcrypto/sha/sha3_internal.h
71
int sha3_final(void *md, sha3_ctx *ctx);
lib/libcrypto/sha/sha3_internal.h
74
#define shake128_init(ctx) sha3_init((ctx), 16)
lib/libcrypto/sha/sha3_internal.h
75
#define shake256_init(ctx) sha3_init((ctx), 32)
lib/libcrypto/sha/sha3_internal.h
78
void shake_xof(sha3_ctx *ctx);
lib/libcrypto/sha/sha3_internal.h
79
void shake_out(sha3_ctx *ctx, void *out, size_t len);
lib/libcrypto/sha/sha512.c
185
sha512_block_generic(SHA512_CTX *ctx, const void *_in, size_t num)
lib/libcrypto/sha/sha512.c
194
a = ctx->h[0];
lib/libcrypto/sha/sha512.c
195
b = ctx->h[1];
lib/libcrypto/sha/sha512.c
196
c = ctx->h[2];
lib/libcrypto/sha/sha512.c
197
d = ctx->h[3];
lib/libcrypto/sha/sha512.c
198
e = ctx->h[4];
lib/libcrypto/sha/sha512.c
199
f = ctx->h[5];
lib/libcrypto/sha/sha512.c
200
g = ctx->h[6];
lib/libcrypto/sha/sha512.c
201
h = ctx->h[7];
lib/libcrypto/sha/sha512.c
296
ctx->h[0] += a;
lib/libcrypto/sha/sha512.c
297
ctx->h[1] += b;
lib/libcrypto/sha/sha512.c
298
ctx->h[2] += c;
lib/libcrypto/sha/sha512.c
299
ctx->h[3] += d;
lib/libcrypto/sha/sha512.c
300
ctx->h[4] += e;
lib/libcrypto/sha/sha512.c
301
ctx->h[5] += f;
lib/libcrypto/sha/sha512.c
302
ctx->h[6] += g;
lib/libcrypto/sha/sha512.c
303
ctx->h[7] += h;
lib/libcrypto/sha/sha512.c
310
sha512_block_data_order(SHA512_CTX *ctx, const void *_in, size_t num)
lib/libcrypto/sha/sha512.c
312
sha512_block_generic(ctx, _in, num);
lib/libcrypto/sha/sha512.c
72
void sha512_block_data_order(SHA512_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha512.c
73
void sha512_block_generic(SHA512_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha512_aarch64.c
22
void sha512_block_ce(SHA512_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha512_aarch64.c
23
void sha512_block_generic(SHA512_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha512_aarch64.c
26
sha512_block_data_order(SHA512_CTX *ctx, const void *in, size_t num)
lib/libcrypto/sha/sha512_aarch64.c
29
sha512_block_ce(ctx, in, num);
lib/libcrypto/sha/sha512_aarch64.c
33
sha512_block_generic(ctx, in, num);
lib/libcrypto/sha/sha512_amd64.c
20
void sha512_block_generic(SHA512_CTX *ctx, const void *in, size_t num);
lib/libcrypto/sha/sha512_amd64.c
23
sha512_block_data_order(SHA512_CTX *ctx, const void *in, size_t num)
lib/libcrypto/sha/sha512_amd64.c
25
sha512_block_generic(ctx, in, num);
lib/libcrypto/sm2/sm2_crypt.c
252
BN_CTX *ctx = NULL;
lib/libcrypto/sm2/sm2_crypt.c
310
if ((ctx = BN_CTX_new()) == NULL) {
lib/libcrypto/sm2/sm2_crypt.c
315
BN_CTX_start(ctx);
lib/libcrypto/sm2/sm2_crypt.c
316
if ((k = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_crypt.c
320
if ((x1 = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_crypt.c
324
if ((x2 = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_crypt.c
328
if ((y1 = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_crypt.c
332
if ((y2 = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_crypt.c
354
if (!EC_POINT_mul(group, kG, k, NULL, NULL, ctx)) {
lib/libcrypto/sm2/sm2_crypt.c
359
if (!EC_POINT_get_affine_coordinates(group, kG, x1, y1, ctx)) {
lib/libcrypto/sm2/sm2_crypt.c
364
if (!EC_POINT_mul(group, kP, NULL, P, k, ctx)) {
lib/libcrypto/sm2/sm2_crypt.c
369
if (!EC_POINT_get_affine_coordinates(group, kP, x2, y2, ctx)) {
lib/libcrypto/sm2/sm2_crypt.c
455
BN_CTX_end(ctx);
lib/libcrypto/sm2/sm2_crypt.c
456
BN_CTX_free(ctx);
lib/libcrypto/sm2/sm2_crypt.c
469
BN_CTX *ctx = NULL;
lib/libcrypto/sm2/sm2_crypt.c
511
if ((ctx = BN_CTX_new()) == NULL) {
lib/libcrypto/sm2/sm2_crypt.c
516
BN_CTX_start(ctx);
lib/libcrypto/sm2/sm2_crypt.c
517
if ((x2 = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_crypt.c
521
if ((y2 = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_crypt.c
545
sm2_ctext->C1y, ctx))
lib/libcrypto/sm2/sm2_crypt.c
552
ctx)) {
lib/libcrypto/sm2/sm2_crypt.c
557
if (!EC_POINT_get_affine_coordinates(group, C1, x2, y2, ctx)) {
lib/libcrypto/sm2/sm2_crypt.c
623
BN_CTX_end(ctx);
lib/libcrypto/sm2/sm2_crypt.c
624
BN_CTX_free(ctx);
lib/libcrypto/sm2/sm2_pmeth.c
109
pkey_sm2_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen,
lib/libcrypto/sm2/sm2_pmeth.c
115
if ((sig_sz = ECDSA_size(ctx->pkey->pkey.ec)) <= 0)
lib/libcrypto/sm2/sm2_pmeth.c
128
if ((ret = SM2_sign(tbs, tbslen, sig, &sltmp, ctx->pkey->pkey.ec)) <= 0)
lib/libcrypto/sm2/sm2_pmeth.c
136
pkey_sm2_verify(EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen,
lib/libcrypto/sm2/sm2_pmeth.c
139
return SM2_verify(tbs, tbslen, sig, siglen, ctx->pkey->pkey.ec);
lib/libcrypto/sm2/sm2_pmeth.c
143
pkey_sm2_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
lib/libcrypto/sm2/sm2_pmeth.c
146
SM2_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/sm2/sm2_pmeth.c
150
if (!SM2_ciphertext_size(ctx->pkey->pkey.ec, md, inlen, outlen))
lib/libcrypto/sm2/sm2_pmeth.c
156
return SM2_encrypt(ctx->pkey->pkey.ec, md, in, inlen, out, outlen);
lib/libcrypto/sm2/sm2_pmeth.c
160
pkey_sm2_decrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen,
lib/libcrypto/sm2/sm2_pmeth.c
163
SM2_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/sm2/sm2_pmeth.c
167
if (!SM2_plaintext_size(ctx->pkey->pkey.ec, md, inlen, outlen))
lib/libcrypto/sm2/sm2_pmeth.c
173
return SM2_decrypt(ctx->pkey->pkey.ec, md, in, inlen, out, outlen);
lib/libcrypto/sm2/sm2_pmeth.c
177
pkey_sm2_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
lib/libcrypto/sm2/sm2_pmeth.c
179
SM2_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/sm2/sm2_pmeth.c
242
ctx->pkey->pkey.ec) != 1) {
lib/libcrypto/sm2/sm2_pmeth.c
278
pkey_sm2_ctrl_str(EVP_PKEY_CTX *ctx, const char *type, const char *value)
lib/libcrypto/sm2/sm2_pmeth.c
289
return EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid);
lib/libcrypto/sm2/sm2_pmeth.c
291
return EVP_PKEY_CTX_set_sm2_uid(ctx, (void*) value,
lib/libcrypto/sm2/sm2_pmeth.c
45
pkey_sm2_init(EVP_PKEY_CTX *ctx)
lib/libcrypto/sm2/sm2_pmeth.c
53
ctx->data = dctx;
lib/libcrypto/sm2/sm2_pmeth.c
58
pkey_sm2_cleanup(EVP_PKEY_CTX *ctx)
lib/libcrypto/sm2/sm2_pmeth.c
60
SM2_PKEY_CTX *dctx = ctx->data;
lib/libcrypto/sm2/sm2_pmeth.c
62
if (ctx == NULL || ctx->data == NULL)
lib/libcrypto/sm2/sm2_pmeth.c
68
ctx->data = NULL;
lib/libcrypto/sm2/sm2_sign.c
124
if ((ctx = BN_CTX_new()) == NULL) {
lib/libcrypto/sm2/sm2_sign.c
129
BN_CTX_start(ctx);
lib/libcrypto/sm2/sm2_sign.c
131
if ((k = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_sign.c
135
if ((rk = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_sign.c
139
if ((x1 = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_sign.c
143
if ((tmp = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_sign.c
164
if (!EC_POINT_mul(group, kG, k, NULL, NULL, ctx)) {
lib/libcrypto/sm2/sm2_sign.c
170
ctx)) {
lib/libcrypto/sm2/sm2_sign.c
175
if (!BN_mod_add(r, e, x1, order, ctx)) {
lib/libcrypto/sm2/sm2_sign.c
197
if (BN_mod_inverse_ct(s, s, order, ctx) == NULL) {
lib/libcrypto/sm2/sm2_sign.c
202
if (!BN_mod_mul(tmp, dA, r, order, ctx)) {
lib/libcrypto/sm2/sm2_sign.c
212
if (!BN_mod_mul(s, s, tmp, order, ctx)) {
lib/libcrypto/sm2/sm2_sign.c
237
BN_CTX_end(ctx);
lib/libcrypto/sm2/sm2_sign.c
238
BN_CTX_free(ctx);
lib/libcrypto/sm2/sm2_sign.c
249
BN_CTX *ctx = NULL;
lib/libcrypto/sm2/sm2_sign.c
258
if ((ctx = BN_CTX_new()) == NULL) {
lib/libcrypto/sm2/sm2_sign.c
263
BN_CTX_start(ctx);
lib/libcrypto/sm2/sm2_sign.c
265
if ((order = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_sign.c
280
if ((t = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_sign.c
284
if ((x1 = BN_CTX_get(ctx)) == NULL) {
lib/libcrypto/sm2/sm2_sign.c
316
if (!BN_mod_add(t, r, s, order, ctx)) {
lib/libcrypto/sm2/sm2_sign.c
326
if (!EC_POINT_mul(group, pt, s, EC_KEY_get0_public_key(key), t, ctx)) {
lib/libcrypto/sm2/sm2_sign.c
331
if (!EC_POINT_get_affine_coordinates(group, pt, x1, NULL, ctx)) {
lib/libcrypto/sm2/sm2_sign.c
337
if (!BN_mod_add(t, e, x1, order, ctx)) {
lib/libcrypto/sm2/sm2_sign.c
346
BN_CTX_end(ctx);
lib/libcrypto/sm2/sm2_sign.c
347
BN_CTX_free(ctx);
lib/libcrypto/sm2/sm2_sign.c
94
BN_CTX *ctx = NULL;
lib/libcrypto/sm2/sm2_za.c
110
EC_GROUP_get0_generator(group), xG, yG, ctx))
lib/libcrypto/sm2/sm2_za.c
130
EC_KEY_get0_public_key(key), xA, yA, ctx))
lib/libcrypto/sm2/sm2_za.c
156
BN_CTX_free(ctx);
lib/libcrypto/sm2/sm2_za.c
31
BN_CTX *ctx = NULL;
lib/libcrypto/sm2/sm2_za.c
45
if ((ctx = BN_CTX_new()) == NULL)
lib/libcrypto/sm2/sm2_za.c
48
if ((p = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/sm2/sm2_za.c
50
if ((a = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/sm2/sm2_za.c
52
if ((b = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/sm2/sm2_za.c
54
if ((xG = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/sm2/sm2_za.c
56
if ((yG = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/sm2/sm2_za.c
58
if ((xA = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/sm2/sm2_za.c
60
if ((yA = BN_CTX_get(ctx)) == NULL)
lib/libcrypto/sm2/sm2_za.c
88
if (!EC_GROUP_get_curve(group, p, a, b, ctx))
lib/libcrypto/sm3/sm3.c
241
ctx->A ^= A;
lib/libcrypto/sm3/sm3.c
242
ctx->B ^= B;
lib/libcrypto/sm3/sm3.c
243
ctx->C ^= C;
lib/libcrypto/sm3/sm3.c
244
ctx->D ^= D;
lib/libcrypto/sm3/sm3.c
245
ctx->E ^= E;
lib/libcrypto/sm3/sm3.c
246
ctx->F ^= F;
lib/libcrypto/sm3/sm3.c
247
ctx->G ^= G;
lib/libcrypto/sm3/sm3.c
248
ctx->H ^= H;
lib/libcrypto/sm3/sm3.c
62
sm3_block_data_order(SM3_CTX *ctx, const void *_in, size_t num)
lib/libcrypto/sm3/sm3.c
71
A = ctx->A;
lib/libcrypto/sm3/sm3.c
72
B = ctx->B;
lib/libcrypto/sm3/sm3.c
73
C = ctx->C;
lib/libcrypto/sm3/sm3.c
74
D = ctx->D;
lib/libcrypto/sm3/sm3.c
75
E = ctx->E;
lib/libcrypto/sm3/sm3.c
76
F = ctx->F;
lib/libcrypto/sm3/sm3.c
77
G = ctx->G;
lib/libcrypto/sm3/sm3.c
78
H = ctx->H;
lib/libcrypto/ts/ts.h
362
void TS_RESP_CTX_free(TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
365
int TS_RESP_CTX_set_signer_cert(TS_RESP_CTX *ctx, X509 *signer);
lib/libcrypto/ts/ts.h
368
int TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key);
lib/libcrypto/ts/ts.h
371
int TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *def_policy);
lib/libcrypto/ts/ts.h
374
int TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs);
lib/libcrypto/ts/ts.h
378
int TS_RESP_CTX_add_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *policy);
lib/libcrypto/ts/ts.h
382
int TS_RESP_CTX_add_md(TS_RESP_CTX *ctx, const EVP_MD *md);
lib/libcrypto/ts/ts.h
385
int TS_RESP_CTX_set_accuracy(TS_RESP_CTX *ctx,
lib/libcrypto/ts/ts.h
390
int TS_RESP_CTX_set_clock_precision_digits(TS_RESP_CTX *ctx,
lib/libcrypto/ts/ts.h
396
void TS_RESP_CTX_add_flags(TS_RESP_CTX *ctx, int flags);
lib/libcrypto/ts/ts.h
399
void TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data);
lib/libcrypto/ts/ts.h
402
void TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data);
lib/libcrypto/ts/ts.h
407
void TS_RESP_CTX_set_extension_cb(TS_RESP_CTX *ctx,
lib/libcrypto/ts/ts.h
411
int TS_RESP_CTX_set_status_info(TS_RESP_CTX *ctx,
lib/libcrypto/ts/ts.h
415
int TS_RESP_CTX_set_status_info_cond(TS_RESP_CTX *ctx,
lib/libcrypto/ts/ts.h
418
int TS_RESP_CTX_add_failure_info(TS_RESP_CTX *ctx, int failure);
lib/libcrypto/ts/ts.h
421
TS_REQ *TS_RESP_CTX_get_request(TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
423
TS_TST_INFO *TS_RESP_CTX_get_tst_info(TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
430
TS_RESP *TS_RESP_create_response(TS_RESP_CTX *ctx, BIO *req_bio);
lib/libcrypto/ts/ts.h
480
int TS_RESP_verify_response(TS_VERIFY_CTX *ctx, TS_RESP *response);
lib/libcrypto/ts/ts.h
481
int TS_RESP_verify_token(TS_VERIFY_CTX *ctx, PKCS7 *token);
lib/libcrypto/ts/ts.h
490
void TS_VERIFY_CTX_free(TS_VERIFY_CTX *ctx);
lib/libcrypto/ts/ts.h
491
void TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx);
lib/libcrypto/ts/ts.h
493
int TS_VERIFY_CTX_add_flags(TS_VERIFY_CTX *ctx, int flags);
lib/libcrypto/ts/ts.h
494
int TS_VERIFY_CTX_set_flags(TS_VERIFY_CTX *ctx, int flags);
lib/libcrypto/ts/ts.h
495
BIO *TS_VERIFY_CTX_set_data(TS_VERIFY_CTX *ctx, BIO *bio);
lib/libcrypto/ts/ts.h
496
X509_STORE *TS_VERIFY_CTX_set_store(TS_VERIFY_CTX *ctx, X509_STORE *store);
lib/libcrypto/ts/ts.h
499
STACK_OF(X509) *TS_VERIFY_CTX_set_certs(TS_VERIFY_CTX *ctx,
lib/libcrypto/ts/ts.h
501
unsigned char *TS_VERIFY_CTX_set_imprint(TS_VERIFY_CTX *ctx,
lib/libcrypto/ts/ts.h
520
TS_VERIFY_CTX *TS_REQ_to_TS_VERIFY_CTX(TS_REQ *req, TS_VERIFY_CTX *ctx);
lib/libcrypto/ts/ts.h
544
TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
546
const char *cert, TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
548
TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
550
const char *key, const char *pass, TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
552
const char *policy, TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
553
int TS_CONF_set_policies(CONF *conf, const char *section, TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
554
int TS_CONF_set_digests(CONF *conf, const char *section, TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
555
int TS_CONF_set_accuracy(CONF *conf, const char *section, TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
557
TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
558
int TS_CONF_set_ordering(CONF *conf, const char *section, TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
559
int TS_CONF_set_tsa_name(CONF *conf, const char *section, TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts.h
561
TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts_conf.c
193
TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
202
TS_RESP_CTX_set_serial_cb(ctx, cb, serial);
lib/libcrypto/ts/ts_conf.c
213
TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
226
if (!TS_RESP_CTX_set_signer_cert(ctx, cert_obj))
lib/libcrypto/ts/ts_conf.c
239
TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
251
if (!TS_RESP_CTX_set_certs(ctx, certs_obj))
lib/libcrypto/ts/ts_conf.c
264
const char *pass, TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
277
if (!TS_RESP_CTX_set_signer_key(ctx, key_obj))
lib/libcrypto/ts/ts_conf.c
290
TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
305
if (!TS_RESP_CTX_set_def_policy(ctx, policy_obj))
lib/libcrypto/ts/ts_conf.c
317
TS_CONF_set_policies(CONF *conf, const char *section, TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
337
if (!TS_RESP_CTX_add_policy(ctx, objtmp))
lib/libcrypto/ts/ts_conf.c
351
TS_CONF_set_digests(CONF *conf, const char *section, TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
378
if (!TS_RESP_CTX_add_md(ctx, md))
lib/libcrypto/ts/ts_conf.c
391
TS_CONF_set_accuracy(CONF *conf, const char *section, TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
439
if (!TS_RESP_CTX_set_accuracy(ctx, secs, millis, micros))
lib/libcrypto/ts/ts_conf.c
452
TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
467
if (!TS_RESP_CTX_set_clock_precision_digits(ctx, digits))
lib/libcrypto/ts/ts_conf.c
479
TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
486
TS_RESP_CTX_add_flags(ctx, flag);
lib/libcrypto/ts/ts_conf.c
497
TS_CONF_set_ordering(CONF *conf, const char *section, TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
499
return TS_CONF_add_flag(conf, section, ENV_ORDERING, TS_ORDERING, ctx);
lib/libcrypto/ts/ts_conf.c
504
TS_CONF_set_tsa_name(CONF *conf, const char *section, TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
506
return TS_CONF_add_flag(conf, section, ENV_TSA_NAME, TS_TSA_NAME, ctx);
lib/libcrypto/ts/ts_conf.c
511
TS_CONF_set_ess_cert_id_chain(CONF *conf, const char *section, TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_conf.c
514
TS_ESS_CERT_ID_CHAIN, ctx);
lib/libcrypto/ts/ts_rsp_sign.c
110
TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION,
lib/libcrypto/ts/ts_rsp_sign.c
118
def_time_cb(struct TS_resp_ctx *ctx, void *data, time_t *sec, long *usec)
lib/libcrypto/ts/ts_rsp_sign.c
124
TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION,
lib/libcrypto/ts/ts_rsp_sign.c
126
TS_RESP_CTX_add_failure_info(ctx, TS_INFO_TIME_NOT_AVAILABLE);
lib/libcrypto/ts/ts_rsp_sign.c
137
def_extension_cb(struct TS_resp_ctx *ctx, X509_EXTENSION *ext, void *data)
lib/libcrypto/ts/ts_rsp_sign.c
140
TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION,
lib/libcrypto/ts/ts_rsp_sign.c
142
TS_RESP_CTX_add_failure_info(ctx, TS_INFO_UNACCEPTED_EXTENSION);
lib/libcrypto/ts/ts_rsp_sign.c
147
TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data)
lib/libcrypto/ts/ts_rsp_sign.c
149
ctx->time_cb = cb;
lib/libcrypto/ts/ts_rsp_sign.c
150
ctx->time_cb_data = data;
lib/libcrypto/ts/ts_rsp_sign.c
159
TS_RESP_CTX *ctx;
lib/libcrypto/ts/ts_rsp_sign.c
161
if (!(ctx = calloc(1, sizeof(TS_RESP_CTX)))) {
lib/libcrypto/ts/ts_rsp_sign.c
167
ctx->serial_cb = def_serial_cb;
lib/libcrypto/ts/ts_rsp_sign.c
168
ctx->time_cb = def_time_cb;
lib/libcrypto/ts/ts_rsp_sign.c
169
ctx->extension_cb = def_extension_cb;
lib/libcrypto/ts/ts_rsp_sign.c
171
return ctx;
lib/libcrypto/ts/ts_rsp_sign.c
176
TS_RESP_CTX_free(TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_rsp_sign.c
178
if (!ctx)
lib/libcrypto/ts/ts_rsp_sign.c
181
X509_free(ctx->signer_cert);
lib/libcrypto/ts/ts_rsp_sign.c
182
EVP_PKEY_free(ctx->signer_key);
lib/libcrypto/ts/ts_rsp_sign.c
183
sk_X509_pop_free(ctx->certs, X509_free);
lib/libcrypto/ts/ts_rsp_sign.c
184
sk_ASN1_OBJECT_pop_free(ctx->policies, ASN1_OBJECT_free);
lib/libcrypto/ts/ts_rsp_sign.c
185
ASN1_OBJECT_free(ctx->default_policy);
lib/libcrypto/ts/ts_rsp_sign.c
186
sk_EVP_MD_free(ctx->mds); /* No EVP_MD_free method exists. */
lib/libcrypto/ts/ts_rsp_sign.c
187
ASN1_INTEGER_free(ctx->seconds);
lib/libcrypto/ts/ts_rsp_sign.c
188
ASN1_INTEGER_free(ctx->millis);
lib/libcrypto/ts/ts_rsp_sign.c
189
ASN1_INTEGER_free(ctx->micros);
lib/libcrypto/ts/ts_rsp_sign.c
190
free(ctx);
lib/libcrypto/ts/ts_rsp_sign.c
195
TS_RESP_CTX_set_signer_cert(TS_RESP_CTX *ctx, X509 *signer)
lib/libcrypto/ts/ts_rsp_sign.c
201
X509_free(ctx->signer_cert);
lib/libcrypto/ts/ts_rsp_sign.c
202
ctx->signer_cert = signer;
lib/libcrypto/ts/ts_rsp_sign.c
203
CRYPTO_add(&ctx->signer_cert->references, +1, CRYPTO_LOCK_X509);
lib/libcrypto/ts/ts_rsp_sign.c
209
TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key)
lib/libcrypto/ts/ts_rsp_sign.c
211
EVP_PKEY_free(ctx->signer_key);
lib/libcrypto/ts/ts_rsp_sign.c
212
ctx->signer_key = key;
lib/libcrypto/ts/ts_rsp_sign.c
213
CRYPTO_add(&ctx->signer_key->references, +1, CRYPTO_LOCK_EVP_PKEY);
lib/libcrypto/ts/ts_rsp_sign.c
220
TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *def_policy)
lib/libcrypto/ts/ts_rsp_sign.c
222
if (ctx->default_policy)
lib/libcrypto/ts/ts_rsp_sign.c
223
ASN1_OBJECT_free(ctx->default_policy);
lib/libcrypto/ts/ts_rsp_sign.c
224
if (!(ctx->default_policy = OBJ_dup(def_policy)))
lib/libcrypto/ts/ts_rsp_sign.c
235
TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs)
lib/libcrypto/ts/ts_rsp_sign.c
239
if (ctx->certs) {
lib/libcrypto/ts/ts_rsp_sign.c
240
sk_X509_pop_free(ctx->certs, X509_free);
lib/libcrypto/ts/ts_rsp_sign.c
241
ctx->certs = NULL;
lib/libcrypto/ts/ts_rsp_sign.c
245
if (!(ctx->certs = sk_X509_dup(certs))) {
lib/libcrypto/ts/ts_rsp_sign.c
249
for (i = 0; i < sk_X509_num(ctx->certs); ++i) {
lib/libcrypto/ts/ts_rsp_sign.c
250
X509 *cert = sk_X509_value(ctx->certs, i);
lib/libcrypto/ts/ts_rsp_sign.c
259
TS_RESP_CTX_add_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *policy)
lib/libcrypto/ts/ts_rsp_sign.c
264
if (!ctx->policies && !(ctx->policies = sk_ASN1_OBJECT_new_null()))
lib/libcrypto/ts/ts_rsp_sign.c
268
if (!sk_ASN1_OBJECT_push(ctx->policies, copy))
lib/libcrypto/ts/ts_rsp_sign.c
281
TS_RESP_CTX_add_md(TS_RESP_CTX *ctx, const EVP_MD *md)
lib/libcrypto/ts/ts_rsp_sign.c
284
if (!ctx->mds && !(ctx->mds = sk_EVP_MD_new_null()))
lib/libcrypto/ts/ts_rsp_sign.c
287
if (!sk_EVP_MD_push(ctx->mds, (EVP_MD *)md))
lib/libcrypto/ts/ts_rsp_sign.c
298
#define TS_RESP_CTX_accuracy_free(ctx) \
lib/libcrypto/ts/ts_rsp_sign.c
299
ASN1_INTEGER_free(ctx->seconds); \
lib/libcrypto/ts/ts_rsp_sign.c
300
ctx->seconds = NULL; \
lib/libcrypto/ts/ts_rsp_sign.c
301
ASN1_INTEGER_free(ctx->millis); \
lib/libcrypto/ts/ts_rsp_sign.c
302
ctx->millis = NULL; \
lib/libcrypto/ts/ts_rsp_sign.c
303
ASN1_INTEGER_free(ctx->micros); \
lib/libcrypto/ts/ts_rsp_sign.c
304
ctx->micros = NULL;
lib/libcrypto/ts/ts_rsp_sign.c
307
TS_RESP_CTX_set_accuracy(TS_RESP_CTX *ctx, int secs, int millis, int micros)
lib/libcrypto/ts/ts_rsp_sign.c
309
TS_RESP_CTX_accuracy_free(ctx);
lib/libcrypto/ts/ts_rsp_sign.c
310
if (secs && (!(ctx->seconds = ASN1_INTEGER_new()) ||
lib/libcrypto/ts/ts_rsp_sign.c
311
!ASN1_INTEGER_set(ctx->seconds, secs)))
lib/libcrypto/ts/ts_rsp_sign.c
313
if (millis && (!(ctx->millis = ASN1_INTEGER_new()) ||
lib/libcrypto/ts/ts_rsp_sign.c
314
!ASN1_INTEGER_set(ctx->millis, millis)))
lib/libcrypto/ts/ts_rsp_sign.c
316
if (micros && (!(ctx->micros = ASN1_INTEGER_new()) ||
lib/libcrypto/ts/ts_rsp_sign.c
317
!ASN1_INTEGER_set(ctx->micros, micros)))
lib/libcrypto/ts/ts_rsp_sign.c
323
TS_RESP_CTX_accuracy_free(ctx);
lib/libcrypto/ts/ts_rsp_sign.c
330
TS_RESP_CTX_add_flags(TS_RESP_CTX *ctx, int flags)
lib/libcrypto/ts/ts_rsp_sign.c
332
ctx->flags |= flags;
lib/libcrypto/ts/ts_rsp_sign.c
337
TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data)
lib/libcrypto/ts/ts_rsp_sign.c
339
ctx->serial_cb = cb;
lib/libcrypto/ts/ts_rsp_sign.c
340
ctx->serial_cb_data = data;
lib/libcrypto/ts/ts_rsp_sign.c
345
TS_RESP_CTX_set_extension_cb(TS_RESP_CTX *ctx, TS_extension_cb cb, void *data)
lib/libcrypto/ts/ts_rsp_sign.c
347
ctx->extension_cb = cb;
lib/libcrypto/ts/ts_rsp_sign.c
348
ctx->extension_cb_data = data;
lib/libcrypto/ts/ts_rsp_sign.c
353
TS_RESP_CTX_set_status_info(TS_RESP_CTX *ctx, int status, const char *text)
lib/libcrypto/ts/ts_rsp_sign.c
373
if (!TS_RESP_set_status_info(ctx->response, si))
lib/libcrypto/ts/ts_rsp_sign.c
387
TS_RESP_CTX_set_status_info_cond(TS_RESP_CTX *ctx, int status, const char *text)
lib/libcrypto/ts/ts_rsp_sign.c
390
TS_STATUS_INFO *si = TS_RESP_get_status_info(ctx->response);
lib/libcrypto/ts/ts_rsp_sign.c
394
ret = TS_RESP_CTX_set_status_info(ctx, status, text);
lib/libcrypto/ts/ts_rsp_sign.c
401
TS_RESP_CTX_add_failure_info(TS_RESP_CTX *ctx, int failure)
lib/libcrypto/ts/ts_rsp_sign.c
403
TS_STATUS_INFO *si = TS_RESP_get_status_info(ctx->response);
lib/libcrypto/ts/ts_rsp_sign.c
418
TS_RESP_CTX_get_request(TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_rsp_sign.c
420
return ctx->request;
lib/libcrypto/ts/ts_rsp_sign.c
425
TS_RESP_CTX_get_tst_info(TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_rsp_sign.c
427
return ctx->tst_info;
lib/libcrypto/ts/ts_rsp_sign.c
432
TS_RESP_CTX_set_clock_precision_digits(TS_RESP_CTX *ctx, unsigned precision)
lib/libcrypto/ts/ts_rsp_sign.c
436
ctx->clock_precision_digits = precision;
lib/libcrypto/ts/ts_rsp_sign.c
443
TS_RESP_create_response(TS_RESP_CTX *ctx, BIO *req_bio)
lib/libcrypto/ts/ts_rsp_sign.c
449
TS_RESP_CTX_init(ctx);
lib/libcrypto/ts/ts_rsp_sign.c
452
if (!(ctx->response = TS_RESP_new())) {
lib/libcrypto/ts/ts_rsp_sign.c
458
if (!(ctx->request = d2i_TS_REQ_bio(req_bio, NULL))) {
lib/libcrypto/ts/ts_rsp_sign.c
459
TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION,
lib/libcrypto/ts/ts_rsp_sign.c
462
TS_RESP_CTX_add_failure_info(ctx, TS_INFO_BAD_DATA_FORMAT);
lib/libcrypto/ts/ts_rsp_sign.c
467
if (!TS_RESP_CTX_set_status_info(ctx, TS_STATUS_GRANTED, NULL))
lib/libcrypto/ts/ts_rsp_sign.c
471
if (!TS_RESP_check_request(ctx))
lib/libcrypto/ts/ts_rsp_sign.c
475
if (!(policy = TS_RESP_get_policy(ctx)))
lib/libcrypto/ts/ts_rsp_sign.c
479
if (!(ctx->tst_info = TS_RESP_create_tst_info(ctx, policy)))
lib/libcrypto/ts/ts_rsp_sign.c
483
if (!TS_RESP_process_extensions(ctx))
lib/libcrypto/ts/ts_rsp_sign.c
487
if (!TS_RESP_sign(ctx))
lib/libcrypto/ts/ts_rsp_sign.c
496
if (ctx->response != NULL) {
lib/libcrypto/ts/ts_rsp_sign.c
497
if (TS_RESP_CTX_set_status_info_cond(ctx,
lib/libcrypto/ts/ts_rsp_sign.c
500
TS_RESP_free(ctx->response);
lib/libcrypto/ts/ts_rsp_sign.c
501
ctx->response = NULL;
lib/libcrypto/ts/ts_rsp_sign.c
505
response = ctx->response;
lib/libcrypto/ts/ts_rsp_sign.c
506
ctx->response = NULL; /* Ownership will be returned to caller. */
lib/libcrypto/ts/ts_rsp_sign.c
507
TS_RESP_CTX_cleanup(ctx);
lib/libcrypto/ts/ts_rsp_sign.c
514
TS_RESP_CTX_init(TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_rsp_sign.c
516
ctx->request = NULL;
lib/libcrypto/ts/ts_rsp_sign.c
517
ctx->response = NULL;
lib/libcrypto/ts/ts_rsp_sign.c
518
ctx->tst_info = NULL;
lib/libcrypto/ts/ts_rsp_sign.c
523
TS_RESP_CTX_cleanup(TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_rsp_sign.c
525
TS_REQ_free(ctx->request);
lib/libcrypto/ts/ts_rsp_sign.c
526
ctx->request = NULL;
lib/libcrypto/ts/ts_rsp_sign.c
527
TS_RESP_free(ctx->response);
lib/libcrypto/ts/ts_rsp_sign.c
528
ctx->response = NULL;
lib/libcrypto/ts/ts_rsp_sign.c
529
TS_TST_INFO_free(ctx->tst_info);
lib/libcrypto/ts/ts_rsp_sign.c
530
ctx->tst_info = NULL;
lib/libcrypto/ts/ts_rsp_sign.c
535
TS_RESP_check_request(TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_rsp_sign.c
537
TS_REQ *request = ctx->request;
lib/libcrypto/ts/ts_rsp_sign.c
547
TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION,
lib/libcrypto/ts/ts_rsp_sign.c
549
TS_RESP_CTX_add_failure_info(ctx, TS_INFO_BAD_REQUEST);
lib/libcrypto/ts/ts_rsp_sign.c
557
for (i = 0; !md && i < sk_EVP_MD_num(ctx->mds); ++i) {
lib/libcrypto/ts/ts_rsp_sign.c
558
EVP_MD *current_md = sk_EVP_MD_value(ctx->mds, i);
lib/libcrypto/ts/ts_rsp_sign.c
563
TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION,
lib/libcrypto/ts/ts_rsp_sign.c
566
TS_RESP_CTX_add_failure_info(ctx, TS_INFO_BAD_ALG);
lib/libcrypto/ts/ts_rsp_sign.c
573
TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION,
lib/libcrypto/ts/ts_rsp_sign.c
576
TS_RESP_CTX_add_failure_info(ctx, TS_INFO_BAD_ALG);
lib/libcrypto/ts/ts_rsp_sign.c
582
TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION,
lib/libcrypto/ts/ts_rsp_sign.c
584
TS_RESP_CTX_add_failure_info(ctx, TS_INFO_BAD_DATA_FORMAT);
lib/libcrypto/ts/ts_rsp_sign.c
593
TS_RESP_get_policy(TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_rsp_sign.c
595
ASN1_OBJECT *requested = TS_REQ_get_policy_id(ctx->request);
lib/libcrypto/ts/ts_rsp_sign.c
599
if (ctx->default_policy == NULL) {
lib/libcrypto/ts/ts_rsp_sign.c
605
if (!requested || !OBJ_cmp(requested, ctx->default_policy))
lib/libcrypto/ts/ts_rsp_sign.c
606
policy = ctx->default_policy;
lib/libcrypto/ts/ts_rsp_sign.c
609
for (i = 0; !policy && i < sk_ASN1_OBJECT_num(ctx->policies); ++i) {
lib/libcrypto/ts/ts_rsp_sign.c
610
ASN1_OBJECT *current = sk_ASN1_OBJECT_value(ctx->policies, i);
lib/libcrypto/ts/ts_rsp_sign.c
616
TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION,
lib/libcrypto/ts/ts_rsp_sign.c
619
TS_RESP_CTX_add_failure_info(ctx, TS_INFO_UNACCEPTED_POLICY);
lib/libcrypto/ts/ts_rsp_sign.c
626
TS_RESP_create_tst_info(TS_RESP_CTX *ctx, ASN1_OBJECT *policy)
lib/libcrypto/ts/ts_rsp_sign.c
644
if (!TS_TST_INFO_set_msg_imprint(tst_info, ctx->request->msg_imprint))
lib/libcrypto/ts/ts_rsp_sign.c
646
if (!(serial = (*ctx->serial_cb)(ctx, ctx->serial_cb_data)) ||
lib/libcrypto/ts/ts_rsp_sign.c
649
if (!(*ctx->time_cb)(ctx, ctx->time_cb_data, &sec, &usec) ||
lib/libcrypto/ts/ts_rsp_sign.c
655
if ((ctx->seconds || ctx->millis || ctx->micros) &&
lib/libcrypto/ts/ts_rsp_sign.c
659
if (ctx->seconds && !TS_ACCURACY_set_seconds(accuracy, ctx->seconds))
lib/libcrypto/ts/ts_rsp_sign.c
661
if (ctx->millis && !TS_ACCURACY_set_millis(accuracy, ctx->millis))
lib/libcrypto/ts/ts_rsp_sign.c
663
if (ctx->micros && !TS_ACCURACY_set_micros(accuracy, ctx->micros))
lib/libcrypto/ts/ts_rsp_sign.c
669
if ((ctx->flags & TS_ORDERING) &&
lib/libcrypto/ts/ts_rsp_sign.c
674
if ((nonce = TS_REQ_get_nonce(ctx->request)) != NULL &&
lib/libcrypto/ts/ts_rsp_sign.c
679
if (ctx->flags & TS_TSA_NAME) {
lib/libcrypto/ts/ts_rsp_sign.c
684
X509_NAME_dup(X509_get_subject_name(ctx->signer_cert));
lib/libcrypto/ts/ts_rsp_sign.c
698
TS_RESP_CTX_set_status_info_cond(ctx, TS_STATUS_REJECTION,
lib/libcrypto/ts/ts_rsp_sign.c
712
TS_RESP_process_extensions(TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_rsp_sign.c
714
STACK_OF(X509_EXTENSION) *exts = TS_REQ_get_exts(ctx->request);
lib/libcrypto/ts/ts_rsp_sign.c
727
ok = (*ctx->extension_cb)(ctx, ext, NULL);
lib/libcrypto/ts/ts_rsp_sign.c
735
TS_RESP_sign(TS_RESP_CTX *ctx)
lib/libcrypto/ts/ts_rsp_sign.c
747
if (!X509_check_private_key(ctx->signer_cert, ctx->signer_key)) {
lib/libcrypto/ts/ts_rsp_sign.c
765
if (TS_REQ_get_cert_req(ctx->request)) {
lib/libcrypto/ts/ts_rsp_sign.c
766
PKCS7_add_certificate(p7, ctx->signer_cert);
lib/libcrypto/ts/ts_rsp_sign.c
767
if (ctx->certs) {
lib/libcrypto/ts/ts_rsp_sign.c
768
for (i = 0; i < sk_X509_num(ctx->certs); ++i) {
lib/libcrypto/ts/ts_rsp_sign.c
769
X509 *cert = sk_X509_value(ctx->certs, i);
lib/libcrypto/ts/ts_rsp_sign.c
776
if (!(si = PKCS7_add_signature(p7, ctx->signer_cert,
lib/libcrypto/ts/ts_rsp_sign.c
777
ctx->signer_key, EVP_sha1()))) {
lib/libcrypto/ts/ts_rsp_sign.c
78
static void TS_RESP_CTX_init(TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts_rsp_sign.c
79
static void TS_RESP_CTX_cleanup(TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts_rsp_sign.c
792
certs = ctx->flags & TS_ESS_CERT_ID_CHAIN ? ctx->certs : NULL;
lib/libcrypto/ts/ts_rsp_sign.c
793
if (!(sc = ESS_SIGNING_CERT_new_init(ctx->signer_cert, certs)))
lib/libcrypto/ts/ts_rsp_sign.c
80
static int TS_RESP_check_request(TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts_rsp_sign.c
81
static ASN1_OBJECT *TS_RESP_get_policy(TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts_rsp_sign.c
813
if (!i2d_TS_TST_INFO_bio(p7bio, ctx->tst_info)) {
lib/libcrypto/ts/ts_rsp_sign.c
82
static TS_TST_INFO *TS_RESP_create_tst_info(TS_RESP_CTX *ctx,
lib/libcrypto/ts/ts_rsp_sign.c
825
TS_RESP_set_tst_info(ctx->response, p7, ctx->tst_info);
lib/libcrypto/ts/ts_rsp_sign.c
827
ctx->tst_info = NULL; /* Ownership is lost. */
lib/libcrypto/ts/ts_rsp_sign.c
833
TS_RESP_CTX_set_status_info_cond(ctx, TS_STATUS_REJECTION,
lib/libcrypto/ts/ts_rsp_sign.c
84
static int TS_RESP_process_extensions(TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts_rsp_sign.c
85
static int TS_RESP_sign(TS_RESP_CTX *ctx);
lib/libcrypto/ts/ts_rsp_sign.c
96
def_serial_cb(struct TS_resp_ctx *ctx, void *data)
lib/libcrypto/ts/ts_rsp_verify.c
472
TS_RESP_verify_response(TS_VERIFY_CTX *ctx, TS_RESP *response)
lib/libcrypto/ts/ts_rsp_verify.c
483
if (!int_TS_RESP_verify_token(ctx, token, tst_info))
lib/libcrypto/ts/ts_rsp_verify.c
498
TS_RESP_verify_token(TS_VERIFY_CTX *ctx, PKCS7 *token)
lib/libcrypto/ts/ts_rsp_verify.c
504
ret = int_TS_RESP_verify_token(ctx, token, tst_info);
lib/libcrypto/ts/ts_rsp_verify.c
524
int_TS_RESP_verify_token(TS_VERIFY_CTX *ctx, PKCS7 *token,
lib/libcrypto/ts/ts_rsp_verify.c
535
if ((ctx->flags & TS_VFY_SIGNATURE) &&
lib/libcrypto/ts/ts_rsp_verify.c
536
!TS_RESP_verify_signature(token, ctx->certs, ctx->store, &signer))
lib/libcrypto/ts/ts_rsp_verify.c
540
if ((ctx->flags & TS_VFY_VERSION) &&
lib/libcrypto/ts/ts_rsp_verify.c
547
if ((ctx->flags & TS_VFY_POLICY) &&
lib/libcrypto/ts/ts_rsp_verify.c
548
!TS_check_policy(ctx->policy, tst_info))
lib/libcrypto/ts/ts_rsp_verify.c
552
if ((ctx->flags & TS_VFY_IMPRINT) &&
lib/libcrypto/ts/ts_rsp_verify.c
553
!TS_check_imprints(ctx->md_alg, ctx->imprint, ctx->imprint_len,
lib/libcrypto/ts/ts_rsp_verify.c
558
if ((ctx->flags & TS_VFY_DATA) &&
lib/libcrypto/ts/ts_rsp_verify.c
559
(!TS_compute_imprint(ctx->data, tst_info,
lib/libcrypto/ts/ts_rsp_verify.c
565
if ((ctx->flags & TS_VFY_NONCE) &&
lib/libcrypto/ts/ts_rsp_verify.c
566
!TS_check_nonces(ctx->nonce, tst_info))
lib/libcrypto/ts/ts_rsp_verify.c
570
if ((ctx->flags & TS_VFY_SIGNER) &&
lib/libcrypto/ts/ts_rsp_verify.c
577
if ((ctx->flags & TS_VFY_TSA_NAME) &&
lib/libcrypto/ts/ts_rsp_verify.c
578
!TS_check_signer_name(ctx->tsa_name, signer)) {
lib/libcrypto/ts/ts_rsp_verify.c
81
static int int_TS_RESP_verify_token(TS_VERIFY_CTX *ctx,
lib/libcrypto/ts/ts_verify_ctx.c
101
X509_ALGOR_free(ctx->md_alg);
lib/libcrypto/ts/ts_verify_ctx.c
102
free(ctx->imprint);
lib/libcrypto/ts/ts_verify_ctx.c
104
BIO_free_all(ctx->data);
lib/libcrypto/ts/ts_verify_ctx.c
106
ASN1_INTEGER_free(ctx->nonce);
lib/libcrypto/ts/ts_verify_ctx.c
108
GENERAL_NAME_free(ctx->tsa_name);
lib/libcrypto/ts/ts_verify_ctx.c
110
memset(ctx, 0, sizeof(*ctx));
lib/libcrypto/ts/ts_verify_ctx.c
127
TS_VERIFY_CTX_add_flags(TS_VERIFY_CTX *ctx, int flags)
lib/libcrypto/ts/ts_verify_ctx.c
129
ctx->flags |= flags;
lib/libcrypto/ts/ts_verify_ctx.c
131
return ctx->flags;
lib/libcrypto/ts/ts_verify_ctx.c
136
TS_VERIFY_CTX_set_flags(TS_VERIFY_CTX *ctx, int flags)
lib/libcrypto/ts/ts_verify_ctx.c
138
ctx->flags = flags;
lib/libcrypto/ts/ts_verify_ctx.c
140
return ctx->flags;
lib/libcrypto/ts/ts_verify_ctx.c
145
TS_VERIFY_CTX_set_data(TS_VERIFY_CTX *ctx, BIO *bio)
lib/libcrypto/ts/ts_verify_ctx.c
147
ctx->data = bio;
lib/libcrypto/ts/ts_verify_ctx.c
149
return ctx->data;
lib/libcrypto/ts/ts_verify_ctx.c
154
TS_VERIFY_CTX_set_store(TS_VERIFY_CTX *ctx, X509_STORE *store)
lib/libcrypto/ts/ts_verify_ctx.c
156
ctx->store = store;
lib/libcrypto/ts/ts_verify_ctx.c
158
return ctx->store;
lib/libcrypto/ts/ts_verify_ctx.c
163
TS_VERIFY_CTX_set_certs(TS_VERIFY_CTX *ctx, STACK_OF(X509) *certs)
lib/libcrypto/ts/ts_verify_ctx.c
165
ctx->certs = certs;
lib/libcrypto/ts/ts_verify_ctx.c
167
return ctx->certs;
lib/libcrypto/ts/ts_verify_ctx.c
172
TS_VERIFY_CTX_set_imprint(TS_VERIFY_CTX *ctx, unsigned char *imprint,
lib/libcrypto/ts/ts_verify_ctx.c
175
free(ctx->imprint);
lib/libcrypto/ts/ts_verify_ctx.c
177
ctx->imprint = imprint;
lib/libcrypto/ts/ts_verify_ctx.c
178
ctx->imprint_len = imprint_len;
lib/libcrypto/ts/ts_verify_ctx.c
180
return ctx->imprint;
lib/libcrypto/ts/ts_verify_ctx.c
185
TS_REQ_to_TS_VERIFY_CTX(TS_REQ *req, TS_VERIFY_CTX *ctx)
lib/libcrypto/ts/ts_verify_ctx.c
187
TS_VERIFY_CTX *ret = ctx;
lib/libcrypto/ts/ts_verify_ctx.c
230
if (ctx)
lib/libcrypto/ts/ts_verify_ctx.c
231
TS_VERIFY_CTX_cleanup(ctx);
lib/libcrypto/ts/ts_verify_ctx.c
70
TS_VERIFY_CTX *ctx = calloc(1, sizeof(TS_VERIFY_CTX));
lib/libcrypto/ts/ts_verify_ctx.c
72
if (!ctx)
lib/libcrypto/ts/ts_verify_ctx.c
75
return ctx;
lib/libcrypto/ts/ts_verify_ctx.c
80
TS_VERIFY_CTX_free(TS_VERIFY_CTX *ctx)
lib/libcrypto/ts/ts_verify_ctx.c
82
if (!ctx)
lib/libcrypto/ts/ts_verify_ctx.c
85
TS_VERIFY_CTX_cleanup(ctx);
lib/libcrypto/ts/ts_verify_ctx.c
86
free(ctx);
lib/libcrypto/ts/ts_verify_ctx.c
91
TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx)
lib/libcrypto/ts/ts_verify_ctx.c
93
if (!ctx)
lib/libcrypto/ts/ts_verify_ctx.c
96
X509_STORE_free(ctx->store);
lib/libcrypto/ts/ts_verify_ctx.c
97
sk_X509_pop_free(ctx->certs, X509_free);
lib/libcrypto/ts/ts_verify_ctx.c
99
ASN1_OBJECT_free(ctx->policy);
lib/libcrypto/x509/by_dir.c
115
dir_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl,
lib/libcrypto/x509/by_dir.c
118
BY_DIR *ld = ctx->method_data;
lib/libcrypto/x509/by_dir.c
192
add_cert_dir(BY_DIR *ctx, const char *dir, int type)
lib/libcrypto/x509/by_dir.c
214
for (j = 0; j < sk_BY_DIR_ENTRY_num(ctx->dirs); j++) {
lib/libcrypto/x509/by_dir.c
215
ent = sk_BY_DIR_ENTRY_value(ctx->dirs, j);
lib/libcrypto/x509/by_dir.c
220
if (j < sk_BY_DIR_ENTRY_num(ctx->dirs))
lib/libcrypto/x509/by_dir.c
222
if (ctx->dirs == NULL) {
lib/libcrypto/x509/by_dir.c
223
ctx->dirs = sk_BY_DIR_ENTRY_new_null();
lib/libcrypto/x509/by_dir.c
224
if (ctx->dirs == NULL) {
lib/libcrypto/x509/by_dir.c
242
if (!sk_BY_DIR_ENTRY_push(ctx->dirs, ent)) {
lib/libcrypto/x509/by_dir.c
256
BY_DIR *ctx;
lib/libcrypto/x509/by_dir.c
298
ctx = xl->method_data;
lib/libcrypto/x509/by_dir.c
301
for (i = 0; i < sk_BY_DIR_ENTRY_num(ctx->dirs); i++) {
lib/libcrypto/x509/by_dir.c
306
ent = sk_BY_DIR_ENTRY_value(ctx->dirs, i);
lib/libcrypto/x509/by_dir.c
91
static int dir_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl,
lib/libcrypto/x509/by_dir.c
95
static int add_cert_dir(BY_DIR *ctx, const char *dir, int type);
lib/libcrypto/x509/by_file.c
103
if (X509_load_cert_crl_file(ctx, file, type) != 0)
lib/libcrypto/x509/by_file.c
112
X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type)
lib/libcrypto/x509/by_file.c
139
i = X509_STORE_add_cert(ctx->store_ctx, x);
lib/libcrypto/x509/by_file.c
153
i = X509_STORE_add_cert(ctx->store_ctx, x);
lib/libcrypto/x509/by_file.c
169
X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type)
lib/libcrypto/x509/by_file.c
196
i = X509_STORE_add_crl(ctx->store_ctx, x);
lib/libcrypto/x509/by_file.c
210
i = X509_STORE_add_crl(ctx->store_ctx, x);
lib/libcrypto/x509/by_file.c
226
X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type)
lib/libcrypto/x509/by_file.c
234
return X509_load_cert_file(ctx, file, type);
lib/libcrypto/x509/by_file.c
249
X509_STORE_add_cert(ctx->store_ctx, itmp->x509);
lib/libcrypto/x509/by_file.c
253
X509_STORE_add_crl(ctx->store_ctx, itmp->crl);
lib/libcrypto/x509/by_file.c
71
static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
lib/libcrypto/x509/by_file.c
90
by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argp, long argl,
lib/libcrypto/x509/x509.h
349
int X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx);
lib/libcrypto/x509/x509.h
351
int X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx);
lib/libcrypto/x509/x509.h
353
int X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx);
lib/libcrypto/x509/x509.h
662
ASN1_BIT_STRING *signature, void *asn, EVP_MD_CTX *ctx);
lib/libcrypto/x509/x509.h
903
int X509_verify_cert(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_addr.c
1516
v2i_IPAddrBlocks(const struct v3_ext_method *method, struct v3_ext_ctx *ctx,
lib/libcrypto/x509/x509_addr.c
1848
verify_error(X509_STORE_CTX *ctx, X509 *cert, int error, int depth)
lib/libcrypto/x509/x509_addr.c
1850
if (ctx == NULL)
lib/libcrypto/x509/x509_addr.c
1853
ctx->current_cert = cert;
lib/libcrypto/x509/x509_addr.c
1854
ctx->error = error;
lib/libcrypto/x509/x509_addr.c
1855
ctx->error_depth = depth;
lib/libcrypto/x509/x509_addr.c
1857
return ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_addr.c
1869
addr_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain,
lib/libcrypto/x509/x509_addr.c
1885
if (ctx == NULL && ext == NULL)
lib/libcrypto/x509/x509_addr.c
1888
if (ctx != NULL && ctx->verify_cb == NULL)
lib/libcrypto/x509/x509_addr.c
1900
if ((ret = verify_error(ctx, cert,
lib/libcrypto/x509/x509_addr.c
1907
if ((ret = verify_error(ctx, cert,
lib/libcrypto/x509/x509_addr.c
1915
if (ctx != NULL)
lib/libcrypto/x509/x509_addr.c
1916
ctx->error = X509_V_ERR_OUT_OF_MEM;
lib/libcrypto/x509/x509_addr.c
1929
if ((ret = verify_error(ctx, cert,
lib/libcrypto/x509/x509_addr.c
1942
if ((ret = verify_error(ctx, cert,
lib/libcrypto/x509/x509_addr.c
1970
if ((ret = verify_error(ctx, cert,
lib/libcrypto/x509/x509_addr.c
2007
if ((ret = verify_error(ctx, cert,
lib/libcrypto/x509/x509_addr.c
2023
if ((ret = verify_error(ctx, cert,
lib/libcrypto/x509/x509_addr.c
2036
if (ctx != NULL)
lib/libcrypto/x509/x509_addr.c
2037
ctx->error = X509_V_ERR_UNSPECIFIED;
lib/libcrypto/x509/x509_addr.c
2046
X509v3_addr_validate_path(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_addr.c
2048
if (sk_X509_num(ctx->chain) <= 0 || ctx->verify_cb == NULL) {
lib/libcrypto/x509/x509_addr.c
2049
ctx->error = X509_V_ERR_UNSPECIFIED;
lib/libcrypto/x509/x509_addr.c
2052
return addr_validate_path_internal(ctx, ctx->chain, NULL);
lib/libcrypto/x509/x509_akey.c
157
v2i_AUTHORITY_KEYID(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_akey.c
189
if (!ctx || !ctx->issuer_cert) {
lib/libcrypto/x509/x509_akey.c
190
if (ctx && (ctx->flags == CTX_TEST))
lib/libcrypto/x509/x509_akey.c
196
cert = ctx->issuer_cert;
lib/libcrypto/x509/x509_akey.c
73
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values);
lib/libcrypto/x509/x509_alt.c
336
v2i_issuer_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_alt.c
351
if (!copy_issuer(ctx, gens))
lib/libcrypto/x509/x509_alt.c
355
if ((gen = v2i_GENERAL_NAME(method, ctx, cnf)) == NULL)
lib/libcrypto/x509/x509_alt.c
373
copy_issuer(X509V3_CTX *ctx, GENERAL_NAMES *gens)
lib/libcrypto/x509/x509_alt.c
381
if (ctx && (ctx->flags == CTX_TEST))
lib/libcrypto/x509/x509_alt.c
383
if (!ctx || !ctx->issuer_cert) {
lib/libcrypto/x509/x509_alt.c
387
i = X509_get_ext_by_NID(ctx->issuer_cert, NID_subject_alt_name, -1);
lib/libcrypto/x509/x509_alt.c
390
if (!(ext = X509_get_ext(ctx->issuer_cert, i)) ||
lib/libcrypto/x509/x509_alt.c
418
v2i_subject_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_alt.c
433
if (!copy_email(ctx, gens, 0))
lib/libcrypto/x509/x509_alt.c
437
if (!copy_email(ctx, gens, 1))
lib/libcrypto/x509/x509_alt.c
441
if (!(gen = v2i_GENERAL_NAME(method, ctx, cnf)))
lib/libcrypto/x509/x509_alt.c
461
copy_email(X509V3_CTX *ctx, GENERAL_NAMES *gens, int move_p)
lib/libcrypto/x509/x509_alt.c
469
if (ctx != NULL && ctx->flags == CTX_TEST)
lib/libcrypto/x509/x509_alt.c
471
if (!ctx || (!ctx->subject_cert && !ctx->subject_req)) {
lib/libcrypto/x509/x509_alt.c
476
if (ctx->subject_cert)
lib/libcrypto/x509/x509_alt.c
477
nm = X509_get_subject_name(ctx->subject_cert);
lib/libcrypto/x509/x509_alt.c
479
nm = X509_REQ_get_subject_name(ctx->subject_req);
lib/libcrypto/x509/x509_alt.c
515
v2i_GENERAL_NAMES(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_alt.c
529
if (!(gen = v2i_GENERAL_NAME(method, ctx, cnf)))
lib/libcrypto/x509/x509_alt.c
545
v2i_GENERAL_NAME(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_alt.c
548
return v2i_GENERAL_NAME_ex(NULL, method, ctx, cnf, 0);
lib/libcrypto/x509/x509_alt.c
554
X509V3_CTX *ctx, int gen_type, const char *value, int is_nc)
lib/libcrypto/x509/x509_alt.c
606
if (!do_dirname(gen, value, ctx)) {
lib/libcrypto/x509/x509_alt.c
613
if (!do_othername(gen, value, ctx)) {
lib/libcrypto/x509/x509_alt.c
645
X509V3_CTX *ctx, CONF_VALUE *cnf, int is_nc)
lib/libcrypto/x509/x509_alt.c
682
ret = a2i_GENERAL_NAME(out, method, ctx, type, value, is_nc);
lib/libcrypto/x509/x509_alt.c
69
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
lib/libcrypto/x509/x509_alt.c
71
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
lib/libcrypto/x509/x509_alt.c
72
static int copy_email(X509V3_CTX *ctx, GENERAL_NAMES *gens, int move_p);
lib/libcrypto/x509/x509_alt.c
73
static int copy_issuer(X509V3_CTX *ctx, GENERAL_NAMES *gens);
lib/libcrypto/x509/x509_alt.c
74
static int do_othername(GENERAL_NAME *gen, const char *value, X509V3_CTX *ctx);
lib/libcrypto/x509/x509_alt.c
748
do_othername(GENERAL_NAME *gen, const char *value, X509V3_CTX *ctx)
lib/libcrypto/x509/x509_alt.c
75
static int do_dirname(GENERAL_NAME *gen, const char *value, X509V3_CTX *ctx);
lib/libcrypto/x509/x509_alt.c
761
if (!(gen->d.otherName->value = ASN1_generate_v3(p + 1, ctx)))
lib/libcrypto/x509/x509_alt.c
777
do_dirname(GENERAL_NAME *gen, const char *value, X509V3_CTX *ctx)
lib/libcrypto/x509/x509_alt.c
785
sk = X509V3_get0_section(ctx, value);
lib/libcrypto/x509/x509_asid.c
1074
if (ctx != NULL) { \
lib/libcrypto/x509/x509_asid.c
1075
ctx->error = _err_; \
lib/libcrypto/x509/x509_asid.c
1076
ctx->error_depth = i; \
lib/libcrypto/x509/x509_asid.c
1077
ctx->current_cert = x; \
lib/libcrypto/x509/x509_asid.c
1078
ret = ctx->verify_cb(0, ctx); \
lib/libcrypto/x509/x509_asid.c
1090
asid_validate_path_internal(X509_STORE_CTX *ctx, STACK_OF(X509) *chain,
lib/libcrypto/x509/x509_asid.c
1101
if (ctx == NULL && ext == NULL)
lib/libcrypto/x509/x509_asid.c
1104
if (ctx != NULL && ctx->verify_cb == NULL)
lib/libcrypto/x509/x509_asid.c
1215
if (ctx != NULL)
lib/libcrypto/x509/x509_asid.c
1216
ctx->error = X509_V_ERR_UNSPECIFIED;
lib/libcrypto/x509/x509_asid.c
1227
X509v3_asid_validate_path(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_asid.c
1229
if (sk_X509_num(ctx->chain) <= 0 || ctx->verify_cb == NULL) {
lib/libcrypto/x509/x509_asid.c
1230
ctx->error = X509_V_ERR_UNSPECIFIED;
lib/libcrypto/x509/x509_asid.c
1233
return asid_validate_path_internal(ctx, ctx->chain, NULL);
lib/libcrypto/x509/x509_asid.c
834
v2i_ASIdentifiers(const struct v3_ext_method *method, struct v3_ext_ctx *ctx,
lib/libcrypto/x509/x509_bcons.c
182
v2i_BASIC_CONSTRAINTS(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_bcons.c
73
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values);
lib/libcrypto/x509/x509_bitst.c
205
v2i_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_conf.c
104
X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int nid, const char *value)
lib/libcrypto/x509/x509_conf.c
112
value, crit, ext_type, ctx);
lib/libcrypto/x509/x509_conf.c
113
return do_ext_nconf(conf, ctx, nid, crit, value);
lib/libcrypto/x509/x509_conf.c
118
do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int nid, int crit, const char *value)
lib/libcrypto/x509/x509_conf.c
148
ext_struct = method->v2i(method, ctx, nval);
lib/libcrypto/x509/x509_conf.c
152
ext_struct = method->s2i(method, ctx, value);
lib/libcrypto/x509/x509_conf.c
154
if (ctx->db == NULL) {
lib/libcrypto/x509/x509_conf.c
158
ext_struct = method->r2i(method, ctx, value);
lib/libcrypto/x509/x509_conf.c
276
X509V3_CTX *ctx)
lib/libcrypto/x509/x509_conf.c
293
ext_der = generic_asn1(value, ctx, &ext_len);
lib/libcrypto/x509/x509_conf.c
325
generic_asn1(const char *value, X509V3_CTX *ctx, long *ext_len)
lib/libcrypto/x509/x509_conf.c
330
typ = ASN1_generate_v3(value, ctx);
lib/libcrypto/x509/x509_conf.c
344
X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, const char *section,
lib/libcrypto/x509/x509_conf.c
356
if (!(ext = X509V3_EXT_nconf(conf, ctx, val->name, val->value)))
lib/libcrypto/x509/x509_conf.c
367
X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
lib/libcrypto/x509/x509_conf.c
374
return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk);
lib/libcrypto/x509/x509_conf.c
379
X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
lib/libcrypto/x509/x509_conf.c
386
return X509V3_EXT_add_nconf_sk(conf, ctx, section, sk);
lib/libcrypto/x509/x509_conf.c
391
X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
lib/libcrypto/x509/x509_conf.c
399
i = X509V3_EXT_add_nconf_sk(conf, ctx, section, sk);
lib/libcrypto/x509/x509_conf.c
409
X509V3_get0_section(X509V3_CTX *ctx, const char *section)
lib/libcrypto/x509/x509_conf.c
411
if (ctx->db == NULL) {
lib/libcrypto/x509/x509_conf.c
415
return NCONF_get_section(ctx->db, section);
lib/libcrypto/x509/x509_conf.c
419
X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf)
lib/libcrypto/x509/x509_conf.c
421
ctx->db = conf;
lib/libcrypto/x509/x509_conf.c
426
X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subj, X509_REQ *req,
lib/libcrypto/x509/x509_conf.c
429
ctx->issuer_cert = issuer;
lib/libcrypto/x509/x509_conf.c
430
ctx->subject_cert = subj;
lib/libcrypto/x509/x509_conf.c
431
ctx->crl = crl;
lib/libcrypto/x509/x509_conf.c
432
ctx->subject_req = req;
lib/libcrypto/x509/x509_conf.c
433
ctx->flags = flags;
lib/libcrypto/x509/x509_conf.c
438
X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, const char *name,
lib/libcrypto/x509/x509_conf.c
444
return X509V3_EXT_nconf(&ctmp, ctx, name, value);
lib/libcrypto/x509/x509_conf.c
449
X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx, int nid,
lib/libcrypto/x509/x509_conf.c
455
return X509V3_EXT_nconf_nid(&ctmp, ctx, nid, value);
lib/libcrypto/x509/x509_conf.c
74
static X509_EXTENSION *do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int nid,
lib/libcrypto/x509/x509_conf.c
77
int crit, int type, X509V3_CTX *ctx);
lib/libcrypto/x509/x509_conf.c
80
static unsigned char *generic_asn1(const char *value, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_conf.c
84
X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, const char *name,
lib/libcrypto/x509/x509_conf.c
93
return v3_generic_extension(name, value, crit, ext_type, ctx);
lib/libcrypto/x509/x509_conf.c
94
ret = do_ext_nconf(conf, ctx, OBJ_sn2nid(name), crit, value);
lib/libcrypto/x509/x509_cpols.c
430
r2i_certpol(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *value)
lib/libcrypto/x509/x509_cpols.c
464
polsect = X509V3_get0_section(ctx, pstr + 1);
lib/libcrypto/x509/x509_cpols.c
470
pol = policy_section(ctx, polsect, ia5org);
lib/libcrypto/x509/x509_cpols.c
498
policy_section(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *polstrs, int ia5org)
lib/libcrypto/x509/x509_cpols.c
546
unot = X509V3_get0_section(ctx, cnf->value + 1);
lib/libcrypto/x509/x509_cpols.c
552
qual = notice_section(ctx, unot, ia5org);
lib/libcrypto/x509/x509_cpols.c
586
notice_section(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *unot, int ia5org)
lib/libcrypto/x509/x509_cpols.c
75
X509V3_CTX *ctx, char *value);
lib/libcrypto/x509/x509_cpols.c
79
static POLICYINFO *policy_section(X509V3_CTX *ctx,
lib/libcrypto/x509/x509_cpols.c
81
static POLICYQUALINFO *notice_section(X509V3_CTX *ctx,
lib/libcrypto/x509/x509_crld.c
122
gnames_from_sectname(X509V3_CTX *ctx, char *sect)
lib/libcrypto/x509/x509_crld.c
128
gnsect = X509V3_get0_section(ctx, sect + 1);
lib/libcrypto/x509/x509_crld.c
135
gens = v2i_GENERAL_NAMES(NULL, ctx, gnsect);
lib/libcrypto/x509/x509_crld.c
142
set_dist_point_name(DIST_POINT_NAME **pdp, X509V3_CTX *ctx, CONF_VALUE *cnf)
lib/libcrypto/x509/x509_crld.c
148
fnm = gnames_from_sectname(ctx, cnf->value);
lib/libcrypto/x509/x509_crld.c
158
dnsect = X509V3_get0_section(ctx, cnf->value);
lib/libcrypto/x509/x509_crld.c
280
crldp_from_section(X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval)
lib/libcrypto/x509/x509_crld.c
292
ret = set_dist_point_name(&point->distpoint, ctx, cnf);
lib/libcrypto/x509/x509_crld.c
303
gnames_from_sectname(ctx, cnf->value);
lib/libcrypto/x509/x509_crld.c
317
v2i_crld(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_crld.c
333
dpsect = X509V3_get0_section(ctx, cnf->name);
lib/libcrypto/x509/x509_crld.c
336
point = crldp_from_section(ctx, dpsect);
lib/libcrypto/x509/x509_crld.c
344
if (!(gen = v2i_GENERAL_NAME(method, ctx, cnf)))
lib/libcrypto/x509/x509_crld.c
663
static void *v2i_idp(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_crld.c
690
v2i_idp(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_crld.c
705
ret = set_dist_point_name(&idp->distpoint, ctx, cnf);
lib/libcrypto/x509/x509_crld.c
71
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
lib/libcrypto/x509/x509_d2.c
101
lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_hash_dir());
lib/libcrypto/x509/x509_d2.c
114
X509_STORE_load_mem(X509_STORE *ctx, void *buf, int len)
lib/libcrypto/x509/x509_d2.c
119
lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_mem());
lib/libcrypto/x509/x509_d2.c
67
X509_STORE_set_default_paths(X509_STORE *ctx)
lib/libcrypto/x509/x509_d2.c
71
lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_file());
lib/libcrypto/x509/x509_d2.c
76
lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_hash_dir());
lib/libcrypto/x509/x509_d2.c
89
X509_STORE_load_locations(X509_STORE *ctx, const char *file, const char *path)
lib/libcrypto/x509/x509_d2.c
94
lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_file());
lib/libcrypto/x509/x509_extku.c
202
v2i_EXTENDED_KEY_USAGE(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_extku.c
69
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
lib/libcrypto/x509/x509_ia5.c
250
s2i_ASN1_IA5STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str)
lib/libcrypto/x509/x509_ia5.c
70
X509V3_CTX *ctx, char *str);
lib/libcrypto/x509/x509_info.c
271
v2i_AUTHORITY_INFO_ACCESS(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_info.c
303
if (!v2i_GENERAL_NAME_ex(acc->location, method, ctx, &ctmp, 0))
lib/libcrypto/x509/x509_info.c
73
X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
lib/libcrypto/x509/x509_int.c
110
s2i_asn1_int(X509V3_EXT_METHOD *meth, X509V3_CTX *ctx, char *value)
lib/libcrypto/x509/x509_internal.h
137
int x509_vfy_check_security_level(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_internal.h
90
int x509_vfy_check_id(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_internal.h
91
int x509_vfy_check_revocation(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_internal.h
92
int x509_vfy_check_policy(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_internal.h
93
int x509_vfy_check_trust(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_internal.h
94
int x509_vfy_check_chain_extensions(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_internal.h
95
int x509_vfy_callback_indicate_completion(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_internal.h
97
X509 *x509_vfy_lookup_cert_match(X509_STORE_CTX *ctx, X509 *x);
lib/libcrypto/x509/x509_local.h
267
int (*new_item)(X509_LOOKUP *ctx);
lib/libcrypto/x509/x509_local.h
268
void (*free)(X509_LOOKUP *ctx);
lib/libcrypto/x509/x509_local.h
269
int (*ctrl)(X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
lib/libcrypto/x509/x509_local.h
271
int (*get_by_subject)(X509_LOOKUP *ctx, int type, X509_NAME *name,
lib/libcrypto/x509/x509_local.h
310
int (*verify)(X509_STORE_CTX *ctx); /* called to verify a certificate */
lib/libcrypto/x509/x509_local.h
311
int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */
lib/libcrypto/x509/x509_local.h
312
int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */
lib/libcrypto/x509/x509_local.h
344
int (*verify)(X509_STORE_CTX *ctx); /* called to verify a certificate */
lib/libcrypto/x509/x509_local.h
345
int (*verify_cb)(int ok,X509_STORE_CTX *ctx); /* error callback */
lib/libcrypto/x509/x509_local.h
346
int (*get_issuer)(X509 **issuer, X509_STORE_CTX *ctx, X509 *x); /* get issuers cert from ctx */
lib/libcrypto/x509/x509_local.h
347
int (*check_issued)(X509_STORE_CTX *ctx, X509 *x, X509 *issuer); /* check issued */
lib/libcrypto/x509/x509_local.h
371
int x509_check_cert_time(X509_STORE_CTX *ctx, X509 *x, int quiet);
lib/libcrypto/x509/x509_local.h
455
STACK_OF(CONF_VALUE) *X509V3_get0_section(X509V3_CTX *ctx, const char *section);
lib/libcrypto/x509/x509_lu.c
103
X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl,
lib/libcrypto/x509/x509_lu.c
106
if (ctx->method == NULL)
lib/libcrypto/x509/x509_lu.c
108
if (ctx->method->ctrl == NULL)
lib/libcrypto/x509/x509_lu.c
110
return ctx->method->ctrl(ctx, cmd, argc, argl, ret);
lib/libcrypto/x509/x509_lu.c
115
X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, X509_NAME *name,
lib/libcrypto/x509/x509_lu.c
118
if (ctx->method == NULL || ctx->method->get_by_subject == NULL)
lib/libcrypto/x509/x509_lu.c
120
return ctx->method->get_by_subject(ctx, type, name, ret);
lib/libcrypto/x509/x509_lu.c
299
X509_STORE *ctx = vs->store;
lib/libcrypto/x509/x509_lu.c
304
if (ctx == NULL)
lib/libcrypto/x509/x509_lu.c
310
tmp = X509_OBJECT_retrieve_by_subject(ctx->objs, type, name);
lib/libcrypto/x509/x509_lu.c
314
for (i = 0; i < sk_X509_LOOKUP_num(ctx->get_cert_methods); i++) {
lib/libcrypto/x509/x509_lu.c
315
lu = sk_X509_LOOKUP_value(ctx->get_cert_methods, i);
lib/libcrypto/x509/x509_lu.c
553
X509_STORE_CTX_get1_certs(X509_STORE_CTX *ctx, X509_NAME *name)
lib/libcrypto/x509/x509_lu.c
555
X509_STORE *store = ctx->store;
lib/libcrypto/x509/x509_lu.c
566
obj = X509_STORE_CTX_get_obj_by_subject(ctx, X509_LU_X509, name);
lib/libcrypto/x509/x509_lu.c
576
X509_STORE_CTX_get1_crls(X509_STORE_CTX *ctx, X509_NAME *name)
lib/libcrypto/x509/x509_lu.c
578
X509_STORE *store = ctx->store;
lib/libcrypto/x509/x509_lu.c
588
obj = X509_STORE_CTX_get_obj_by_subject(ctx, X509_LU_CRL, name);
lib/libcrypto/x509/x509_lu.c
667
X509_STORE_CTX_get1_issuer(X509 **out_issuer, X509_STORE_CTX *ctx, X509 *x)
lib/libcrypto/x509/x509_lu.c
677
obj = X509_STORE_CTX_get_obj_by_subject(ctx, X509_LU_X509, xn);
lib/libcrypto/x509/x509_lu.c
691
if (ctx->check_issued(ctx, x, issuer)) {
lib/libcrypto/x509/x509_lu.c
692
if (x509_check_cert_time(ctx, issuer, -1)) {
lib/libcrypto/x509/x509_lu.c
703
if (ctx->store == NULL)
lib/libcrypto/x509/x509_lu.c
708
idx = X509_OBJECT_idx_by_subject(ctx->store->objs, X509_LU_X509, xn);
lib/libcrypto/x509/x509_lu.c
711
for (i = idx; i < sk_X509_OBJECT_num(ctx->store->objs); i++) {
lib/libcrypto/x509/x509_lu.c
712
pobj = sk_X509_OBJECT_value(ctx->store->objs, i);
lib/libcrypto/x509/x509_lu.c
719
if (ctx->check_issued(ctx, x, pobj->data.x509)) {
lib/libcrypto/x509/x509_lu.c
727
if (x509_check_cert_time(ctx, issuer, -1))
lib/libcrypto/x509/x509_lu.c
815
X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags)
lib/libcrypto/x509/x509_lu.c
817
return X509_VERIFY_PARAM_set_flags(ctx->param, flags);
lib/libcrypto/x509/x509_lu.c
822
X509_STORE_set_depth(X509_STORE *ctx, int depth)
lib/libcrypto/x509/x509_lu.c
824
X509_VERIFY_PARAM_set_depth(ctx->param, depth);
lib/libcrypto/x509/x509_lu.c
830
X509_STORE_set_purpose(X509_STORE *ctx, int purpose)
lib/libcrypto/x509/x509_lu.c
832
return X509_VERIFY_PARAM_set_purpose(ctx->param, purpose);
lib/libcrypto/x509/x509_lu.c
837
X509_STORE_set_trust(X509_STORE *ctx, int trust)
lib/libcrypto/x509/x509_lu.c
839
return X509_VERIFY_PARAM_set_trust(ctx->param, trust);
lib/libcrypto/x509/x509_lu.c
844
X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *param)
lib/libcrypto/x509/x509_lu.c
846
return X509_VERIFY_PARAM_set1(ctx->param, param);
lib/libcrypto/x509/x509_lu.c
851
X509_STORE_get0_param(X509_STORE *ctx)
lib/libcrypto/x509/x509_lu.c
853
return ctx->param;
lib/libcrypto/x509/x509_lu.c
92
X509_LOOKUP_free(X509_LOOKUP *ctx)
lib/libcrypto/x509/x509_lu.c
94
if (ctx == NULL)
lib/libcrypto/x509/x509_lu.c
96
if (ctx->method != NULL && ctx->method->free != NULL)
lib/libcrypto/x509/x509_lu.c
97
ctx->method->free(ctx);
lib/libcrypto/x509/x509_lu.c
98
free(ctx);
lib/libcrypto/x509/x509_ncons.c
200
v2i_NAME_CONSTRAINTS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_ncons.c
226
if (!v2i_GENERAL_NAME_ex(sub->base, method, ctx, &tval, 1))
lib/libcrypto/x509/x509_ncons.c
70
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
lib/libcrypto/x509/x509_ocsp.c
391
s2i_ocsp_nocheck(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_ocsp.c
93
static void *s2i_ocsp_nocheck(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_pcons.c
170
v2i_POLICY_CONSTRAINTS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_pcons.c
74
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *values);
lib/libcrypto/x509/x509_pmaps.c
196
v2i_POLICY_MAPPINGS(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_pmaps.c
70
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
lib/libcrypto/x509/x509_skey.c
101
s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509_skey.c
124
s2i_skey_id(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str)
lib/libcrypto/x509/x509_skey.c
132
return s2i_ASN1_OCTET_STRING(method, ctx, str);
lib/libcrypto/x509/x509_skey.c
139
if (ctx && (ctx->flags == CTX_TEST))
lib/libcrypto/x509/x509_skey.c
142
if (!ctx || (!ctx->subject_req && !ctx->subject_cert)) {
lib/libcrypto/x509/x509_skey.c
147
if (ctx->subject_req)
lib/libcrypto/x509/x509_skey.c
148
pk = ctx->subject_req->req_info->pubkey->public_key;
lib/libcrypto/x509/x509_skey.c
150
pk = ctx->subject_cert->cert_info->key->public_key;
lib/libcrypto/x509/x509_skey.c
68
X509V3_CTX *ctx, char *str);
lib/libcrypto/x509/x509_verify.c
1000
if ((ctx = calloc(1, sizeof(struct x509_verify_ctx))) == NULL)
lib/libcrypto/x509/x509_verify.c
1004
if ((ctx->roots = X509_chain_up_ref(roots)) == NULL)
lib/libcrypto/x509/x509_verify.c
1007
if ((ctx->roots = sk_X509_new_null()) == NULL)
lib/libcrypto/x509/x509_verify.c
1011
ctx->max_depth = X509_VERIFY_MAX_CHAIN_CERTS - 1;
lib/libcrypto/x509/x509_verify.c
1012
ctx->max_chains = X509_VERIFY_MAX_CHAINS;
lib/libcrypto/x509/x509_verify.c
1013
ctx->max_sigs = X509_VERIFY_MAX_SIGCHECKS;
lib/libcrypto/x509/x509_verify.c
1015
if ((ctx->chains = calloc(X509_VERIFY_MAX_CHAINS,
lib/libcrypto/x509/x509_verify.c
1016
sizeof(*ctx->chains))) == NULL)
lib/libcrypto/x509/x509_verify.c
1019
return ctx;
lib/libcrypto/x509/x509_verify.c
1021
x509_verify_ctx_free(ctx);
lib/libcrypto/x509/x509_verify.c
1026
x509_verify_ctx_free(struct x509_verify_ctx *ctx)
lib/libcrypto/x509/x509_verify.c
1028
if (ctx == NULL)
lib/libcrypto/x509/x509_verify.c
1030
sk_X509_pop_free(ctx->roots, X509_free);
lib/libcrypto/x509/x509_verify.c
1031
x509_verify_ctx_clear(ctx);
lib/libcrypto/x509/x509_verify.c
1032
free(ctx);
lib/libcrypto/x509/x509_verify.c
1036
x509_verify_ctx_set_max_depth(struct x509_verify_ctx *ctx, size_t max)
lib/libcrypto/x509/x509_verify.c
1040
ctx->max_depth = max;
lib/libcrypto/x509/x509_verify.c
1045
x509_verify_ctx_set_max_chains(struct x509_verify_ctx *ctx, size_t max)
lib/libcrypto/x509/x509_verify.c
1049
ctx->max_chains = max;
lib/libcrypto/x509/x509_verify.c
1054
x509_verify_ctx_set_max_signatures(struct x509_verify_ctx *ctx, size_t max)
lib/libcrypto/x509/x509_verify.c
1058
ctx->max_sigs = max;
lib/libcrypto/x509/x509_verify.c
1063
x509_verify_ctx_set_purpose(struct x509_verify_ctx *ctx, int purpose)
lib/libcrypto/x509/x509_verify.c
1067
ctx->purpose = purpose;
lib/libcrypto/x509/x509_verify.c
1072
x509_verify_ctx_set_intermediates(struct x509_verify_ctx *ctx,
lib/libcrypto/x509/x509_verify.c
1075
if ((ctx->intermediates = X509_chain_up_ref(intermediates)) == NULL)
lib/libcrypto/x509/x509_verify.c
1081
x509_verify_ctx_error_string(struct x509_verify_ctx *ctx)
lib/libcrypto/x509/x509_verify.c
1083
return X509_verify_cert_error_string(ctx->error);
lib/libcrypto/x509/x509_verify.c
1087
x509_verify_ctx_error_depth(struct x509_verify_ctx *ctx)
lib/libcrypto/x509/x509_verify.c
1089
return ctx->error_depth;
lib/libcrypto/x509/x509_verify.c
1093
x509_verify_ctx_chain(struct x509_verify_ctx *ctx, size_t i)
lib/libcrypto/x509/x509_verify.c
1095
if (i >= ctx->chains_count)
lib/libcrypto/x509/x509_verify.c
1097
return ctx->chains[i]->certs;
lib/libcrypto/x509/x509_verify.c
1101
x509_verify(struct x509_verify_ctx *ctx, X509 *leaf, char *name)
lib/libcrypto/x509/x509_verify.c
1106
if (ctx->roots == NULL || ctx->max_depth == 0) {
lib/libcrypto/x509/x509_verify.c
1107
ctx->error = X509_V_ERR_INVALID_CALL;
lib/libcrypto/x509/x509_verify.c
1111
if (ctx->xsc != NULL) {
lib/libcrypto/x509/x509_verify.c
1113
ctx->error = X509_V_ERR_INVALID_CALL;
lib/libcrypto/x509/x509_verify.c
1116
leaf = ctx->xsc->cert;
lib/libcrypto/x509/x509_verify.c
1120
if (ctx->xsc->param->flags & X509_V_FLAG_PARTIAL_CHAIN)
lib/libcrypto/x509/x509_verify.c
1129
if ((ctx->xsc->chain = sk_X509_new_null()) == NULL) {
lib/libcrypto/x509/x509_verify.c
1130
ctx->error = X509_V_ERR_OUT_OF_MEM;
lib/libcrypto/x509/x509_verify.c
1134
ctx->error = X509_V_ERR_OUT_OF_MEM;
lib/libcrypto/x509/x509_verify.c
1137
if (!sk_X509_push(ctx->xsc->chain, leaf)) {
lib/libcrypto/x509/x509_verify.c
1139
ctx->error = X509_V_ERR_OUT_OF_MEM;
lib/libcrypto/x509/x509_verify.c
1142
ctx->xsc->error_depth = 0;
lib/libcrypto/x509/x509_verify.c
1143
ctx->xsc->current_cert = leaf;
lib/libcrypto/x509/x509_verify.c
1147
ctx->error = X509_V_ERR_OUT_OF_MEM;
lib/libcrypto/x509/x509_verify.c
1158
if (!x509_verify_chain_append(current_chain, leaf, &ctx->error)) {
lib/libcrypto/x509/x509_verify.c
1164
if (x509_verify_ctx_cert_is_root(ctx, leaf, full_chain)) {
lib/libcrypto/x509/x509_verify.c
1165
if (!x509_verify_ctx_add_chain(ctx, current_chain,
lib/libcrypto/x509/x509_verify.c
1171
x509_verify_build_chains(ctx, leaf, current_chain,
lib/libcrypto/x509/x509_verify.c
1173
if (full_chain && ctx->chains_count == 0) {
lib/libcrypto/x509/x509_verify.c
1185
ctx->xsc->error_depth = ctx->error_depth;
lib/libcrypto/x509/x509_verify.c
1186
if (!x509_verify_ctx_save_xsc_error(ctx)) {
lib/libcrypto/x509/x509_verify.c
1202
if (ctx->xsc == NULL) {
lib/libcrypto/x509/x509_verify.c
1208
if (ctx->chains_count == 0 && ctx->error == X509_V_OK)
lib/libcrypto/x509/x509_verify.c
1209
ctx->error = X509_V_ERR_UNSPECIFIED;
lib/libcrypto/x509/x509_verify.c
1218
if (ctx->chains_count > 0)
lib/libcrypto/x509/x509_verify.c
1219
ctx->error = X509_V_OK;
lib/libcrypto/x509/x509_verify.c
1221
return ctx->chains_count;
lib/libcrypto/x509/x509_verify.c
1233
if (ctx->chains_count > 0) {
lib/libcrypto/x509/x509_verify.c
1240
if (!x509_verify_ctx_set_xsc_chain(ctx, ctx->chains[0], 1, 1))
lib/libcrypto/x509/x509_verify.c
1251
if (!x509_vfy_callback_indicate_completion(ctx->xsc))
lib/libcrypto/x509/x509_verify.c
1259
if (!x509_verify_ctx_restore_xsc_error(ctx))
lib/libcrypto/x509/x509_verify.c
1266
if (ctx->xsc->error == X509_V_OK) {
lib/libcrypto/x509/x509_verify.c
1267
if (ctx->error == X509_V_OK)
lib/libcrypto/x509/x509_verify.c
1268
ctx->error = X509_V_ERR_UNSPECIFIED;
lib/libcrypto/x509/x509_verify.c
1269
ctx->xsc->error = ctx->error;
lib/libcrypto/x509/x509_verify.c
1276
return ctx->xsc->verify_cb(0, ctx->xsc);
lib/libcrypto/x509/x509_verify.c
1283
if (ctx->error == X509_V_OK)
lib/libcrypto/x509/x509_verify.c
1284
ctx->error = X509_V_ERR_UNSPECIFIED;
lib/libcrypto/x509/x509_verify.c
1286
if (ctx->xsc != NULL) {
lib/libcrypto/x509/x509_verify.c
1287
if (ctx->xsc->error == X509_V_OK)
lib/libcrypto/x509/x509_verify.c
1288
ctx->xsc->error = X509_V_ERR_UNSPECIFIED;
lib/libcrypto/x509/x509_verify.c
1289
ctx->error = ctx->xsc->error;
lib/libcrypto/x509/x509_verify.c
211
x509_verify_ctx_reset(struct x509_verify_ctx *ctx)
lib/libcrypto/x509/x509_verify.c
215
for (i = 0; i < ctx->chains_count; i++)
lib/libcrypto/x509/x509_verify.c
216
x509_verify_chain_free(ctx->chains[i]);
lib/libcrypto/x509/x509_verify.c
217
sk_X509_pop_free(ctx->saved_error_chain, X509_free);
lib/libcrypto/x509/x509_verify.c
218
ctx->saved_error = 0;
lib/libcrypto/x509/x509_verify.c
219
ctx->saved_error_depth = 0;
lib/libcrypto/x509/x509_verify.c
220
ctx->error = 0;
lib/libcrypto/x509/x509_verify.c
221
ctx->error_depth = 0;
lib/libcrypto/x509/x509_verify.c
222
ctx->chains_count = 0;
lib/libcrypto/x509/x509_verify.c
223
ctx->sig_checks = 0;
lib/libcrypto/x509/x509_verify.c
224
ctx->check_time = NULL;
lib/libcrypto/x509/x509_verify.c
228
x509_verify_ctx_clear(struct x509_verify_ctx *ctx)
lib/libcrypto/x509/x509_verify.c
230
x509_verify_ctx_reset(ctx);
lib/libcrypto/x509/x509_verify.c
231
sk_X509_pop_free(ctx->intermediates, X509_free);
lib/libcrypto/x509/x509_verify.c
232
free(ctx->chains);
lib/libcrypto/x509/x509_verify.c
258
x509_verify_ctx_cert_is_root(struct x509_verify_ctx *ctx, X509 *cert,
lib/libcrypto/x509/x509_verify.c
268
if (ctx->xsc != NULL) {
lib/libcrypto/x509/x509_verify.c
273
if (ctx->xsc->trusted != NULL) {
lib/libcrypto/x509/x509_verify.c
274
for (i = 0; i < sk_X509_num(ctx->xsc->trusted); i++) {
lib/libcrypto/x509/x509_verify.c
275
if (X509_cmp(sk_X509_value(ctx->xsc->trusted,
lib/libcrypto/x509/x509_verify.c
281
if ((match = x509_vfy_lookup_cert_match(ctx->xsc,
lib/libcrypto/x509/x509_verify.c
288
for (i = 0; i < sk_X509_num(ctx->roots); i++) {
lib/libcrypto/x509/x509_verify.c
289
if (X509_cmp(sk_X509_value(ctx->roots, i), cert) == 0)
lib/libcrypto/x509/x509_verify.c
299
x509_verify_ctx_set_xsc_chain(struct x509_verify_ctx *ctx,
lib/libcrypto/x509/x509_verify.c
305
if (ctx->xsc == NULL)
lib/libcrypto/x509/x509_verify.c
317
ctx->xsc->num_untrusted = num_untrusted;
lib/libcrypto/x509/x509_verify.c
319
sk_X509_pop_free(ctx->xsc->chain, X509_free);
lib/libcrypto/x509/x509_verify.c
320
ctx->xsc->chain = X509_chain_up_ref(chain->certs);
lib/libcrypto/x509/x509_verify.c
321
if (ctx->xsc->chain == NULL)
lib/libcrypto/x509/x509_verify.c
322
return x509_verify_cert_error(ctx, NULL, 0,
lib/libcrypto/x509/x509_verify.c
326
ctx->xsc->error = X509_V_OK;
lib/libcrypto/x509/x509_verify.c
327
ctx->xsc->error_depth = 0;
lib/libcrypto/x509/x509_verify.c
330
ctx->xsc->error = chain->cert_errors[i];
lib/libcrypto/x509/x509_verify.c
331
ctx->xsc->error_depth = i;
lib/libcrypto/x509/x509_verify.c
34
static int x509_verify_cert_valid(struct x509_verify_ctx *ctx, X509 *cert,
lib/libcrypto/x509/x509_verify.c
346
x509_verify_ctx_save_xsc_error(struct x509_verify_ctx *ctx)
lib/libcrypto/x509/x509_verify.c
348
if (ctx->xsc != NULL && ctx->xsc->chain != NULL) {
lib/libcrypto/x509/x509_verify.c
349
sk_X509_pop_free(ctx->saved_error_chain, X509_free);
lib/libcrypto/x509/x509_verify.c
350
ctx->saved_error_chain = X509_chain_up_ref(ctx->xsc->chain);
lib/libcrypto/x509/x509_verify.c
351
if (ctx->saved_error_chain == NULL)
lib/libcrypto/x509/x509_verify.c
352
return x509_verify_cert_error(ctx, NULL, 0,
lib/libcrypto/x509/x509_verify.c
354
ctx->saved_error = ctx->xsc->error;
lib/libcrypto/x509/x509_verify.c
355
ctx->saved_error_depth = ctx->xsc->error_depth;
lib/libcrypto/x509/x509_verify.c
36
static int x509_verify_cert_hostname(struct x509_verify_ctx *ctx, X509 *cert,
lib/libcrypto/x509/x509_verify.c
365
x509_verify_ctx_restore_xsc_error(struct x509_verify_ctx *ctx)
lib/libcrypto/x509/x509_verify.c
367
if (ctx->xsc != NULL && ctx->chains_count == 0 &&
lib/libcrypto/x509/x509_verify.c
368
ctx->saved_error_chain != NULL) {
lib/libcrypto/x509/x509_verify.c
369
sk_X509_pop_free(ctx->xsc->chain, X509_free);
lib/libcrypto/x509/x509_verify.c
370
ctx->xsc->chain = X509_chain_up_ref(ctx->saved_error_chain);
lib/libcrypto/x509/x509_verify.c
371
if (ctx->xsc->chain == NULL)
lib/libcrypto/x509/x509_verify.c
372
return x509_verify_cert_error(ctx, NULL, 0,
lib/libcrypto/x509/x509_verify.c
374
ctx->xsc->error = ctx->saved_error;
lib/libcrypto/x509/x509_verify.c
375
ctx->xsc->error_depth = ctx->saved_error_depth;
lib/libcrypto/x509/x509_verify.c
38
static void x509_verify_build_chains(struct x509_verify_ctx *ctx, X509 *cert,
lib/libcrypto/x509/x509_verify.c
382
x509_verify_ctx_validate_legacy_chain(struct x509_verify_ctx *ctx,
lib/libcrypto/x509/x509_verify.c
387
if (ctx->xsc == NULL)
lib/libcrypto/x509/x509_verify.c
40
static int x509_verify_cert_error(struct x509_verify_ctx *ctx, X509 *cert,
lib/libcrypto/x509/x509_verify.c
400
ctx->xsc->error = X509_V_OK;
lib/libcrypto/x509/x509_verify.c
401
ctx->xsc->error_depth = 0;
lib/libcrypto/x509/x509_verify.c
403
if (!x509_verify_ctx_set_xsc_chain(ctx, chain, 0, 1))
lib/libcrypto/x509/x509_verify.c
411
trust = x509_vfy_check_trust(ctx->xsc);
lib/libcrypto/x509/x509_verify.c
423
if (!x509_vfy_check_chain_extensions(ctx->xsc))
lib/libcrypto/x509/x509_verify.c
427
if (!X509v3_asid_validate_path(ctx->xsc))
lib/libcrypto/x509/x509_verify.c
430
if (!X509v3_addr_validate_path(ctx->xsc))
lib/libcrypto/x509/x509_verify.c
434
if (!x509_vfy_check_security_level(ctx->xsc))
lib/libcrypto/x509/x509_verify.c
437
if (!x509_constraints_chain(ctx->xsc->chain,
lib/libcrypto/x509/x509_verify.c
438
&ctx->xsc->error, &ctx->xsc->error_depth)) {
lib/libcrypto/x509/x509_verify.c
439
X509 *cert = sk_X509_value(ctx->xsc->chain, depth);
lib/libcrypto/x509/x509_verify.c
440
if (!x509_verify_cert_error(ctx, cert,
lib/libcrypto/x509/x509_verify.c
441
ctx->xsc->error_depth, ctx->xsc->error, 0))
lib/libcrypto/x509/x509_verify.c
445
if (!x509_vfy_check_revocation(ctx->xsc))
lib/libcrypto/x509/x509_verify.c
448
if (!x509_vfy_check_policy(ctx->xsc))
lib/libcrypto/x509/x509_verify.c
458
if (ctx->xsc->error != X509_V_OK) {
lib/libcrypto/x509/x509_verify.c
459
if (ctx->xsc->error_depth < 0 ||
lib/libcrypto/x509/x509_verify.c
460
ctx->xsc->error_depth >= X509_VERIFY_MAX_CHAIN_CERTS)
lib/libcrypto/x509/x509_verify.c
462
chain->cert_errors[ctx->xsc->error_depth] =
lib/libcrypto/x509/x509_verify.c
463
ctx->xsc->error;
lib/libcrypto/x509/x509_verify.c
464
ctx->error_depth = ctx->xsc->error_depth;
lib/libcrypto/x509/x509_verify.c
472
x509_verify_ctx_add_chain(struct x509_verify_ctx *ctx,
lib/libcrypto/x509/x509_verify.c
483
if (ctx->chains_count >= ctx->max_chains)
lib/libcrypto/x509/x509_verify.c
484
return x509_verify_cert_error(ctx, last, depth,
lib/libcrypto/x509/x509_verify.c
492
if (!x509_verify_ctx_validate_legacy_chain(ctx, chain, depth))
lib/libcrypto/x509/x509_verify.c
496
if (!x509_verify_cert_valid(ctx, leaf, NULL))
lib/libcrypto/x509/x509_verify.c
498
if (!x509_verify_cert_hostname(ctx, leaf, name))
lib/libcrypto/x509/x509_verify.c
500
if (ctx->error_depth == 0 &&
lib/libcrypto/x509/x509_verify.c
501
ctx->error != X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY)
lib/libcrypto/x509/x509_verify.c
502
chain->cert_errors[0] = ctx->error;
lib/libcrypto/x509/x509_verify.c
513
if ((ctx->chains[ctx->chains_count] = x509_verify_chain_dup(chain)) ==
lib/libcrypto/x509/x509_verify.c
515
return x509_verify_cert_error(ctx, last, depth,
lib/libcrypto/x509/x509_verify.c
518
ctx->chains_count++;
lib/libcrypto/x509/x509_verify.c
520
ctx->error = X509_V_OK;
lib/libcrypto/x509/x509_verify.c
521
ctx->error_depth = depth;
lib/libcrypto/x509/x509_verify.c
527
x509_verify_potential_parent(struct x509_verify_ctx *ctx, X509 *parent,
lib/libcrypto/x509/x509_verify.c
532
if (ctx->xsc != NULL)
lib/libcrypto/x509/x509_verify.c
533
return (ctx->xsc->check_issued(ctx->xsc, child, parent));
lib/libcrypto/x509/x509_verify.c
571
x509_verify_consider_candidate(struct x509_verify_ctx *ctx, X509 *cert,
lib/libcrypto/x509/x509_verify.c
586
if (ctx->sig_checks++ > X509_VERIFY_MAX_SIGCHECKS) {
lib/libcrypto/x509/x509_verify.c
588
(void) x509_verify_cert_error(ctx, candidate, depth,
lib/libcrypto/x509/x509_verify.c
593
if (!x509_verify_parent_signature(candidate, cert, &ctx->error)) {
lib/libcrypto/x509/x509_verify.c
594
if (!x509_verify_cert_error(ctx, candidate, depth,
lib/libcrypto/x509/x509_verify.c
595
ctx->error, 0))
lib/libcrypto/x509/x509_verify.c
599
if (!x509_verify_cert_valid(ctx, candidate, current_chain))
lib/libcrypto/x509/x509_verify.c
604
x509_verify_cert_error(ctx, candidate, depth,
lib/libcrypto/x509/x509_verify.c
608
if (!x509_verify_chain_append(new_chain, candidate, &ctx->error)) {
lib/libcrypto/x509/x509_verify.c
609
x509_verify_cert_error(ctx, candidate, depth, ctx->error, 0);
lib/libcrypto/x509/x509_verify.c
620
if (!x509_verify_ctx_set_xsc_chain(ctx, new_chain, 0, 1)) {
lib/libcrypto/x509/x509_verify.c
624
if (!x509_verify_ctx_add_chain(ctx, new_chain, name)) {
lib/libcrypto/x509/x509_verify.c
631
x509_verify_build_chains(ctx, candidate, new_chain, full_chain, name);
lib/libcrypto/x509/x509_verify.c
639
x509_verify_cert_error(struct x509_verify_ctx *ctx, X509 *cert, size_t depth,
lib/libcrypto/x509/x509_verify.c
642
ctx->error = error;
lib/libcrypto/x509/x509_verify.c
643
ctx->error_depth = depth;
lib/libcrypto/x509/x509_verify.c
644
if (ctx->xsc != NULL) {
lib/libcrypto/x509/x509_verify.c
645
ctx->xsc->error = error;
lib/libcrypto/x509/x509_verify.c
646
ctx->xsc->error_depth = depth;
lib/libcrypto/x509/x509_verify.c
647
ctx->xsc->current_cert = cert;
lib/libcrypto/x509/x509_verify.c
648
return ctx->xsc->verify_cb(ok, ctx->xsc);
lib/libcrypto/x509/x509_verify.c
654
x509_verify_build_chains(struct x509_verify_ctx *ctx, X509 *cert,
lib/libcrypto/x509/x509_verify.c
665
if (ctx->xsc != NULL && ctx->chains_count > 0)
lib/libcrypto/x509/x509_verify.c
671
if (depth >= ctx->max_depth) {
lib/libcrypto/x509/x509_verify.c
672
(void)x509_verify_cert_error(ctx, cert, depth,
lib/libcrypto/x509/x509_verify.c
677
count = ctx->chains_count;
lib/libcrypto/x509/x509_verify.c
679
ctx->error = X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY;
lib/libcrypto/x509/x509_verify.c
680
ctx->error_depth = depth;
lib/libcrypto/x509/x509_verify.c
682
if (ctx->saved_error != 0)
lib/libcrypto/x509/x509_verify.c
683
ctx->error = ctx->saved_error;
lib/libcrypto/x509/x509_verify.c
684
if (ctx->saved_error_depth != 0)
lib/libcrypto/x509/x509_verify.c
685
ctx->error_depth = ctx->saved_error_depth;
lib/libcrypto/x509/x509_verify.c
687
if (ctx->xsc != NULL) {
lib/libcrypto/x509/x509_verify.c
695
ctx->error = (depth == 0) ?
lib/libcrypto/x509/x509_verify.c
701
if (ctx->xsc != NULL) {
lib/libcrypto/x509/x509_verify.c
702
if ((ret = ctx->xsc->get_issuer(&candidate, ctx->xsc, cert)) < 0) {
lib/libcrypto/x509/x509_verify.c
703
x509_verify_cert_error(ctx, cert, depth,
lib/libcrypto/x509/x509_verify.c
708
if (x509_verify_potential_parent(ctx, candidate, cert)) {
lib/libcrypto/x509/x509_verify.c
711
x509_verify_consider_candidate(ctx, cert,
lib/libcrypto/x509/x509_verify.c
719
for (i = 0; i < sk_X509_num(ctx->roots); i++) {
lib/libcrypto/x509/x509_verify.c
720
candidate = sk_X509_value(ctx->roots, i);
lib/libcrypto/x509/x509_verify.c
721
if (x509_verify_potential_parent(ctx, candidate, cert)) {
lib/libcrypto/x509/x509_verify.c
724
x509_verify_consider_candidate(ctx, cert,
lib/libcrypto/x509/x509_verify.c
732
if (ctx->intermediates != NULL) {
lib/libcrypto/x509/x509_verify.c
733
for (i = 0; i < sk_X509_num(ctx->intermediates); i++) {
lib/libcrypto/x509/x509_verify.c
734
candidate = sk_X509_value(ctx->intermediates, i);
lib/libcrypto/x509/x509_verify.c
735
if (x509_verify_potential_parent(ctx, candidate, cert)) {
lib/libcrypto/x509/x509_verify.c
736
x509_verify_consider_candidate(ctx, cert,
lib/libcrypto/x509/x509_verify.c
743
if (ctx->chains_count > count) {
lib/libcrypto/x509/x509_verify.c
744
if (ctx->xsc != NULL) {
lib/libcrypto/x509/x509_verify.c
745
ctx->xsc->error = X509_V_OK;
lib/libcrypto/x509/x509_verify.c
746
ctx->xsc->error_depth = depth;
lib/libcrypto/x509/x509_verify.c
747
ctx->xsc->current_cert = cert;
lib/libcrypto/x509/x509_verify.c
749
} else if (ctx->error_depth == depth) {
lib/libcrypto/x509/x509_verify.c
750
if (!x509_verify_ctx_set_xsc_chain(ctx, current_chain, 0, 0))
lib/libcrypto/x509/x509_verify.c
756
x509_verify_cert_hostname(struct x509_verify_ctx *ctx, X509 *cert, char *name)
lib/libcrypto/x509/x509_verify.c
762
if (ctx->xsc != NULL) {
lib/libcrypto/x509/x509_verify.c
765
if ((ret = x509_vfy_check_id(ctx->xsc)) == 0)
lib/libcrypto/x509/x509_verify.c
766
ctx->error = ctx->xsc->error;
lib/libcrypto/x509/x509_verify.c
772
ctx->error = X509_V_ERR_OUT_OF_MEM;
lib/libcrypto/x509/x509_verify.c
776
ctx->error = X509_V_ERR_UNSPECIFIED; /* XXX */
lib/libcrypto/x509/x509_verify.c
784
ctx->error = X509_V_ERR_IP_ADDRESS_MISMATCH;
lib/libcrypto/x509/x509_verify.c
790
if (ctx->xsc == NULL)
lib/libcrypto/x509/x509_verify.c
794
ctx->error = X509_V_ERR_HOSTNAME_MISMATCH;
lib/libcrypto/x509/x509_verify.c
802
return x509_verify_cert_error(ctx, cert, 0, ctx->error, 0);
lib/libcrypto/x509/x509_verify.c
806
x509_verify_set_check_time(struct x509_verify_ctx *ctx)
lib/libcrypto/x509/x509_verify.c
808
if (ctx->xsc != NULL) {
lib/libcrypto/x509/x509_verify.c
809
if (ctx->xsc->param->flags & X509_V_FLAG_USE_CHECK_TIME) {
lib/libcrypto/x509/x509_verify.c
810
ctx->check_time = &ctx->xsc->param->check_time;
lib/libcrypto/x509/x509_verify.c
813
if (ctx->xsc->param->flags & X509_V_FLAG_NO_CHECK_TIME)
lib/libcrypto/x509/x509_verify.c
817
ctx->check_time = NULL;
lib/libcrypto/x509/x509_verify.c
894
x509_verify_cert_extensions(struct x509_verify_ctx *ctx, X509 *cert, int need_ca)
lib/libcrypto/x509/x509_verify.c
897
ctx->error = X509_V_ERR_UNSPECIFIED;
lib/libcrypto/x509/x509_verify.c
901
if (ctx->xsc != NULL)
lib/libcrypto/x509/x509_verify.c
905
ctx->error = X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION;
lib/libcrypto/x509/x509_verify.c
911
ctx->error = X509_V_ERR_INVALID_CA;
lib/libcrypto/x509/x509_verify.c
914
if (ctx->purpose > 0 && X509_check_purpose(cert, ctx->purpose, need_ca)) {
lib/libcrypto/x509/x509_verify.c
915
ctx->error = X509_V_ERR_INVALID_PURPOSE;
lib/libcrypto/x509/x509_verify.c
924
x509_verify_cert_valid(struct x509_verify_ctx *ctx, X509 *cert,
lib/libcrypto/x509/x509_verify.c
934
if (!x509_verify_cert_extensions(ctx, cert, should_be_ca))
lib/libcrypto/x509/x509_verify.c
941
if (!x509_verify_cert_error(ctx, cert, depth,
lib/libcrypto/x509/x509_verify.c
946
if (x509_verify_set_check_time(ctx)) {
lib/libcrypto/x509/x509_verify.c
947
if (!x509_verify_cert_times(cert, ctx->check_time,
lib/libcrypto/x509/x509_verify.c
948
&ctx->error)) {
lib/libcrypto/x509/x509_verify.c
949
if (!x509_verify_cert_error(ctx, cert, depth,
lib/libcrypto/x509/x509_verify.c
950
ctx->error, 0))
lib/libcrypto/x509/x509_verify.c
956
&ctx->error) && !x509_verify_cert_error(ctx, cert, depth,
lib/libcrypto/x509/x509_verify.c
957
ctx->error, 0))
lib/libcrypto/x509/x509_verify.c
966
struct x509_verify_ctx *ctx;
lib/libcrypto/x509/x509_verify.c
972
if ((ctx = x509_verify_ctx_new(NULL)) == NULL)
lib/libcrypto/x509/x509_verify.c
975
ctx->xsc = xsc;
lib/libcrypto/x509/x509_verify.c
978
(ctx->intermediates = X509_chain_up_ref(xsc->untrusted)) == NULL)
lib/libcrypto/x509/x509_verify.c
984
if (!x509_verify_ctx_set_max_depth(ctx, max_depth))
lib/libcrypto/x509/x509_verify.c
987
return ctx;
lib/libcrypto/x509/x509_verify.c
989
x509_verify_ctx_free(ctx);
lib/libcrypto/x509/x509_verify.c
998
struct x509_verify_ctx *ctx;
lib/libcrypto/x509/x509_verify.h
26
void x509_verify_ctx_free(struct x509_verify_ctx *ctx);
lib/libcrypto/x509/x509_verify.h
28
int x509_verify_ctx_set_max_depth(X509_VERIFY_CTX *ctx, size_t max);
lib/libcrypto/x509/x509_verify.h
29
int x509_verify_ctx_set_max_chains(X509_VERIFY_CTX *ctx, size_t max);
lib/libcrypto/x509/x509_verify.h
30
int x509_verify_ctx_set_max_signatures(X509_VERIFY_CTX *ctx, size_t max);
lib/libcrypto/x509/x509_verify.h
31
int x509_verify_ctx_set_purpose(X509_VERIFY_CTX *ctx, int purpose_id);
lib/libcrypto/x509/x509_verify.h
32
int x509_verify_ctx_set_intermediates(X509_VERIFY_CTX *ctx,
lib/libcrypto/x509/x509_verify.h
35
const char *x509_verify_ctx_error_string(X509_VERIFY_CTX *ctx);
lib/libcrypto/x509/x509_verify.h
36
size_t x509_verify_ctx_error_depth(X509_VERIFY_CTX *ctx);
lib/libcrypto/x509/x509_verify.h
38
STACK_OF(X509) *x509_verify_ctx_chain(X509_VERIFY_CTX *ctx, size_t chain);
lib/libcrypto/x509/x509_verify.h
40
size_t x509_verify(X509_VERIFY_CTX *ctx, X509 *leaf, char *name);
lib/libcrypto/x509/x509_vfy.c
1003
check_crl_time(X509_STORE_CTX *ctx, X509_CRL *crl, int notify)
lib/libcrypto/x509/x509_vfy.c
1009
ctx->current_crl = crl;
lib/libcrypto/x509/x509_vfy.c
1010
if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME)
lib/libcrypto/x509/x509_vfy.c
1011
ptime = &ctx->param->check_time;
lib/libcrypto/x509/x509_vfy.c
1012
else if (ctx->param->flags & X509_V_FLAG_NO_CHECK_TIME)
lib/libcrypto/x509/x509_vfy.c
1021
ctx->error = X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD;
lib/libcrypto/x509/x509_vfy.c
1022
if (!ctx->verify_cb(0, ctx))
lib/libcrypto/x509/x509_vfy.c
1029
ctx->error = X509_V_ERR_CRL_NOT_YET_VALID;
lib/libcrypto/x509/x509_vfy.c
1030
if (!ctx->verify_cb(0, ctx))
lib/libcrypto/x509/x509_vfy.c
1040
ctx->error = X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD;
lib/libcrypto/x509/x509_vfy.c
1041
if (!ctx->verify_cb(0, ctx))
lib/libcrypto/x509/x509_vfy.c
1046
!(ctx->current_crl_score & CRL_SCORE_TIME_DELTA)) {
lib/libcrypto/x509/x509_vfy.c
1049
ctx->error = X509_V_ERR_CRL_HAS_EXPIRED;
lib/libcrypto/x509/x509_vfy.c
1050
if (!ctx->verify_cb(0, ctx))
lib/libcrypto/x509/x509_vfy.c
1056
ctx->current_crl = NULL;
lib/libcrypto/x509/x509_vfy.c
1062
get_crl_sk(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl,
lib/libcrypto/x509/x509_vfy.c
1068
X509 *x = ctx->current_cert;
lib/libcrypto/x509/x509_vfy.c
1075
crl_score = get_crl_score(ctx, &crl_issuer, &reasons, crl, x);
lib/libcrypto/x509/x509_vfy.c
1097
get_delta_sk(ctx, pdcrl, pscore, best_crl, crls);
lib/libcrypto/x509/x509_vfy.c
1184
get_delta_sk(X509_STORE_CTX *ctx, X509_CRL **dcrl, int *pscore, X509_CRL *base,
lib/libcrypto/x509/x509_vfy.c
1190
if (!(ctx->param->flags & X509_V_FLAG_USE_DELTAS))
lib/libcrypto/x509/x509_vfy.c
1192
if (!((ctx->current_cert->ex_flags | base->flags) & EXFLAG_FRESHEST))
lib/libcrypto/x509/x509_vfy.c
1197
if (check_crl_time(ctx, delta, 0))
lib/libcrypto/x509/x509_vfy.c
120
static int x509_vfy_check_crl(X509_STORE_CTX *ctx, X509_CRL *crl);
lib/libcrypto/x509/x509_vfy.c
121
static int x509_vfy_cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
lib/libcrypto/x509/x509_vfy.c
1215
get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer, unsigned int *preasons,
lib/libcrypto/x509/x509_vfy.c
1227
if (!(ctx->param->flags & X509_V_FLAG_EXTENDED_CRL_SUPPORT)) {
lib/libcrypto/x509/x509_vfy.c
124
static int check_issued(X509_STORE_CTX *ctx, X509 *subject, X509 *issuer);
lib/libcrypto/x509/x509_vfy.c
1249
if (check_crl_time(ctx, crl, 0))
lib/libcrypto/x509/x509_vfy.c
125
static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x,
lib/libcrypto/x509/x509_vfy.c
1253
crl_akid_check(ctx, crl, pissuer, &crl_score);
lib/libcrypto/x509/x509_vfy.c
127
static int check_name_constraints(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.c
1276
crl_akid_check(X509_STORE_CTX *ctx, X509_CRL *crl, X509 **pissuer,
lib/libcrypto/x509/x509_vfy.c
128
static int check_cert(X509_STORE_CTX *ctx, STACK_OF(X509) *chain, int depth);
lib/libcrypto/x509/x509_vfy.c
1281
int cidx = ctx->error_depth;
lib/libcrypto/x509/x509_vfy.c
1284
if (cidx != sk_X509_num(ctx->chain) - 1)
lib/libcrypto/x509/x509_vfy.c
1287
crl_issuer = sk_X509_value(ctx->chain, cidx);
lib/libcrypto/x509/x509_vfy.c
1297
for (cidx++; cidx < sk_X509_num(ctx->chain); cidx++) {
lib/libcrypto/x509/x509_vfy.c
1298
crl_issuer = sk_X509_value(ctx->chain, cidx);
lib/libcrypto/x509/x509_vfy.c
130
static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer,
lib/libcrypto/x509/x509_vfy.c
1310
if (!(ctx->param->flags & X509_V_FLAG_EXTENDED_CRL_SUPPORT))
lib/libcrypto/x509/x509_vfy.c
1316
for (i = 0; i < sk_X509_num(ctx->untrusted); i++) {
lib/libcrypto/x509/x509_vfy.c
1317
crl_issuer = sk_X509_value(ctx->untrusted, i);
lib/libcrypto/x509/x509_vfy.c
132
static int get_crl_delta(X509_STORE_CTX *ctx,
lib/libcrypto/x509/x509_vfy.c
1336
check_crl_path(X509_STORE_CTX *ctx, X509 *x)
lib/libcrypto/x509/x509_vfy.c
134
static void get_delta_sk(X509_STORE_CTX *ctx, X509_CRL **dcrl, int *pcrl_score,
lib/libcrypto/x509/x509_vfy.c
1342
if (ctx->parent)
lib/libcrypto/x509/x509_vfy.c
1344
if (!X509_STORE_CTX_init(&crl_ctx, ctx->store, x, ctx->untrusted)) {
lib/libcrypto/x509/x509_vfy.c
1349
crl_ctx.crls = ctx->crls;
lib/libcrypto/x509/x509_vfy.c
1351
X509_STORE_CTX_set0_param(&crl_ctx, ctx->param);
lib/libcrypto/x509/x509_vfy.c
1353
crl_ctx.parent = ctx;
lib/libcrypto/x509/x509_vfy.c
1354
crl_ctx.verify_cb = ctx->verify_cb;
lib/libcrypto/x509/x509_vfy.c
136
static void crl_akid_check(X509_STORE_CTX *ctx, X509_CRL *crl, X509 **pissuer,
lib/libcrypto/x509/x509_vfy.c
1363
ret = check_crl_chain(ctx, ctx->chain, crl_ctx.chain);
lib/libcrypto/x509/x509_vfy.c
1379
check_crl_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *cert_path,
lib/libcrypto/x509/x509_vfy.c
140
static int check_crl_path(X509_STORE_CTX *ctx, X509 *x);
lib/libcrypto/x509/x509_vfy.c
141
static int check_crl_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *cert_path,
lib/libcrypto/x509/x509_vfy.c
146
static int internal_verify(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.c
147
static int check_key_level(X509_STORE_CTX *ctx, X509 *cert);
lib/libcrypto/x509/x509_vfy.c
148
static int verify_cb_cert(X509_STORE_CTX *ctx, X509 *x, int depth, int err);
lib/libcrypto/x509/x509_vfy.c
1514
get_crl_delta(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl, X509 *x)
lib/libcrypto/x509/x509_vfy.c
1524
reasons = ctx->current_reasons;
lib/libcrypto/x509/x509_vfy.c
1525
ok = get_crl_sk(ctx, &crl, &dcrl, &issuer, &crl_score, &reasons,
lib/libcrypto/x509/x509_vfy.c
1526
ctx->crls);
lib/libcrypto/x509/x509_vfy.c
1531
skcrl = X509_STORE_CTX_get1_crls(ctx, nm);
lib/libcrypto/x509/x509_vfy.c
1537
get_crl_sk(ctx, &crl, &dcrl, &issuer, &crl_score, &reasons, skcrl);
lib/libcrypto/x509/x509_vfy.c
1545
ctx->current_issuer = issuer;
lib/libcrypto/x509/x509_vfy.c
1546
ctx->current_crl_score = crl_score;
lib/libcrypto/x509/x509_vfy.c
1547
ctx->current_reasons = reasons;
lib/libcrypto/x509/x509_vfy.c
1589
x509_vfy_check_crl(X509_STORE_CTX *ctx, X509_CRL *crl)
lib/libcrypto/x509/x509_vfy.c
1594
cnum = ctx->error_depth;
lib/libcrypto/x509/x509_vfy.c
1595
chnum = sk_X509_num(ctx->chain) - 1;
lib/libcrypto/x509/x509_vfy.c
1597
if (ctx->current_issuer) {
lib/libcrypto/x509/x509_vfy.c
1598
issuer = ctx->current_issuer;
lib/libcrypto/x509/x509_vfy.c
1604
issuer = sk_X509_value(ctx->chain, cnum + 1);
lib/libcrypto/x509/x509_vfy.c
1606
issuer = sk_X509_value(ctx->chain, chnum);
lib/libcrypto/x509/x509_vfy.c
1608
if (!ctx->check_issued(ctx, issuer, issuer)) {
lib/libcrypto/x509/x509_vfy.c
1609
ctx->error = X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER;
lib/libcrypto/x509/x509_vfy.c
1610
ok = ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
1624
ctx->error = X509_V_ERR_KEYUSAGE_NO_CRL_SIGN;
lib/libcrypto/x509/x509_vfy.c
1625
ok = ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
1630
if (!(ctx->current_crl_score & CRL_SCORE_SCOPE)) {
lib/libcrypto/x509/x509_vfy.c
1631
ctx->error = X509_V_ERR_DIFFERENT_CRL_SCOPE;
lib/libcrypto/x509/x509_vfy.c
1632
ok = ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
1637
if (!(ctx->current_crl_score & CRL_SCORE_SAME_PATH)) {
lib/libcrypto/x509/x509_vfy.c
1638
if (check_crl_path(ctx,
lib/libcrypto/x509/x509_vfy.c
1639
ctx->current_issuer) <= 0) {
lib/libcrypto/x509/x509_vfy.c
1640
ctx->error = X509_V_ERR_CRL_PATH_VALIDATION_ERROR;
lib/libcrypto/x509/x509_vfy.c
1641
ok = ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
1648
ctx->error = X509_V_ERR_INVALID_EXTENSION;
lib/libcrypto/x509/x509_vfy.c
1649
ok = ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
1657
if (!(ctx->current_crl_score & CRL_SCORE_TIME)) {
lib/libcrypto/x509/x509_vfy.c
1658
ok = check_crl_time(ctx, crl, 1);
lib/libcrypto/x509/x509_vfy.c
1663
if (!x509_crl_verify_parent_signature(issuer, crl, &ctx->error)) {
lib/libcrypto/x509/x509_vfy.c
1664
ok = ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
1678
x509_vfy_cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x)
lib/libcrypto/x509/x509_vfy.c
168
check_id_error(X509_STORE_CTX *ctx, int errcode)
lib/libcrypto/x509/x509_vfy.c
1688
if (!(ctx->param->flags & X509_V_FLAG_IGNORE_CRITICAL) &&
lib/libcrypto/x509/x509_vfy.c
1690
ctx->error = X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION;
lib/libcrypto/x509/x509_vfy.c
1691
ok = ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
170
ctx->error = errcode;
lib/libcrypto/x509/x509_vfy.c
1701
ctx->error = X509_V_ERR_CERT_REVOKED;
lib/libcrypto/x509/x509_vfy.c
1702
ok = ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
171
ctx->current_cert = ctx->cert;
lib/libcrypto/x509/x509_vfy.c
1711
x509_vfy_check_policy(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
1716
if (ctx->parent != NULL)
lib/libcrypto/x509/x509_vfy.c
1719
ret = X509_policy_check(ctx->chain, ctx->param->policies,
lib/libcrypto/x509/x509_vfy.c
172
ctx->error_depth = 0;
lib/libcrypto/x509/x509_vfy.c
1720
ctx->param->flags, ¤t_cert);
lib/libcrypto/x509/x509_vfy.c
1722
ctx->current_cert = current_cert;
lib/libcrypto/x509/x509_vfy.c
1723
ctx->error = ret;
lib/libcrypto/x509/x509_vfy.c
1726
return ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
1729
if (ctx->param->flags & X509_V_FLAG_NOTIFY_POLICY) {
lib/libcrypto/x509/x509_vfy.c
173
return ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
1730
ctx->current_cert = NULL;
lib/libcrypto/x509/x509_vfy.c
1738
if (!ctx->verify_cb(2, ctx))
lib/libcrypto/x509/x509_vfy.c
1757
verify_cb_cert(X509_STORE_CTX *ctx, X509 *x, int depth, int err)
lib/libcrypto/x509/x509_vfy.c
1759
ctx->error_depth = depth;
lib/libcrypto/x509/x509_vfy.c
1760
ctx->current_cert = (x != NULL) ? x : sk_X509_value(ctx->chain, depth);
lib/libcrypto/x509/x509_vfy.c
1762
ctx->error = err;
lib/libcrypto/x509/x509_vfy.c
1763
return ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
1775
x509_check_cert_time(X509_STORE_CTX *ctx, X509 *x, int depth)
lib/libcrypto/x509/x509_vfy.c
1780
if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME)
lib/libcrypto/x509/x509_vfy.c
1781
ptime = ctx->param->check_time;
lib/libcrypto/x509/x509_vfy.c
1782
else if (ctx->param->flags & X509_V_FLAG_NO_CHECK_TIME)
lib/libcrypto/x509/x509_vfy.c
1791
if (i == 0 && !verify_cb_cert(ctx, x, depth,
lib/libcrypto/x509/x509_vfy.c
1794
if (i > 0 && !verify_cb_cert(ctx, x, depth,
lib/libcrypto/x509/x509_vfy.c
1802
if (i == 0 && !verify_cb_cert(ctx, x, depth,
lib/libcrypto/x509/x509_vfy.c
1805
if (i < 0 && !verify_cb_cert(ctx, x, depth,
lib/libcrypto/x509/x509_vfy.c
1813
x509_vfy_internal_verify(X509_STORE_CTX *ctx, int chain_verified)
lib/libcrypto/x509/x509_vfy.c
1815
int n = sk_X509_num(ctx->chain) - 1;
lib/libcrypto/x509/x509_vfy.c
1816
X509 *xi = sk_X509_value(ctx->chain, n);
lib/libcrypto/x509/x509_vfy.c
1819
if (ctx->check_issued(ctx, xi, xi))
lib/libcrypto/x509/x509_vfy.c
1822
if (ctx->param->flags & X509_V_FLAG_PARTIAL_CHAIN) {
lib/libcrypto/x509/x509_vfy.c
1827
return verify_cb_cert(ctx, xi, 0,
lib/libcrypto/x509/x509_vfy.c
1830
ctx->error_depth = n;
lib/libcrypto/x509/x509_vfy.c
1831
xs = sk_X509_value(ctx->chain, n);
lib/libcrypto/x509/x509_vfy.c
1850
(ctx->param->flags & X509_V_FLAG_CHECK_SS_SIGNATURE))) {
lib/libcrypto/x509/x509_vfy.c
1853
if (!verify_cb_cert(ctx, xi, xi != xs ? n+1 : n,
lib/libcrypto/x509/x509_vfy.c
1857
if (!verify_cb_cert(ctx, xs, n,
lib/libcrypto/x509/x509_vfy.c
1867
if (!chain_verified && !x509_check_cert_time(ctx, xs, n))
lib/libcrypto/x509/x509_vfy.c
1874
ctx->current_issuer = xi;
lib/libcrypto/x509/x509_vfy.c
1875
ctx->current_cert = xs;
lib/libcrypto/x509/x509_vfy.c
1876
ctx->error_depth = n;
lib/libcrypto/x509/x509_vfy.c
1877
if (!ctx->verify_cb(1, ctx))
lib/libcrypto/x509/x509_vfy.c
1882
xs = sk_X509_value(ctx->chain, n);
lib/libcrypto/x509/x509_vfy.c
1889
internal_verify(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
1891
return x509_vfy_internal_verify(ctx, 0);
lib/libcrypto/x509/x509_vfy.c
1899
x509_vfy_callback_indicate_completion(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
1901
return x509_vfy_internal_verify(ctx, 1);
lib/libcrypto/x509/x509_vfy.c
196
x509_vfy_check_id(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
198
X509_VERIFY_PARAM *vpm = ctx->param;
lib/libcrypto/x509/x509_vfy.c
199
X509 *x = ctx->cert;
lib/libcrypto/x509/x509_vfy.c
202
if (!check_id_error(ctx, X509_V_ERR_HOSTNAME_MISMATCH))
lib/libcrypto/x509/x509_vfy.c
2030
X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data)
lib/libcrypto/x509/x509_vfy.c
2032
return CRYPTO_set_ex_data(&ctx->ex_data, idx, data);
lib/libcrypto/x509/x509_vfy.c
2037
X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx)
lib/libcrypto/x509/x509_vfy.c
2039
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
lib/libcrypto/x509/x509_vfy.c
2044
X509_STORE_CTX_get_error(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2046
return ctx->error;
lib/libcrypto/x509/x509_vfy.c
2051
X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int err)
lib/libcrypto/x509/x509_vfy.c
2053
ctx->error = err;
lib/libcrypto/x509/x509_vfy.c
2058
X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2060
return ctx->error_depth;
lib/libcrypto/x509/x509_vfy.c
2065
X509_STORE_CTX_set_error_depth(X509_STORE_CTX *ctx, int depth)
lib/libcrypto/x509/x509_vfy.c
2067
ctx->error_depth = depth;
lib/libcrypto/x509/x509_vfy.c
207
if (!check_id_error(ctx, X509_V_ERR_EMAIL_MISMATCH))
lib/libcrypto/x509/x509_vfy.c
2072
X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2074
return ctx->current_cert;
lib/libcrypto/x509/x509_vfy.c
2079
X509_STORE_CTX_set_current_cert(X509_STORE_CTX *ctx, X509 *x)
lib/libcrypto/x509/x509_vfy.c
2081
ctx->current_cert = x;
lib/libcrypto/x509/x509_vfy.c
2086
X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2088
return ctx->chain;
lib/libcrypto/x509/x509_vfy.c
2100
X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2106
if (!ctx->chain || !(chain = sk_X509_dup(ctx->chain)))
lib/libcrypto/x509/x509_vfy.c
211
if (!check_id_error(ctx, X509_V_ERR_IP_ADDRESS_MISMATCH))
lib/libcrypto/x509/x509_vfy.c
2117
X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2119
return ctx->current_issuer;
lib/libcrypto/x509/x509_vfy.c
2124
X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2126
return ctx->current_crl;
lib/libcrypto/x509/x509_vfy.c
2131
X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2133
return ctx->parent;
lib/libcrypto/x509/x509_vfy.c
2145
X509_STORE_CTX_set_cert(X509_STORE_CTX *ctx, X509 *x)
lib/libcrypto/x509/x509_vfy.c
2147
ctx->cert = x;
lib/libcrypto/x509/x509_vfy.c
2152
X509_STORE_CTX_set_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk)
lib/libcrypto/x509/x509_vfy.c
2154
ctx->untrusted = sk;
lib/libcrypto/x509/x509_vfy.c
2159
X509_STORE_CTX_set0_crls(X509_STORE_CTX *ctx, STACK_OF(X509_CRL) *sk)
lib/libcrypto/x509/x509_vfy.c
2161
ctx->crls = sk;
lib/libcrypto/x509/x509_vfy.c
2176
X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose_id)
lib/libcrypto/x509/x509_vfy.c
2196
if (ctx->param->purpose == 0)
lib/libcrypto/x509/x509_vfy.c
2197
ctx->param->purpose = purpose_id;
lib/libcrypto/x509/x509_vfy.c
2198
if (ctx->param->trust == 0)
lib/libcrypto/x509/x509_vfy.c
2199
ctx->param->trust = X509_PURPOSE_get_trust(purpose);
lib/libcrypto/x509/x509_vfy.c
2206
X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust_id)
lib/libcrypto/x509/x509_vfy.c
2218
if (ctx->param->trust == 0)
lib/libcrypto/x509/x509_vfy.c
2219
ctx->param->trust = trust_id;
lib/libcrypto/x509/x509_vfy.c
2228
X509_STORE_CTX *ctx;
lib/libcrypto/x509/x509_vfy.c
2230
ctx = calloc(1, sizeof(X509_STORE_CTX));
lib/libcrypto/x509/x509_vfy.c
2231
if (!ctx) {
lib/libcrypto/x509/x509_vfy.c
2235
return ctx;
lib/libcrypto/x509/x509_vfy.c
2240
X509_STORE_CTX_free(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2242
if (ctx == NULL)
lib/libcrypto/x509/x509_vfy.c
2245
X509_STORE_CTX_cleanup(ctx);
lib/libcrypto/x509/x509_vfy.c
2246
free(ctx);
lib/libcrypto/x509/x509_vfy.c
2251
X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store, X509 *leaf,
lib/libcrypto/x509/x509_vfy.c
2265
memset(ctx, 0, sizeof(*ctx));
lib/libcrypto/x509/x509_vfy.c
227
X509_verify_cert_legacy_build_chain(X509_STORE_CTX *ctx, int *bad, int *out_ok)
lib/libcrypto/x509/x509_vfy.c
2271
ctx->error = X509_V_ERR_INVALID_CALL;
lib/libcrypto/x509/x509_vfy.c
2279
ctx->store = store;
lib/libcrypto/x509/x509_vfy.c
2280
ctx->cert = leaf;
lib/libcrypto/x509/x509_vfy.c
2281
ctx->untrusted = untrusted;
lib/libcrypto/x509/x509_vfy.c
2284
ctx->verify = store->verify;
lib/libcrypto/x509/x509_vfy.c
2286
ctx->verify = internal_verify;
lib/libcrypto/x509/x509_vfy.c
2289
ctx->verify_cb = store->verify_cb;
lib/libcrypto/x509/x509_vfy.c
2291
ctx->verify_cb = null_callback;
lib/libcrypto/x509/x509_vfy.c
2293
ctx->get_issuer = X509_STORE_CTX_get1_issuer;
lib/libcrypto/x509/x509_vfy.c
2294
ctx->check_issued = check_issued;
lib/libcrypto/x509/x509_vfy.c
2296
ctx->param = X509_VERIFY_PARAM_new();
lib/libcrypto/x509/x509_vfy.c
2297
if (!ctx->param) {
lib/libcrypto/x509/x509_vfy.c
2306
param_ret = X509_VERIFY_PARAM_inherit(ctx->param, store->param);
lib/libcrypto/x509/x509_vfy.c
2308
ctx->param->inh_flags |= X509_VP_FLAG_DEFAULT|X509_VP_FLAG_ONCE;
lib/libcrypto/x509/x509_vfy.c
231
X509_VERIFY_PARAM *param = ctx->param;
lib/libcrypto/x509/x509_vfy.c
2311
param_ret = X509_VERIFY_PARAM_inherit(ctx->param,
lib/libcrypto/x509/x509_vfy.c
2319
if (CRYPTO_new_ex_data(CRYPTO_EX_INDEX_X509_STORE_CTX, ctx,
lib/libcrypto/x509/x509_vfy.c
2320
&ctx->ex_data) == 0) {
lib/libcrypto/x509/x509_vfy.c
2333
X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *trusted)
lib/libcrypto/x509/x509_vfy.c
2335
X509_STORE_CTX_set0_trusted_stack(ctx, trusted);
lib/libcrypto/x509/x509_vfy.c
2340
X509_STORE_CTX_set0_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *trusted)
lib/libcrypto/x509/x509_vfy.c
2342
ctx->trusted = trusted;
lib/libcrypto/x509/x509_vfy.c
2343
ctx->get_issuer = x509_vfy_get_trusted_issuer;
lib/libcrypto/x509/x509_vfy.c
2348
X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2350
if (ctx->param != NULL) {
lib/libcrypto/x509/x509_vfy.c
2351
if (ctx->parent == NULL)
lib/libcrypto/x509/x509_vfy.c
2352
X509_VERIFY_PARAM_free(ctx->param);
lib/libcrypto/x509/x509_vfy.c
2353
ctx->param = NULL;
lib/libcrypto/x509/x509_vfy.c
2355
if (ctx->chain != NULL) {
lib/libcrypto/x509/x509_vfy.c
2356
sk_X509_pop_free(ctx->chain, X509_free);
lib/libcrypto/x509/x509_vfy.c
2357
ctx->chain = NULL;
lib/libcrypto/x509/x509_vfy.c
2359
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE_CTX, ctx, &ctx->ex_data);
lib/libcrypto/x509/x509_vfy.c
2360
memset(&ctx->ex_data, 0, sizeof(CRYPTO_EX_DATA));
lib/libcrypto/x509/x509_vfy.c
2365
X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth)
lib/libcrypto/x509/x509_vfy.c
2367
X509_VERIFY_PARAM_set_depth(ctx->param, depth);
lib/libcrypto/x509/x509_vfy.c
2372
X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags)
lib/libcrypto/x509/x509_vfy.c
2374
X509_VERIFY_PARAM_set_flags(ctx->param, flags);
lib/libcrypto/x509/x509_vfy.c
2379
X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags, time_t t)
lib/libcrypto/x509/x509_vfy.c
238
cb = ctx->verify_cb;
lib/libcrypto/x509/x509_vfy.c
2381
X509_VERIFY_PARAM_set_time(ctx->param, t);
lib/libcrypto/x509/x509_vfy.c
2386
(*X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx))(int, X509_STORE_CTX *)
lib/libcrypto/x509/x509_vfy.c
2388
return ctx->verify_cb;
lib/libcrypto/x509/x509_vfy.c
2393
X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
lib/libcrypto/x509/x509_vfy.c
2396
ctx->verify_cb = verify_cb;
lib/libcrypto/x509/x509_vfy.c
2401
(*X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx))(X509_STORE_CTX *)
lib/libcrypto/x509/x509_vfy.c
2403
return ctx->verify;
lib/libcrypto/x509/x509_vfy.c
2408
X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx, int (*verify)(X509_STORE_CTX *))
lib/libcrypto/x509/x509_vfy.c
2410
ctx->verify = verify;
lib/libcrypto/x509/x509_vfy.c
2430
X509_STORE_CTX_get_check_issued(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2432
return ctx->check_issued;
lib/libcrypto/x509/x509_vfy.c
2437
X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2439
return ctx->cert;
lib/libcrypto/x509/x509_vfy.c
244
ctx->chain = sk_X509_new_null();
lib/libcrypto/x509/x509_vfy.c
2444
X509_STORE_CTX_get0_untrusted(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2446
return ctx->untrusted;
lib/libcrypto/x509/x509_vfy.c
245
if (ctx->chain == NULL || !sk_X509_push(ctx->chain, ctx->cert)) {
lib/libcrypto/x509/x509_vfy.c
2451
X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, STACK_OF(X509) *sk)
lib/libcrypto/x509/x509_vfy.c
2453
ctx->untrusted = sk;
lib/libcrypto/x509/x509_vfy.c
2458
X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk)
lib/libcrypto/x509/x509_vfy.c
2460
sk_X509_pop_free(ctx->chain, X509_free);
lib/libcrypto/x509/x509_vfy.c
2461
ctx->chain = sk;
lib/libcrypto/x509/x509_vfy.c
2466
X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2468
return ctx->num_untrusted;
lib/libcrypto/x509/x509_vfy.c
247
ctx->error = X509_V_ERR_OUT_OF_MEM;
lib/libcrypto/x509/x509_vfy.c
2473
X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name)
lib/libcrypto/x509/x509_vfy.c
2479
return X509_VERIFY_PARAM_inherit(ctx->param, param);
lib/libcrypto/x509/x509_vfy.c
2484
X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2486
return ctx->param;
lib/libcrypto/x509/x509_vfy.c
2491
X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param)
lib/libcrypto/x509/x509_vfy.c
2493
if (ctx->param)
lib/libcrypto/x509/x509_vfy.c
2494
X509_VERIFY_PARAM_free(ctx->param);
lib/libcrypto/x509/x509_vfy.c
2495
ctx->param = param;
lib/libcrypto/x509/x509_vfy.c
250
X509_up_ref(ctx->cert);
lib/libcrypto/x509/x509_vfy.c
251
ctx->num_untrusted = 1;
lib/libcrypto/x509/x509_vfy.c
2539
check_key_level(X509_STORE_CTX *ctx, X509 *cert)
lib/libcrypto/x509/x509_vfy.c
254
if (ctx->untrusted != NULL &&
lib/libcrypto/x509/x509_vfy.c
255
(sktmp = sk_X509_dup(ctx->untrusted)) == NULL) {
lib/libcrypto/x509/x509_vfy.c
2551
return enough_bits_for_security_level(bits, ctx->param->security_level);
lib/libcrypto/x509/x509_vfy.c
2561
check_sig_level(X509_STORE_CTX *ctx, X509 *cert)
lib/libcrypto/x509/x509_vfy.c
2568
return enough_bits_for_security_level(bits, ctx->param->security_level);
lib/libcrypto/x509/x509_vfy.c
257
ctx->error = X509_V_ERR_OUT_OF_MEM;
lib/libcrypto/x509/x509_vfy.c
2572
x509_vfy_check_security_level(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
2574
int num = sk_X509_num(ctx->chain);
lib/libcrypto/x509/x509_vfy.c
2577
if (ctx->param->security_level <= 0)
lib/libcrypto/x509/x509_vfy.c
2581
X509 *cert = sk_X509_value(ctx->chain, i);
lib/libcrypto/x509/x509_vfy.c
2588
if (!check_key_level(ctx, cert) &&
lib/libcrypto/x509/x509_vfy.c
2589
!verify_cb_cert(ctx, cert, i,
lib/libcrypto/x509/x509_vfy.c
2601
if (!check_sig_level(ctx, cert) &&
lib/libcrypto/x509/x509_vfy.c
2602
!verify_cb_cert(ctx, cert, i, X509_V_ERR_CA_MD_TOO_WEAK))
lib/libcrypto/x509/x509_vfy.c
261
num = sk_X509_num(ctx->chain);
lib/libcrypto/x509/x509_vfy.c
262
x = sk_X509_value(ctx->chain, num - 1);
lib/libcrypto/x509/x509_vfy.c
280
if (ctx->param->flags & X509_V_FLAG_TRUSTED_FIRST) {
lib/libcrypto/x509/x509_vfy.c
281
ok = ctx->get_issuer(&xtmp, ctx, x);
lib/libcrypto/x509/x509_vfy.c
283
ctx->error = X509_V_ERR_STORE_LOOKUP;
lib/libcrypto/x509/x509_vfy.c
296
if (ctx->untrusted != NULL) {
lib/libcrypto/x509/x509_vfy.c
302
xtmp = find_issuer(ctx, sktmp, x, 0);
lib/libcrypto/x509/x509_vfy.c
304
!(ctx->param->flags & X509_V_FLAG_TRUSTED_FIRST)) {
lib/libcrypto/x509/x509_vfy.c
305
ok = ctx->get_issuer(&xtmp, ctx, x);
lib/libcrypto/x509/x509_vfy.c
307
ctx->error = X509_V_ERR_STORE_LOOKUP;
lib/libcrypto/x509/x509_vfy.c
314
xtmp = find_issuer(ctx, sktmp, x, 1);
lib/libcrypto/x509/x509_vfy.c
317
if (!sk_X509_push(ctx->chain, xtmp)) {
lib/libcrypto/x509/x509_vfy.c
319
ctx->error = X509_V_ERR_OUT_OF_MEM;
lib/libcrypto/x509/x509_vfy.c
325
ctx->num_untrusted++;
lib/libcrypto/x509/x509_vfy.c
350
i = sk_X509_num(ctx->chain);
lib/libcrypto/x509/x509_vfy.c
351
x = sk_X509_value(ctx->chain, i - 1);
lib/libcrypto/x509/x509_vfy.c
362
ok = ctx->get_issuer(&xtmp, ctx, x);
lib/libcrypto/x509/x509_vfy.c
364
ctx->error = X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT;
lib/libcrypto/x509/x509_vfy.c
365
ctx->current_cert = x;
lib/libcrypto/x509/x509_vfy.c
366
ctx->error_depth = i - 1;
lib/libcrypto/x509/x509_vfy.c
370
ok = cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
382
(void)sk_X509_set(ctx->chain, i - 1, x);
lib/libcrypto/x509/x509_vfy.c
383
ctx->num_untrusted = 0;
lib/libcrypto/x509/x509_vfy.c
390
chain_ss = sk_X509_pop(ctx->chain);
lib/libcrypto/x509/x509_vfy.c
391
ctx->num_untrusted--;
lib/libcrypto/x509/x509_vfy.c
394
x = sk_X509_value(ctx->chain, num - 1);
lib/libcrypto/x509/x509_vfy.c
405
ok = ctx->get_issuer(&xtmp, ctx, x);
lib/libcrypto/x509/x509_vfy.c
408
ctx->error = X509_V_ERR_STORE_LOOKUP;
lib/libcrypto/x509/x509_vfy.c
414
if (!sk_X509_push(ctx->chain, x)) {
lib/libcrypto/x509/x509_vfy.c
417
ctx->error = X509_V_ERR_OUT_OF_MEM;
lib/libcrypto/x509/x509_vfy.c
425
trust = x509_vfy_check_trust(ctx);
lib/libcrypto/x509/x509_vfy.c
441
!(ctx->param->flags & X509_V_FLAG_TRUSTED_FIRST) &&
lib/libcrypto/x509/x509_vfy.c
442
!(ctx->param->flags & X509_V_FLAG_NO_ALT_CHAINS)) {
lib/libcrypto/x509/x509_vfy.c
444
xtmp2 = sk_X509_value(ctx->chain, j - 1);
lib/libcrypto/x509/x509_vfy.c
445
ok = ctx->get_issuer(&xtmp, ctx, xtmp2);
lib/libcrypto/x509/x509_vfy.c
461
xtmp = sk_X509_pop(ctx->chain);
lib/libcrypto/x509/x509_vfy.c
465
ctx->num_untrusted = sk_X509_num(ctx->chain);
lib/libcrypto/x509/x509_vfy.c
479
if ((chain_ss == NULL) || !ctx->check_issued(ctx, x, chain_ss)) {
lib/libcrypto/x509/x509_vfy.c
480
if (ctx->num_untrusted >= num)
lib/libcrypto/x509/x509_vfy.c
481
ctx->error = X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY;
lib/libcrypto/x509/x509_vfy.c
483
ctx->error = X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT;
lib/libcrypto/x509/x509_vfy.c
484
ctx->current_cert = x;
lib/libcrypto/x509/x509_vfy.c
486
if (!sk_X509_push(ctx->chain, chain_ss)) {
lib/libcrypto/x509/x509_vfy.c
488
ctx->error = X509_V_ERR_OUT_OF_MEM;
lib/libcrypto/x509/x509_vfy.c
493
ctx->num_untrusted = num;
lib/libcrypto/x509/x509_vfy.c
494
ctx->current_cert = chain_ss;
lib/libcrypto/x509/x509_vfy.c
495
ctx->error = X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN;
lib/libcrypto/x509/x509_vfy.c
499
ctx->error_depth = num - 1;
lib/libcrypto/x509/x509_vfy.c
501
ok = cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
517
X509_verify_cert_legacy(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
521
ctx->error = X509_V_OK; /* Initialize to OK */
lib/libcrypto/x509/x509_vfy.c
523
if (!X509_verify_cert_legacy_build_chain(ctx, &bad_chain, &ok))
lib/libcrypto/x509/x509_vfy.c
527
ok = x509_vfy_check_chain_extensions(ctx);
lib/libcrypto/x509/x509_vfy.c
532
ok = x509_vfy_check_security_level(ctx);
lib/libcrypto/x509/x509_vfy.c
537
ok = check_name_constraints(ctx);
lib/libcrypto/x509/x509_vfy.c
542
ok = X509v3_asid_validate_path(ctx);
lib/libcrypto/x509/x509_vfy.c
546
ok = X509v3_addr_validate_path(ctx);
lib/libcrypto/x509/x509_vfy.c
551
ok = x509_vfy_check_id(ctx);
lib/libcrypto/x509/x509_vfy.c
559
ok = x509_vfy_check_revocation(ctx);
lib/libcrypto/x509/x509_vfy.c
564
if (ctx->verify != NULL)
lib/libcrypto/x509/x509_vfy.c
565
ok = ctx->verify(ctx);
lib/libcrypto/x509/x509_vfy.c
567
ok = internal_verify(ctx);
lib/libcrypto/x509/x509_vfy.c
573
ok = x509_vfy_check_policy(ctx);
lib/libcrypto/x509/x509_vfy.c
577
if (ok <= 0 && ctx->error == X509_V_OK)
lib/libcrypto/x509/x509_vfy.c
578
ctx->error = X509_V_ERR_UNSPECIFIED;
lib/libcrypto/x509/x509_vfy.c
584
X509_verify_cert(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
589
if (ctx->cert == NULL) {
lib/libcrypto/x509/x509_vfy.c
591
ctx->error = X509_V_ERR_INVALID_CALL;
lib/libcrypto/x509/x509_vfy.c
594
if (ctx->chain != NULL) {
lib/libcrypto/x509/x509_vfy.c
600
ctx->error = X509_V_ERR_INVALID_CALL;
lib/libcrypto/x509/x509_vfy.c
603
if (ctx->param->poisoned) {
lib/libcrypto/x509/x509_vfy.c
609
ctx->error = X509_V_ERR_INVALID_CALL;
lib/libcrypto/x509/x509_vfy.c
612
if (ctx->error != X509_V_ERR_INVALID_CALL) {
lib/libcrypto/x509/x509_vfy.c
617
ctx->error = X509_V_ERR_INVALID_CALL;
lib/libcrypto/x509/x509_vfy.c
625
if (!check_key_level(ctx, ctx->cert) &&
lib/libcrypto/x509/x509_vfy.c
626
!verify_cb_cert(ctx, ctx->cert, 0, X509_V_ERR_EE_KEY_TOO_SMALL))
lib/libcrypto/x509/x509_vfy.c
637
if ((ctx->param->flags & X509_V_FLAG_LEGACY_VERIFY) ||
lib/libcrypto/x509/x509_vfy.c
638
(ctx->param->flags & X509_V_FLAG_NO_ALT_CHAINS))
lib/libcrypto/x509/x509_vfy.c
639
return X509_verify_cert_legacy(ctx);
lib/libcrypto/x509/x509_vfy.c
643
if ((vctx = x509_verify_ctx_new_from_xsc(ctx)) != NULL) {
lib/libcrypto/x509/x509_vfy.c
644
ctx->error = X509_V_OK; /* Initialize to OK */
lib/libcrypto/x509/x509_vfy.c
650
return chain_count > 0 && ctx->chain != NULL;
lib/libcrypto/x509/x509_vfy.c
658
find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x,
lib/libcrypto/x509/x509_vfy.c
666
if (ctx->check_issued(ctx, x, issuer)) {
lib/libcrypto/x509/x509_vfy.c
667
if (x509_check_cert_time(ctx, issuer, -1))
lib/libcrypto/x509/x509_vfy.c
679
check_issued(X509_STORE_CTX *ctx, X509 *subject, X509 *issuer)
lib/libcrypto/x509/x509_vfy.c
691
x509_vfy_get_trusted_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
lib/libcrypto/x509/x509_vfy.c
693
*issuer = find_issuer(ctx, ctx->trusted, x, 1);
lib/libcrypto/x509/x509_vfy.c
706
x509_vfy_check_chain_extensions(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
714
cb = ctx->verify_cb;
lib/libcrypto/x509/x509_vfy.c
727
if (ctx->parent)
lib/libcrypto/x509/x509_vfy.c
730
purpose = ctx->param->purpose;
lib/libcrypto/x509/x509_vfy.c
733
for (i = 0; i < ctx->num_untrusted; i++) {
lib/libcrypto/x509/x509_vfy.c
735
x = sk_X509_value(ctx->chain, i);
lib/libcrypto/x509/x509_vfy.c
736
if (!(ctx->param->flags & X509_V_FLAG_IGNORE_CRITICAL) &&
lib/libcrypto/x509/x509_vfy.c
738
ctx->error = X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION;
lib/libcrypto/x509/x509_vfy.c
739
ctx->error_depth = i;
lib/libcrypto/x509/x509_vfy.c
740
ctx->current_cert = x;
lib/libcrypto/x509/x509_vfy.c
741
ok = cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
747
if ((ctx->param->flags & X509_V_FLAG_X509_STRICT) &&
lib/libcrypto/x509/x509_vfy.c
750
ctx->error = X509_V_ERR_INVALID_CA;
lib/libcrypto/x509/x509_vfy.c
755
((ctx->param->flags & X509_V_FLAG_X509_STRICT) &&
lib/libcrypto/x509/x509_vfy.c
758
ctx->error = X509_V_ERR_INVALID_CA;
lib/libcrypto/x509/x509_vfy.c
763
ctx->error_depth = i;
lib/libcrypto/x509/x509_vfy.c
764
ctx->current_cert = x;
lib/libcrypto/x509/x509_vfy.c
765
ok = cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
769
if (ctx->param->purpose > 0) {
lib/libcrypto/x509/x509_vfy.c
772
((ctx->param->flags & X509_V_FLAG_X509_STRICT) &&
lib/libcrypto/x509/x509_vfy.c
774
ctx->error = X509_V_ERR_INVALID_PURPOSE;
lib/libcrypto/x509/x509_vfy.c
775
ctx->error_depth = i;
lib/libcrypto/x509/x509_vfy.c
776
ctx->current_cert = x;
lib/libcrypto/x509/x509_vfy.c
777
ok = cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
786
ctx->error = X509_V_ERR_PATH_LENGTH_EXCEEDED;
lib/libcrypto/x509/x509_vfy.c
787
ctx->error_depth = i;
lib/libcrypto/x509/x509_vfy.c
788
ctx->current_cert = x;
lib/libcrypto/x509/x509_vfy.c
789
ok = cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
806
check_name_constraints(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
808
if (!x509_constraints_chain(ctx->chain, &ctx->error,
lib/libcrypto/x509/x509_vfy.c
809
&ctx->error_depth)) {
lib/libcrypto/x509/x509_vfy.c
810
ctx->current_cert = sk_X509_value(ctx->chain, ctx->error_depth);
lib/libcrypto/x509/x509_vfy.c
811
if (!ctx->verify_cb(0, ctx))
lib/libcrypto/x509/x509_vfy.c
820
lookup_cert_match(X509_STORE_CTX *ctx, X509 *x)
lib/libcrypto/x509/x509_vfy.c
827
certs = X509_STORE_CTX_get1_certs(ctx, X509_get_subject_name(x));
lib/libcrypto/x509/x509_vfy.c
848
x509_vfy_lookup_cert_match(X509_STORE_CTX *ctx, X509 *x)
lib/libcrypto/x509/x509_vfy.c
850
if (ctx->store == NULL || ctx->store->objs == NULL)
lib/libcrypto/x509/x509_vfy.c
852
return lookup_cert_match(ctx, x);
lib/libcrypto/x509/x509_vfy.c
856
x509_vfy_check_trust(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
863
cb = ctx->verify_cb;
lib/libcrypto/x509/x509_vfy.c
865
for (i = ctx->num_untrusted; i < sk_X509_num(ctx->chain); i++) {
lib/libcrypto/x509/x509_vfy.c
866
x = sk_X509_value(ctx->chain, i);
lib/libcrypto/x509/x509_vfy.c
867
ok = X509_check_trust(x, ctx->param->trust, 0);
lib/libcrypto/x509/x509_vfy.c
877
ctx->error_depth = i;
lib/libcrypto/x509/x509_vfy.c
878
ctx->current_cert = x;
lib/libcrypto/x509/x509_vfy.c
879
ctx->error = X509_V_ERR_CERT_REJECTED;
lib/libcrypto/x509/x509_vfy.c
880
ok = cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
889
if (ctx->param->flags & X509_V_FLAG_PARTIAL_CHAIN) {
lib/libcrypto/x509/x509_vfy.c
891
if (ctx->num_untrusted < (int)sk_X509_num(ctx->chain))
lib/libcrypto/x509/x509_vfy.c
893
x = sk_X509_value(ctx->chain, 0);
lib/libcrypto/x509/x509_vfy.c
894
mx = lookup_cert_match(ctx, x);
lib/libcrypto/x509/x509_vfy.c
896
(void)sk_X509_set(ctx->chain, 0, mx);
lib/libcrypto/x509/x509_vfy.c
898
ctx->num_untrusted = 0;
lib/libcrypto/x509/x509_vfy.c
911
x509_vfy_check_revocation(X509_STORE_CTX *ctx)
lib/libcrypto/x509/x509_vfy.c
915
if (!(ctx->param->flags & X509_V_FLAG_CRL_CHECK))
lib/libcrypto/x509/x509_vfy.c
917
if (ctx->param->flags & X509_V_FLAG_CRL_CHECK_ALL)
lib/libcrypto/x509/x509_vfy.c
918
last = sk_X509_num(ctx->chain) - 1;
lib/libcrypto/x509/x509_vfy.c
921
if (ctx->parent)
lib/libcrypto/x509/x509_vfy.c
926
ok = check_cert(ctx, ctx->chain, i);
lib/libcrypto/x509/x509_vfy.c
934
check_cert(X509_STORE_CTX *ctx, STACK_OF(X509) *chain, int depth)
lib/libcrypto/x509/x509_vfy.c
941
cnum = ctx->error_depth = depth;
lib/libcrypto/x509/x509_vfy.c
943
ctx->current_cert = x;
lib/libcrypto/x509/x509_vfy.c
944
ctx->current_issuer = NULL;
lib/libcrypto/x509/x509_vfy.c
945
ctx->current_crl_score = 0;
lib/libcrypto/x509/x509_vfy.c
946
ctx->current_reasons = 0;
lib/libcrypto/x509/x509_vfy.c
947
while (ctx->current_reasons != CRLDP_ALL_REASONS) {
lib/libcrypto/x509/x509_vfy.c
948
last_reasons = ctx->current_reasons;
lib/libcrypto/x509/x509_vfy.c
950
ok = get_crl_delta(ctx, &crl, &dcrl, x);
lib/libcrypto/x509/x509_vfy.c
952
ctx->error = X509_V_ERR_UNABLE_TO_GET_CRL;
lib/libcrypto/x509/x509_vfy.c
953
ok = ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
956
ctx->current_crl = crl;
lib/libcrypto/x509/x509_vfy.c
957
ok = x509_vfy_check_crl(ctx, crl);
lib/libcrypto/x509/x509_vfy.c
962
ok = x509_vfy_check_crl(ctx, dcrl);
lib/libcrypto/x509/x509_vfy.c
965
ok = x509_vfy_cert_crl(ctx, dcrl, x);
lib/libcrypto/x509/x509_vfy.c
973
ok = x509_vfy_cert_crl(ctx, crl, x);
lib/libcrypto/x509/x509_vfy.c
978
ctx->current_crl = NULL;
lib/libcrypto/x509/x509_vfy.c
986
if (last_reasons == ctx->current_reasons) {
lib/libcrypto/x509/x509_vfy.c
987
ctx->error = X509_V_ERR_UNABLE_TO_GET_CRL;
lib/libcrypto/x509/x509_vfy.c
988
ok = ctx->verify_cb(0, ctx);
lib/libcrypto/x509/x509_vfy.c
994
ctx->current_crl = NULL;
lib/libcrypto/x509/x509_vfy.h
114
void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
lib/libcrypto/x509/x509_vfy.h
116
#define X509_STORE_CTX_set_app_data(ctx,data) \
lib/libcrypto/x509/x509_vfy.h
117
X509_STORE_CTX_set_ex_data(ctx,0,data)
lib/libcrypto/x509/x509_vfy.h
118
#define X509_STORE_CTX_get_app_data(ctx) \
lib/libcrypto/x509/x509_vfy.h
119
X509_STORE_CTX_get_ex_data(ctx,0)
lib/libcrypto/x509/x509_vfy.h
303
int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
lib/libcrypto/x509/x509_vfy.h
304
int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
lib/libcrypto/x509/x509_vfy.h
305
int X509_STORE_set_trust(X509_STORE *ctx, int trust);
lib/libcrypto/x509/x509_vfy.h
306
int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
lib/libcrypto/x509/x509_vfy.h
307
X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx);
lib/libcrypto/x509/x509_vfy.h
313
void X509_STORE_set_verify_cb(X509_STORE *ctx,
lib/libcrypto/x509/x509_vfy.h
315
#define X509_STORE_set_verify_cb_func(ctx, func) \
lib/libcrypto/x509/x509_vfy.h
316
X509_STORE_set_verify_cb((ctx), (func))
lib/libcrypto/x509/x509_vfy.h
318
typedef int (*X509_STORE_CTX_check_issued_fn)(X509_STORE_CTX *ctx,
lib/libcrypto/x509/x509_vfy.h
325
X509_STORE_CTX_get_check_issued(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
329
int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
lib/libcrypto/x509/x509_vfy.h
331
void X509_STORE_CTX_free(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
332
int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
lib/libcrypto/x509/x509_vfy.h
334
X509 *X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
337
STACK_OF(X509) *X509_STORE_CTX_get0_untrusted(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
338
void X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
lib/libcrypto/x509/x509_vfy.h
339
void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
lib/libcrypto/x509/x509_vfy.h
340
void X509_STORE_CTX_set0_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
lib/libcrypto/x509/x509_vfy.h
341
void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
349
int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
lib/libcrypto/x509/x509_vfy.h
350
int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
lib/libcrypto/x509/x509_vfy.h
358
int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
lib/libcrypto/x509/x509_vfy.h
361
int X509_load_cert_file(X509_LOOKUP *ctx, const char *file, int type);
lib/libcrypto/x509/x509_vfy.h
362
int X509_load_crl_file(X509_LOOKUP *ctx, const char *file, int type);
lib/libcrypto/x509/x509_vfy.h
363
int X509_load_cert_crl_file(X509_LOOKUP *ctx, const char *file, int type);
lib/libcrypto/x509/x509_vfy.h
365
void X509_LOOKUP_free(X509_LOOKUP *ctx);
lib/libcrypto/x509/x509_vfy.h
367
int X509_STORE_load_locations(X509_STORE *ctx,
lib/libcrypto/x509/x509_vfy.h
369
int X509_STORE_load_mem(X509_STORE *ctx, void *buf, int len);
lib/libcrypto/x509/x509_vfy.h
370
int X509_STORE_set_default_paths(X509_STORE *ctx);
lib/libcrypto/x509/x509_vfy.h
374
int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx,int idx,void *data);
lib/libcrypto/x509/x509_vfy.h
375
void * X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx);
lib/libcrypto/x509/x509_vfy.h
376
int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
377
void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx,int s);
lib/libcrypto/x509/x509_vfy.h
378
int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
379
void X509_STORE_CTX_set_error_depth(X509_STORE_CTX *ctx, int depth);
lib/libcrypto/x509/x509_vfy.h
380
X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
381
void X509_STORE_CTX_set_current_cert(X509_STORE_CTX *ctx, X509 *x);
lib/libcrypto/x509/x509_vfy.h
382
X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
383
X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
384
X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
385
STACK_OF(X509) *X509_STORE_CTX_get_chain(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
386
STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
390
int X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
lib/libcrypto/x509/x509_vfy.h
391
int X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
lib/libcrypto/x509/x509_vfy.h
392
void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
lib/libcrypto/x509/x509_vfy.h
393
void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
lib/libcrypto/x509/x509_vfy.h
395
void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
lib/libcrypto/x509/x509_vfy.h
396
int (*X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx))(X509_STORE_CTX *);
lib/libcrypto/x509/x509_vfy.h
397
void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx,
lib/libcrypto/x509/x509_vfy.h
399
int (*X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx))(int, X509_STORE_CTX *);
lib/libcrypto/x509/x509_vfy.h
400
void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
lib/libcrypto/x509/x509_vfy.h
405
void X509_STORE_set_verify(X509_STORE *ctx, X509_STORE_CTX_verify_fn verify);
lib/libcrypto/x509/x509_vfy.h
406
X509_STORE_CTX_verify_fn X509_STORE_get_verify(X509_STORE *ctx);
lib/libcrypto/x509/x509_vfy.h
407
#define X509_STORE_set_verify_func(ctx, func) \
lib/libcrypto/x509/x509_vfy.h
408
X509_STORE_set_verify((ctx), (func))
lib/libcrypto/x509/x509_vfy.h
410
int X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
412
X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
lib/libcrypto/x509/x509_vfy.h
413
void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
lib/libcrypto/x509/x509_vfy.h
414
int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
lib/libcrypto/x509/x509v3.h
341
#define X509V3_set_ctx_test(ctx) \
lib/libcrypto/x509/x509v3.h
342
X509V3_set_ctx(ctx, NULL, NULL, NULL, NULL, CTX_TEST)
lib/libcrypto/x509/x509v3.h
343
#define X509V3_set_ctx_nodb(ctx) (ctx)->db = NULL;
lib/libcrypto/x509/x509v3.h
466
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
lib/libcrypto/x509/x509v3.h
483
X509V3_CTX *ctx, STACK_OF(CONF_VALUE) *nval);
lib/libcrypto/x509/x509v3.h
506
X509V3_CTX *ctx, const char *str);
lib/libcrypto/x509/x509v3.h
595
const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509v3.h
598
GENERAL_NAME *v2i_GENERAL_NAME(const X509V3_EXT_METHOD *method, X509V3_CTX *ctx,
lib/libcrypto/x509/x509v3.h
602
X509V3_CTX *ctx, CONF_VALUE *cnf, int is_nc);
lib/libcrypto/x509/x509v3.h
605
X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid,
lib/libcrypto/x509/x509v3.h
607
X509_EXTENSION *X509V3_EXT_nconf(CONF *conf, X509V3_CTX *ctx, const char *name,
lib/libcrypto/x509/x509v3.h
609
int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, const char *section,
lib/libcrypto/x509/x509v3.h
611
int X509V3_EXT_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
lib/libcrypto/x509/x509v3.h
613
int X509V3_EXT_REQ_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
lib/libcrypto/x509/x509v3.h
615
int X509V3_EXT_CRL_add_nconf(CONF *conf, X509V3_CTX *ctx, const char *section,
lib/libcrypto/x509/x509v3.h
618
X509_EXTENSION *X509V3_EXT_conf_nid(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
lib/libcrypto/x509/x509v3.h
620
X509_EXTENSION *X509V3_EXT_conf(LHASH_OF(CONF_VALUE) *conf, X509V3_CTX *ctx,
lib/libcrypto/x509/x509v3.h
623
void X509V3_set_nconf(X509V3_CTX *ctx, CONF *conf);
lib/libcrypto/x509/x509v3.h
625
void X509V3_set_ctx(X509V3_CTX *ctx, X509 *issuer, X509 *subject,
lib/libcrypto/x509/x509v3.h
85
struct v3_ext_ctx *ctx,
lib/libcrypto/x509/x509v3.h
89
struct v3_ext_ctx *ctx, const char *str);
lib/libcrypto/x509/x509v3.h
93
struct v3_ext_ctx *ctx, const char *str);
lib/libcrypto/x509/x_all.c
440
X509_sign_ctx(X509 *x, EVP_MD_CTX *ctx)
lib/libcrypto/x509/x_all.c
445
x->cert_info, ctx);
lib/libcrypto/x509/x_all.c
458
X509_REQ_sign_ctx(X509_REQ *x, EVP_MD_CTX *ctx)
lib/libcrypto/x509/x_all.c
461
x->sig_alg, NULL, x->signature, x->req_info, ctx);
lib/libcrypto/x509/x_all.c
475
X509_CRL_sign_ctx(X509_CRL *x, EVP_MD_CTX *ctx)
lib/libcrypto/x509/x_all.c
479
x->crl->sig_alg, x->sig_alg, x->signature, x->crl, ctx);
lib/libfido2/src/aes256.c
118
EVP_CIPHER_CTX *ctx = NULL;
lib/libfido2/src/aes256.c
13
EVP_CIPHER_CTX *ctx = NULL;
lib/libfido2/src/aes256.c
140
if ((ctx = EVP_CIPHER_CTX_new()) == NULL ||
lib/libfido2/src/aes256.c
145
if (EVP_CipherInit(ctx, cipher, key->ptr, nonce->ptr, encrypt) == 0) {
lib/libfido2/src/aes256.c
155
if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, 16,
lib/libfido2/src/aes256.c
162
if (EVP_Cipher(ctx, NULL, aad->ptr, (u_int)aad->len) < 0 ||
lib/libfido2/src/aes256.c
163
EVP_Cipher(ctx, out->ptr, in->ptr, (u_int)textlen) < 0 ||
lib/libfido2/src/aes256.c
164
EVP_Cipher(ctx, NULL, NULL, 0) < 0) {
lib/libfido2/src/aes256.c
170
if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, 16,
lib/libfido2/src/aes256.c
179
if (ctx != NULL)
lib/libfido2/src/aes256.c
180
EVP_CIPHER_CTX_free(ctx);
lib/libfido2/src/aes256.c
32
if ((ctx = EVP_CIPHER_CTX_new()) == NULL ||
lib/libfido2/src/aes256.c
37
if (EVP_CipherInit(ctx, cipher, key->ptr, iv, encrypt) == 0 ||
lib/libfido2/src/aes256.c
38
EVP_Cipher(ctx, out->ptr, in->ptr, (u_int)out->len) < 0) {
lib/libfido2/src/aes256.c
45
if (ctx != NULL)
lib/libfido2/src/aes256.c
46
EVP_CIPHER_CTX_free(ctx);
lib/libfido2/src/assert.c
377
EVP_MD_CTX *ctx = NULL;
lib/libfido2/src/assert.c
393
(ctx = EVP_MD_CTX_new()) == NULL ||
lib/libfido2/src/assert.c
394
EVP_DigestInit_ex(ctx, md, NULL) != 1 ||
lib/libfido2/src/assert.c
395
EVP_DigestUpdate(ctx, authdata_ptr, authdata_len) != 1 ||
lib/libfido2/src/assert.c
396
EVP_DigestUpdate(ctx, clientdata->ptr, clientdata->len) != 1 ||
lib/libfido2/src/assert.c
397
EVP_DigestFinal_ex(ctx, dgst->ptr, NULL) != 1) {
lib/libfido2/src/assert.c
419
EVP_MD_CTX_free(ctx);
lib/libfido2/src/cbor.c
742
HMAC_CTX *ctx = NULL;
lib/libfido2/src/cbor.c
758
if ((ctx = HMAC_CTX_new()) == NULL ||
lib/libfido2/src/cbor.c
760
HMAC_Init_ex(ctx, key.ptr, (int)key.len, md, NULL) == 0 ||
lib/libfido2/src/cbor.c
761
HMAC_Update(ctx, new_pin_enc->ptr, new_pin_enc->len) == 0 ||
lib/libfido2/src/cbor.c
762
HMAC_Update(ctx, pin_hash_enc->ptr, pin_hash_enc->len) == 0 ||
lib/libfido2/src/cbor.c
763
HMAC_Final(ctx, dgst, &dgst_len) == 0 ||
lib/libfido2/src/cbor.c
777
HMAC_CTX_free(ctx);
lib/libfido2/src/cred.c
251
EVP_MD_CTX *ctx = NULL;
lib/libfido2/src/cred.c
256
(ctx = EVP_MD_CTX_new()) == NULL ||
lib/libfido2/src/cred.c
257
EVP_DigestInit_ex(ctx, md, NULL) != 1 ||
lib/libfido2/src/cred.c
258
EVP_DigestUpdate(ctx, &zero, sizeof(zero)) != 1 ||
lib/libfido2/src/cred.c
259
EVP_DigestUpdate(ctx, rp_id, rp_id_len) != 1 ||
lib/libfido2/src/cred.c
260
EVP_DigestUpdate(ctx, clientdata->ptr, clientdata->len) != 1 ||
lib/libfido2/src/cred.c
261
EVP_DigestUpdate(ctx, id->ptr, id->len) != 1 ||
lib/libfido2/src/cred.c
262
EVP_DigestUpdate(ctx, &four, sizeof(four)) != 1 ||
lib/libfido2/src/cred.c
263
EVP_DigestUpdate(ctx, pk->x, sizeof(pk->x)) != 1 ||
lib/libfido2/src/cred.c
264
EVP_DigestUpdate(ctx, pk->y, sizeof(pk->y)) != 1 ||
lib/libfido2/src/cred.c
265
EVP_DigestFinal_ex(ctx, dgst->ptr, NULL) != 1) {
lib/libfido2/src/cred.c
272
EVP_MD_CTX_free(ctx);
lib/libfido2/src/ecdh.c
120
EVP_PKEY_CTX *ctx = NULL;
lib/libfido2/src/ecdh.c
133
if ((ctx = EVP_PKEY_CTX_new(sk_evp, NULL)) == NULL ||
lib/libfido2/src/ecdh.c
134
EVP_PKEY_derive_init(ctx) <= 0 ||
lib/libfido2/src/ecdh.c
135
EVP_PKEY_derive_set_peer(ctx, pk_evp) <= 0) {
lib/libfido2/src/ecdh.c
139
if (EVP_PKEY_derive(ctx, NULL, &secret->len) <= 0 ||
lib/libfido2/src/ecdh.c
141
EVP_PKEY_derive(ctx, secret->ptr, &secret->len) <= 0) {
lib/libfido2/src/ecdh.c
156
if (ctx != NULL)
lib/libfido2/src/ecdh.c
157
EVP_PKEY_CTX_free(ctx);
lib/libfido2/src/ecdh.c
39
EVP_PKEY_CTX *ctx = NULL;
lib/libfido2/src/ecdh.c
51
(ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_HKDF, NULL)) == NULL) {
lib/libfido2/src/ecdh.c
55
if (EVP_PKEY_derive_init(ctx) < 1 ||
lib/libfido2/src/ecdh.c
56
EVP_PKEY_CTX_set_hkdf_md(ctx, md) < 1 ||
lib/libfido2/src/ecdh.c
57
EVP_PKEY_CTX_set1_hkdf_salt(ctx, salt, sizeof(salt)) < 1 ||
lib/libfido2/src/ecdh.c
58
EVP_PKEY_CTX_set1_hkdf_key(ctx, secret->ptr, (int)secret->len) < 1 ||
lib/libfido2/src/ecdh.c
59
EVP_PKEY_CTX_add1_hkdf_info(ctx, (void *)info, (int)strlen(info)) < 1) {
lib/libfido2/src/ecdh.c
63
if (EVP_PKEY_derive(ctx, key, &keylen) < 1) {
lib/libfido2/src/ecdh.c
72
if (ctx != NULL)
lib/libfido2/src/ecdh.c
73
EVP_PKEY_CTX_free(ctx);
lib/libfido2/src/eddsa.c
44
EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret, size_t siglen,
lib/libfido2/src/eddsa.c
47
(void)ctx;
lib/libfido2/src/hid_openbsd.c
103
if (sizeof(data) < ctx->report_out_len + 1)
lib/libfido2/src/hid_openbsd.c
118
if (fido_hid_write(ctx, data, ctx->report_out_len + 1) == -1)
lib/libfido2/src/hid_openbsd.c
122
pfd.fd = ctx->fd;
lib/libfido2/src/hid_openbsd.c
131
if (fido_hid_read(ctx, data, ctx->report_out_len, 250) == -1)
lib/libfido2/src/hid_openbsd.c
139
fido_log_xxd(data, ctx->report_out_len, "%s", __func__);
lib/libfido2/src/hid_openbsd.c
176
struct hid_openbsd *ctx = (struct hid_openbsd *)handle;
lib/libfido2/src/hid_openbsd.c
178
if (close(ctx->fd) == -1)
lib/libfido2/src/hid_openbsd.c
181
free(ctx);
lib/libfido2/src/hid_openbsd.c
187
struct hid_openbsd *ctx = handle;
lib/libfido2/src/hid_openbsd.c
189
ctx->sigmask = *sigmask;
lib/libfido2/src/hid_openbsd.c
190
ctx->sigmaskp = &ctx->sigmask;
lib/libfido2/src/hid_openbsd.c
198
struct hid_openbsd *ctx = (struct hid_openbsd *)handle;
lib/libfido2/src/hid_openbsd.c
201
if (len != ctx->report_in_len) {
lib/libfido2/src/hid_openbsd.c
203
len, ctx->report_in_len);
lib/libfido2/src/hid_openbsd.c
207
if (fido_hid_unix_wait(ctx->fd, ms, ctx->sigmaskp) < 0) {
lib/libfido2/src/hid_openbsd.c
212
if ((r = read(ctx->fd, buf, len)) == -1) {
lib/libfido2/src/hid_openbsd.c
228
struct hid_openbsd *ctx = (struct hid_openbsd *)handle;
lib/libfido2/src/hid_openbsd.c
231
if (len != ctx->report_out_len + 1) {
lib/libfido2/src/hid_openbsd.c
233
len, ctx->report_out_len);
lib/libfido2/src/hid_openbsd.c
237
if ((r = write(ctx->fd, buf + 1, len - 1)) == -1) {
lib/libfido2/src/hid_openbsd.c
253
struct hid_openbsd *ctx = handle;
lib/libfido2/src/hid_openbsd.c
255
return (ctx->report_in_len);
lib/libfido2/src/hid_openbsd.c
261
struct hid_openbsd *ctx = handle;
lib/libfido2/src/hid_openbsd.c
263
return (ctx->report_out_len);
lib/libfido2/src/hid_openbsd.c
97
terrible_ping_kludge(struct hid_openbsd *ctx)
lib/libfido2/src/tpm.c
150
EVP_MD_CTX *ctx = NULL;
lib/libfido2/src/tpm.c
155
(ctx = EVP_MD_CTX_new()) == NULL ||
lib/libfido2/src/tpm.c
156
EVP_DigestInit_ex(ctx, md, NULL) != 1 ||
lib/libfido2/src/tpm.c
157
EVP_DigestUpdate(ctx, authdata->ptr, authdata->len) != 1 ||
lib/libfido2/src/tpm.c
158
EVP_DigestUpdate(ctx, clientdata->ptr, clientdata->len) != 1 ||
lib/libfido2/src/tpm.c
159
EVP_DigestFinal_ex(ctx, dgst->body, NULL) != 1) {
lib/libfido2/src/tpm.c
166
EVP_MD_CTX_free(ctx);
lib/libfuse/fuse_lowlevel.c
299
return (&req->ctx);
lib/libfuse/fuse_private.h
115
struct fuse_ctx ctx;
lib/libfuse/fuse_session.c
607
req.ctx.uid = fbuf->fb_uid;
lib/libfuse/fuse_session.c
608
req.ctx.gid = fbuf->fb_gid;
lib/libfuse/fuse_session.c
609
req.ctx.pid = fbuf->fb_tid;
lib/libfuse/fuse_session.c
610
req.ctx.umask = fbuf->fb_umask;
lib/libradius/radius.c
237
MD5_CTX ctx;
lib/libradius/radius.c
239
MD5_Init(&ctx);
lib/libradius/radius.c
240
MD5_Update(&ctx, (unsigned char *)packet->pdata, 4);
lib/libradius/radius.c
241
MD5_Update(&ctx, (unsigned char *)authenticator_src, 16);
lib/libradius/radius.c
242
MD5_Update(&ctx,
lib/libradius/radius.c
245
MD5_Update(&ctx, (unsigned char *)secret, strlen(secret));
lib/libradius/radius.c
246
MD5_Final((unsigned char *)authenticator_dst, &ctx);
lib/libradius/radius_mppe.c
105
MD5_Init(&ctx);
lib/libradius/radius_mppe.c
106
MD5_Update(&ctx, secret, slen);
lib/libradius/radius_mppe.c
108
MD5_Update(&ctx, ra, 16);
lib/libradius/radius_mppe.c
109
MD5_Update(&ctx, cipher, 2);
lib/libradius/radius_mppe.c
111
MD5_Update(&ctx, c - 16, 16);
lib/libradius/radius_mppe.c
112
MD5_Final(b, &ctx);
lib/libradius/radius_mppe.c
51
MD5_CTX ctx;
lib/libradius/radius_mppe.c
70
MD5_Init(&ctx);
lib/libradius/radius_mppe.c
71
MD5_Update(&ctx, secret, slen);
lib/libradius/radius_mppe.c
73
MD5_Update(&ctx, ra, 16);
lib/libradius/radius_mppe.c
74
MD5_Update(&ctx, cipher, 2);
lib/libradius/radius_mppe.c
76
MD5_Update(&ctx, c - 16, 16);
lib/libradius/radius_mppe.c
77
MD5_Final(b, &ctx);
lib/libradius/radius_mppe.c
92
MD5_CTX ctx;
lib/libradius/radius_msgauth.c
100
HMAC_CTX_free(ctx);
lib/libradius/radius_msgauth.c
51
HMAC_CTX *ctx;
lib/libradius/radius_msgauth.c
57
if ((ctx = HMAC_CTX_new()) == NULL)
lib/libradius/radius_msgauth.c
60
if (!HMAC_Init_ex(ctx, secret, strlen(secret), EVP_md5(), NULL))
lib/libradius/radius_msgauth.c
67
if (!HMAC_Update(ctx, (const u_char *)packet->pdata, 4))
lib/libradius/radius_msgauth.c
69
if (!HMAC_Update(ctx, (unsigned char *)packet->request->pdata
lib/libradius/radius_msgauth.c
73
if (!HMAC_Update(ctx, (const u_char *)packet->pdata,
lib/libradius/radius_msgauth.c
83
if (!HMAC_Update(ctx, (u_char *)attr, 2))
lib/libradius/radius_msgauth.c
85
if (!HMAC_Update(ctx, (u_char *)zero16, sizeof(zero16)))
lib/libradius/radius_msgauth.c
88
if (!HMAC_Update(ctx, (u_char *)attr,
lib/libradius/radius_msgauth.c
94
if (!HMAC_Final(ctx, (u_char *)ma, &mdlen))
lib/libradius/radius_userpass.c
46
MD5_CTX ctx;
lib/libradius/radius_userpass.c
56
MD5_Init(&ctx);
lib/libradius/radius_userpass.c
57
MD5_Update(&ctx, secret, slen);
lib/libradius/radius_userpass.c
59
MD5_Update(&ctx, ra, 16);
lib/libradius/radius_userpass.c
61
MD5_Update(&ctx, c - 16, 16);
lib/libradius/radius_userpass.c
62
MD5_Final(b, &ctx);
lib/libradius/radius_userpass.c
79
MD5_CTX ctx;
lib/libradius/radius_userpass.c
90
MD5_Init(&ctx);
lib/libradius/radius_userpass.c
91
MD5_Update(&ctx, secret, slen);
lib/libradius/radius_userpass.c
93
MD5_Update(&ctx, ra, 16);
lib/libradius/radius_userpass.c
95
MD5_Update(&ctx, c - 16, 16);
lib/libradius/radius_userpass.c
96
MD5_Final(b, &ctx);
lib/libskey/skeylogin.c
424
SHA1_CTX ctx;
lib/libskey/skeylogin.c
453
SHA1Init(&ctx);
lib/libskey/skeylogin.c
454
SHA1Update(&ctx, secret, sizeof(secret));
lib/libskey/skeylogin.c
455
SHA1Update(&ctx, username, strlen(username));
lib/libskey/skeylogin.c
456
SHA1End(&ctx, up);
lib/libskey/skeylogin.c
462
SHA1Init(&ctx);
lib/libskey/skeylogin.c
463
SHA1Update(&ctx, up, strlen(up));
lib/libskey/skeylogin.c
464
SHA1End(&ctx, up);
lib/libssl/bio_ssl.c
499
BIO_new_buffer_ssl_connect(SSL_CTX *ctx)
lib/libssl/bio_ssl.c
505
if ((ssl = BIO_new_ssl_connect(ctx)) == NULL)
lib/libssl/bio_ssl.c
519
BIO_new_ssl_connect(SSL_CTX *ctx)
lib/libssl/bio_ssl.c
525
if ((ssl = BIO_new_ssl(ctx, 1)) == NULL)
lib/libssl/bio_ssl.c
539
BIO_new_ssl(SSL_CTX *ctx, int client)
lib/libssl/bio_ssl.c
546
if ((ssl = SSL_new(ctx)) == NULL)
lib/libssl/d1_srtp.c
228
SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles)
lib/libssl/d1_srtp.c
230
return ssl_ctx_make_profiles(profiles, &ctx->srtp_profiles);
lib/libssl/d1_srtp.c
248
} else if ((s->ctx != NULL) &&
lib/libssl/d1_srtp.c
249
(s->ctx->srtp_profiles != NULL)) {
lib/libssl/d1_srtp.c
250
return s->ctx->srtp_profiles;
lib/libssl/s3_cbc.c
293
tls1_md5_final_raw(void* ctx, unsigned char *md_out)
lib/libssl/s3_cbc.c
295
MD5_CTX *md5 = ctx;
lib/libssl/s3_cbc.c
303
tls1_sha1_final_raw(void* ctx, unsigned char *md_out)
lib/libssl/s3_cbc.c
305
SHA_CTX *sha1 = ctx;
lib/libssl/s3_cbc.c
314
tls1_sha256_final_raw(void* ctx, unsigned char *md_out)
lib/libssl/s3_cbc.c
316
SHA256_CTX *sha256 = ctx;
lib/libssl/s3_cbc.c
325
tls1_sha512_final_raw(void* ctx, unsigned char *md_out)
lib/libssl/s3_cbc.c
327
SHA512_CTX *sha512 = ctx;
lib/libssl/s3_cbc.c
344
ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx)
lib/libssl/s3_cbc.c
346
switch (EVP_MD_CTX_type(ctx)) {
lib/libssl/s3_cbc.c
379
ssl3_cbc_digest_record(const EVP_MD_CTX *ctx, unsigned char* md_out,
lib/libssl/s3_cbc.c
394
void (*md_final_raw)(void *ctx, unsigned char *md_out);
lib/libssl/s3_cbc.c
395
void (*md_transform)(void *ctx, const unsigned char *block);
lib/libssl/s3_cbc.c
417
switch (EVP_MD_CTX_type(ctx)) {
lib/libssl/s3_cbc.c
421
md_transform = (void(*)(void *ctx, const unsigned char *block)) MD5_Transform;
lib/libssl/s3_cbc.c
428
md_transform = (void(*)(void *ctx, const unsigned char *block)) SHA1_Transform;
lib/libssl/s3_cbc.c
434
md_transform = (void(*)(void *ctx, const unsigned char *block)) SHA256_Transform;
lib/libssl/s3_cbc.c
440
md_transform = (void(*)(void *ctx, const unsigned char *block)) SHA256_Transform;
lib/libssl/s3_cbc.c
446
md_transform = (void(*)(void *ctx, const unsigned char *block)) SHA512_Transform;
lib/libssl/s3_cbc.c
454
md_transform = (void(*)(void *ctx, const unsigned char *block)) SHA512_Transform;
lib/libssl/s3_cbc.c
610
if (!EVP_DigestInit_ex(md_ctx, EVP_MD_CTX_md(ctx), NULL /* engine */)) {
lib/libssl/s3_lib.c
1939
_SSL_CTX_set_tmp_dh(SSL_CTX *ctx, DH *dh)
lib/libssl/s3_lib.c
1948
if (!ssl_ctx_security_dh(ctx, dh)) {
lib/libssl/s3_lib.c
1958
DH_free(ctx->cert->dhe_params);
lib/libssl/s3_lib.c
1959
ctx->cert->dhe_params = dhe_params;
lib/libssl/s3_lib.c
1965
_SSL_CTX_set_dh_auto(SSL_CTX *ctx, int state)
lib/libssl/s3_lib.c
1967
ctx->cert->dhe_params_auto = state;
lib/libssl/s3_lib.c
1972
_SSL_CTX_set_tmp_ecdh(SSL_CTX *ctx, EC_KEY *ecdh)
lib/libssl/s3_lib.c
1983
return SSL_CTX_set1_groups(ctx, &nid, 1);
lib/libssl/s3_lib.c
1987
_SSL_CTX_set_ecdh_auto(SSL_CTX *ctx, int state)
lib/libssl/s3_lib.c
1993
_SSL_CTX_set_tlsext_servername_arg(SSL_CTX *ctx, void *arg)
lib/libssl/s3_lib.c
1995
ctx->tlsext_servername_arg = arg;
lib/libssl/s3_lib.c
2000
_SSL_CTX_get_tlsext_ticket_keys(SSL_CTX *ctx, unsigned char *keys, int keys_len)
lib/libssl/s3_lib.c
2010
memcpy(keys, ctx->tlsext_tick_key_name, 16);
lib/libssl/s3_lib.c
2011
memcpy(keys + 16, ctx->tlsext_tick_hmac_key, 16);
lib/libssl/s3_lib.c
2012
memcpy(keys + 32, ctx->tlsext_tick_aes_key, 16);
lib/libssl/s3_lib.c
2018
_SSL_CTX_set_tlsext_ticket_keys(SSL_CTX *ctx, unsigned char *keys, int keys_len)
lib/libssl/s3_lib.c
2028
memcpy(ctx->tlsext_tick_key_name, keys, 16);
lib/libssl/s3_lib.c
2029
memcpy(ctx->tlsext_tick_hmac_key, keys + 16, 16);
lib/libssl/s3_lib.c
2030
memcpy(ctx->tlsext_tick_aes_key, keys + 32, 16);
lib/libssl/s3_lib.c
2036
_SSL_CTX_get_tlsext_status_arg(SSL_CTX *ctx, void **arg)
lib/libssl/s3_lib.c
2038
*arg = ctx->tlsext_status_arg;
lib/libssl/s3_lib.c
2043
_SSL_CTX_set_tlsext_status_arg(SSL_CTX *ctx, void *arg)
lib/libssl/s3_lib.c
2045
ctx->tlsext_status_arg = arg;
lib/libssl/s3_lib.c
2050
SSL_CTX_set0_chain(SSL_CTX *ctx, STACK_OF(X509) *chain)
lib/libssl/s3_lib.c
2052
return ssl_cert_set0_chain(ctx, NULL, chain);
lib/libssl/s3_lib.c
2057
SSL_CTX_set1_chain(SSL_CTX *ctx, STACK_OF(X509) *chain)
lib/libssl/s3_lib.c
2059
return ssl_cert_set1_chain(ctx, NULL, chain);
lib/libssl/s3_lib.c
2064
SSL_CTX_add0_chain_cert(SSL_CTX *ctx, X509 *x509)
lib/libssl/s3_lib.c
2066
return ssl_cert_add0_chain_cert(ctx, NULL, x509);
lib/libssl/s3_lib.c
2071
SSL_CTX_add1_chain_cert(SSL_CTX *ctx, X509 *x509)
lib/libssl/s3_lib.c
2073
return ssl_cert_add1_chain_cert(ctx, NULL, x509);
lib/libssl/s3_lib.c
2078
SSL_CTX_get0_chain_certs(const SSL_CTX *ctx, STACK_OF(X509) **out_chain)
lib/libssl/s3_lib.c
2082
if (ctx->cert->key != NULL)
lib/libssl/s3_lib.c
2083
*out_chain = ctx->cert->key->chain;
lib/libssl/s3_lib.c
2090
SSL_CTX_clear_chain_certs(SSL_CTX *ctx)
lib/libssl/s3_lib.c
2092
return ssl_cert_set0_chain(ctx, NULL, NULL);
lib/libssl/s3_lib.c
2097
_SSL_CTX_add_extra_chain_cert(SSL_CTX *ctx, X509 *cert)
lib/libssl/s3_lib.c
2099
if (ctx->extra_certs == NULL) {
lib/libssl/s3_lib.c
2100
if ((ctx->extra_certs = sk_X509_new_null()) == NULL)
lib/libssl/s3_lib.c
2103
if (sk_X509_push(ctx->extra_certs, cert) == 0)
lib/libssl/s3_lib.c
2110
_SSL_CTX_get_extra_chain_certs(SSL_CTX *ctx, STACK_OF(X509) **certs)
lib/libssl/s3_lib.c
2112
*certs = ctx->extra_certs;
lib/libssl/s3_lib.c
2114
*certs = ctx->cert->key->chain;
lib/libssl/s3_lib.c
2120
_SSL_CTX_get_extra_chain_certs_only(SSL_CTX *ctx, STACK_OF(X509) **certs)
lib/libssl/s3_lib.c
2122
*certs = ctx->extra_certs;
lib/libssl/s3_lib.c
2127
_SSL_CTX_clear_extra_chain_certs(SSL_CTX *ctx)
lib/libssl/s3_lib.c
2129
sk_X509_pop_free(ctx->extra_certs, X509_free);
lib/libssl/s3_lib.c
2130
ctx->extra_certs = NULL;
lib/libssl/s3_lib.c
2135
SSL_CTX_set1_groups(SSL_CTX *ctx, const int *groups, size_t groups_len)
lib/libssl/s3_lib.c
2137
return tls1_set_groups(&ctx->tlsext_supportedgroups,
lib/libssl/s3_lib.c
2138
&ctx->tlsext_supportedgroups_length, groups, groups_len);
lib/libssl/s3_lib.c
2143
SSL_CTX_set1_groups_list(SSL_CTX *ctx, const char *groups)
lib/libssl/s3_lib.c
2145
return tls1_set_group_list(&ctx->tlsext_supportedgroups,
lib/libssl/s3_lib.c
2146
&ctx->tlsext_supportedgroups_length, groups);
lib/libssl/s3_lib.c
2151
ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
lib/libssl/s3_lib.c
2155
return _SSL_CTX_set_tmp_dh(ctx, parg);
lib/libssl/s3_lib.c
2162
return _SSL_CTX_set_dh_auto(ctx, larg);
lib/libssl/s3_lib.c
2165
return _SSL_CTX_set_tmp_ecdh(ctx, parg);
lib/libssl/s3_lib.c
2172
return _SSL_CTX_set_ecdh_auto(ctx, larg);
lib/libssl/s3_lib.c
2175
return _SSL_CTX_set_tlsext_servername_arg(ctx, parg);
lib/libssl/s3_lib.c
2178
return _SSL_CTX_get_tlsext_ticket_keys(ctx, parg, larg);
lib/libssl/s3_lib.c
2181
return _SSL_CTX_set_tlsext_ticket_keys(ctx, parg, larg);
lib/libssl/s3_lib.c
2184
return _SSL_CTX_get_tlsext_status_arg(ctx, parg);
lib/libssl/s3_lib.c
2187
return _SSL_CTX_set_tlsext_status_arg(ctx, parg);
lib/libssl/s3_lib.c
2191
return SSL_CTX_set0_chain(ctx, (STACK_OF(X509) *)parg);
lib/libssl/s3_lib.c
2193
return SSL_CTX_set1_chain(ctx, (STACK_OF(X509) *)parg);
lib/libssl/s3_lib.c
2197
return SSL_CTX_add0_chain_cert(ctx, (X509 *)parg);
lib/libssl/s3_lib.c
2199
return SSL_CTX_add1_chain_cert(ctx, (X509 *)parg);
lib/libssl/s3_lib.c
2202
return SSL_CTX_get0_chain_certs(ctx, (STACK_OF(X509) **)parg);
lib/libssl/s3_lib.c
2205
return _SSL_CTX_add_extra_chain_cert(ctx, parg);
lib/libssl/s3_lib.c
2209
return _SSL_CTX_get_extra_chain_certs(ctx, parg);
lib/libssl/s3_lib.c
2211
return _SSL_CTX_get_extra_chain_certs_only(ctx, parg);
lib/libssl/s3_lib.c
2214
return _SSL_CTX_clear_extra_chain_certs(ctx);
lib/libssl/s3_lib.c
2217
return SSL_CTX_set1_groups(ctx, parg, larg);
lib/libssl/s3_lib.c
2220
return SSL_CTX_set1_groups_list(ctx, parg);
lib/libssl/s3_lib.c
2223
return SSL_CTX_get_min_proto_version(ctx);
lib/libssl/s3_lib.c
2226
return SSL_CTX_get_max_proto_version(ctx);
lib/libssl/s3_lib.c
2231
return SSL_CTX_set_min_proto_version(ctx, larg);
lib/libssl/s3_lib.c
2236
return SSL_CTX_set_max_proto_version(ctx, larg);
lib/libssl/s3_lib.c
2254
ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
lib/libssl/s3_lib.c
2262
ctx->cert->dhe_params_cb =
lib/libssl/s3_lib.c
2270
ctx->tlsext_servername_callback =
lib/libssl/s3_lib.c
2275
*(int (**)(SSL *, void *))fp = ctx->tlsext_status_cb;
lib/libssl/s3_lib.c
2279
ctx->tlsext_status_cb = (int (*)(SSL *, void *))fp;
lib/libssl/s3_lib.c
2283
ctx->tlsext_ticket_key_cb = (int (*)(SSL *, unsigned char *,
lib/libssl/srtp.h
138
int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles);
lib/libssl/srtp.h
139
int SSL_set_tlsext_use_srtp(SSL *ctx, const char *profiles);
lib/libssl/ssl.h
1000
int SSL_CTX_set_min_proto_version(SSL_CTX *ctx, uint16_t version);
lib/libssl/ssl.h
1001
int SSL_CTX_set_max_proto_version(SSL_CTX *ctx, uint16_t version);
lib/libssl/ssl.h
1008
const SSL_METHOD *SSL_CTX_get_ssl_method(const SSL_CTX *ctx);
lib/libssl/ssl.h
1020
#define SSL_CTX_add_extra_chain_cert(ctx, x509) \
lib/libssl/ssl.h
1021
SSL_CTX_ctrl(ctx, SSL_CTRL_EXTRA_CHAIN_CERT, 0, (char *)x509)
lib/libssl/ssl.h
1022
#define SSL_CTX_get_extra_chain_certs(ctx, px509) \
lib/libssl/ssl.h
1023
SSL_CTX_ctrl(ctx, SSL_CTRL_GET_EXTRA_CHAIN_CERTS, 0, px509)
lib/libssl/ssl.h
1024
#define SSL_CTX_get_extra_chain_certs_only(ctx, px509) \
lib/libssl/ssl.h
1025
SSL_CTX_ctrl(ctx, SSL_CTRL_GET_EXTRA_CHAIN_CERTS, 1, px509)
lib/libssl/ssl.h
1026
#define SSL_CTX_clear_extra_chain_certs(ctx) \
lib/libssl/ssl.h
1027
SSL_CTX_ctrl(ctx, SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS, 0, NULL)
lib/libssl/ssl.h
1082
BIO *BIO_new_ssl(SSL_CTX *ctx, int client);
lib/libssl/ssl.h
1083
BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
lib/libssl/ssl.h
1084
BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);
lib/libssl/ssl.h
1088
STACK_OF(SSL_CIPHER) *SSL_CTX_get_ciphers(const SSL_CTX *ctx);
lib/libssl/ssl.h
1091
int SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str);
lib/libssl/ssl.h
1095
int SSL_CTX_up_ref(SSL_CTX *ctx);
lib/libssl/ssl.h
1096
long SSL_CTX_set_timeout(SSL_CTX *ctx, long t);
lib/libssl/ssl.h
1097
long SSL_CTX_get_timeout(const SSL_CTX *ctx);
lib/libssl/ssl.h
1100
void SSL_CTX_set1_cert_store(SSL_CTX *ctx, X509_STORE *store);
lib/libssl/ssl.h
1101
X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx);
lib/libssl/ssl.h
1102
EVP_PKEY *SSL_CTX_get0_privatekey(const SSL_CTX *ctx);
lib/libssl/ssl.h
1106
void SSL_CTX_flush_sessions(SSL_CTX *ctx, long tm);
lib/libssl/ssl.h
1145
int (*callback)(int ok, X509_STORE_CTX *ctx));
lib/libssl/ssl.h
1158
int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type);
lib/libssl/ssl.h
1159
int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type);
lib/libssl/ssl.h
1160
int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type);
lib/libssl/ssl.h
1161
int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); /* PEM type */
lib/libssl/ssl.h
1162
int SSL_CTX_use_certificate_chain_mem(SSL_CTX *ctx, void *buf, int len);
lib/libssl/ssl.h
1226
int SSL_CTX_get_verify_mode(const SSL_CTX *ctx);
lib/libssl/ssl.h
1227
int SSL_CTX_get_verify_depth(const SSL_CTX *ctx);
lib/libssl/ssl.h
1228
int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int, X509_STORE_CTX *);
lib/libssl/ssl.h
1229
void SSL_CTX_set_verify(SSL_CTX *ctx, int mode,
lib/libssl/ssl.h
1231
void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth);
lib/libssl/ssl.h
1232
void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb)(X509_STORE_CTX *, void *), void *arg);
lib/libssl/ssl.h
1233
int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);
lib/libssl/ssl.h
1234
int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len);
lib/libssl/ssl.h
1235
int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);
lib/libssl/ssl.h
1236
int SSL_CTX_use_PrivateKey_ASN1(int pk, SSL_CTX *ctx, const unsigned char *d, long len);
lib/libssl/ssl.h
1237
int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);
lib/libssl/ssl.h
1238
int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d);
lib/libssl/ssl.h
1240
pem_password_cb *SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx);
lib/libssl/ssl.h
1241
void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb);
lib/libssl/ssl.h
1242
void *SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx);
lib/libssl/ssl.h
1243
void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u);
lib/libssl/ssl.h
1245
int SSL_CTX_check_private_key(const SSL_CTX *ctx);
lib/libssl/ssl.h
1246
int SSL_check_private_key(const SSL *ctx);
lib/libssl/ssl.h
1248
int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, unsigned int sid_ctx_len);
lib/libssl/ssl.h
1260
X509_VERIFY_PARAM *SSL_CTX_get0_param(SSL_CTX *ctx);
lib/libssl/ssl.h
1261
int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm);
lib/libssl/ssl.h
1265
SSL *SSL_new(SSL_CTX *ctx);
lib/libssl/ssl.h
1280
uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx);
lib/libssl/ssl.h
1281
int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data);
lib/libssl/ssl.h
1300
long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg);
lib/libssl/ssl.h
1307
int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);
lib/libssl/ssl.h
1359
void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list);
lib/libssl/ssl.h
1363
int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x);
lib/libssl/ssl.h
1378
void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx,int mode);
lib/libssl/ssl.h
1379
int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);
lib/libssl/ssl.h
1385
int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
lib/libssl/ssl.h
1386
int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
lib/libssl/ssl.h
1388
int SSL_CTX_load_verify_mem(SSL_CTX *ctx, void *buf, int len);
lib/libssl/ssl.h
1393
SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx);
lib/libssl/ssl.h
1421
#define SSL_CTX_sess_set_cache_size(ctx,t) \
lib/libssl/ssl.h
1422
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL)
lib/libssl/ssl.h
1423
#define SSL_CTX_sess_get_cache_size(ctx) \
lib/libssl/ssl.h
1424
SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_SIZE,0,NULL)
lib/libssl/ssl.h
1425
#define SSL_CTX_set_session_cache_mode(ctx,m) \
lib/libssl/ssl.h
1426
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL)
lib/libssl/ssl.h
1427
#define SSL_CTX_get_session_cache_mode(ctx) \
lib/libssl/ssl.h
1428
SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_MODE,0,NULL)
lib/libssl/ssl.h
1430
#define SSL_CTX_get_default_read_ahead(ctx) SSL_CTX_get_read_ahead(ctx)
lib/libssl/ssl.h
1431
#define SSL_CTX_set_default_read_ahead(ctx,m) SSL_CTX_set_read_ahead(ctx,m)
lib/libssl/ssl.h
1432
#define SSL_CTX_get_read_ahead(ctx) \
lib/libssl/ssl.h
1433
SSL_CTX_ctrl(ctx,SSL_CTRL_GET_READ_AHEAD,0,NULL)
lib/libssl/ssl.h
1434
#define SSL_CTX_set_read_ahead(ctx,m) \
lib/libssl/ssl.h
1435
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,m,NULL)
lib/libssl/ssl.h
1436
#define SSL_CTX_get_max_cert_list(ctx) \
lib/libssl/ssl.h
1437
SSL_CTX_ctrl(ctx,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL)
lib/libssl/ssl.h
1438
#define SSL_CTX_set_max_cert_list(ctx,m) \
lib/libssl/ssl.h
1439
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL)
lib/libssl/ssl.h
1445
#define SSL_CTX_set_max_send_fragment(ctx,m) \
lib/libssl/ssl.h
1446
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_SEND_FRAGMENT,m,NULL)
lib/libssl/ssl.h
1451
void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,
lib/libssl/ssl.h
1456
void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,
lib/libssl/ssl.h
1460
void SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx,
lib/libssl/ssl.h
1552
void SSL_CTX_set_security_level(SSL_CTX *ctx, int level);
lib/libssl/ssl.h
1553
int SSL_CTX_get_security_level(const SSL_CTX *ctx);
lib/libssl/ssl.h
1692
int SSL_CTX_set_quic_method(SSL_CTX *ctx, const SSL_QUIC_METHOD *quic_method);
lib/libssl/ssl.h
456
#define SSL_CTX_set_options(ctx,op) \
lib/libssl/ssl.h
457
SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
lib/libssl/ssl.h
458
#define SSL_CTX_clear_options(ctx,op) \
lib/libssl/ssl.h
459
SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_OPTIONS,(op),NULL)
lib/libssl/ssl.h
460
#define SSL_CTX_get_options(ctx) \
lib/libssl/ssl.h
461
SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,0,NULL)
lib/libssl/ssl.h
469
#define SSL_CTX_set_mode(ctx,op) \
lib/libssl/ssl.h
470
SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)
lib/libssl/ssl.h
471
#define SSL_CTX_clear_mode(ctx,op) \
lib/libssl/ssl.h
472
SSL_CTX_ctrl((ctx),SSL_CTRL_CLEAR_MODE,(op),NULL)
lib/libssl/ssl.h
473
#define SSL_CTX_get_mode(ctx) \
lib/libssl/ssl.h
474
SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,0,NULL)
lib/libssl/ssl.h
487
void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p,
lib/libssl/ssl.h
492
#define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
lib/libssl/ssl.h
495
void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb);
lib/libssl/ssl.h
496
SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx);
lib/libssl/ssl.h
499
int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets);
lib/libssl/ssl.h
500
size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
lib/libssl/ssl.h
543
struct lhash_st_SSL_SESSION *SSL_CTX_sessions(SSL_CTX *ctx);
lib/libssl/ssl.h
544
#define SSL_CTX_sess_number(ctx) \
lib/libssl/ssl.h
545
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_NUMBER,0,NULL)
lib/libssl/ssl.h
546
#define SSL_CTX_sess_connect(ctx) \
lib/libssl/ssl.h
547
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT,0,NULL)
lib/libssl/ssl.h
548
#define SSL_CTX_sess_connect_good(ctx) \
lib/libssl/ssl.h
549
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_GOOD,0,NULL)
lib/libssl/ssl.h
550
#define SSL_CTX_sess_connect_renegotiate(ctx) \
lib/libssl/ssl.h
551
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_RENEGOTIATE,0,NULL)
lib/libssl/ssl.h
552
#define SSL_CTX_sess_accept(ctx) \
lib/libssl/ssl.h
553
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT,0,NULL)
lib/libssl/ssl.h
554
#define SSL_CTX_sess_accept_renegotiate(ctx) \
lib/libssl/ssl.h
555
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_RENEGOTIATE,0,NULL)
lib/libssl/ssl.h
556
#define SSL_CTX_sess_accept_good(ctx) \
lib/libssl/ssl.h
557
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_GOOD,0,NULL)
lib/libssl/ssl.h
558
#define SSL_CTX_sess_hits(ctx) \
lib/libssl/ssl.h
559
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_HIT,0,NULL)
lib/libssl/ssl.h
560
#define SSL_CTX_sess_cb_hits(ctx) \
lib/libssl/ssl.h
561
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CB_HIT,0,NULL)
lib/libssl/ssl.h
562
#define SSL_CTX_sess_misses(ctx) \
lib/libssl/ssl.h
563
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_MISSES,0,NULL)
lib/libssl/ssl.h
564
#define SSL_CTX_sess_timeouts(ctx) \
lib/libssl/ssl.h
565
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_TIMEOUTS,0,NULL)
lib/libssl/ssl.h
566
#define SSL_CTX_sess_cache_full(ctx) \
lib/libssl/ssl.h
567
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL)
lib/libssl/ssl.h
569
void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx,
lib/libssl/ssl.h
571
int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(struct ssl_st *ssl,
lib/libssl/ssl.h
573
void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx,
lib/libssl/ssl.h
574
void (*remove_session_cb)(struct ssl_ctx_st *ctx, SSL_SESSION *sess));
lib/libssl/ssl.h
575
void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(struct ssl_ctx_st *ctx,
lib/libssl/ssl.h
577
void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
lib/libssl/ssl.h
580
SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(struct ssl_st *ssl,
lib/libssl/ssl.h
582
void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*cb)(const SSL *ssl,
lib/libssl/ssl.h
584
void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(const SSL *ssl, int type,
lib/libssl/ssl.h
586
void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx,
lib/libssl/ssl.h
588
int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509,
lib/libssl/ssl.h
590
void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx,
lib/libssl/ssl.h
593
void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx,
lib/libssl/ssl.h
612
int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos,
lib/libssl/ssl.h
616
void SSL_CTX_set_alpn_select_cb(SSL_CTX *ctx,
lib/libssl/ssl.h
660
#define SSL_CTX_get_app_data(ctx) (SSL_CTX_get_ex_data(ctx,0))
lib/libssl/ssl.h
661
#define SSL_CTX_set_app_data(ctx,arg) (SSL_CTX_set_ex_data(ctx,0,(char *)arg))
lib/libssl/ssl.h
723
void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val);
lib/libssl/ssl.h
952
#define SSL_CTX_need_tmp_RSA(ctx) \
lib/libssl/ssl.h
953
SSL_CTX_ctrl(ctx,SSL_CTRL_NEED_TMP_RSA,0,NULL)
lib/libssl/ssl.h
954
#define SSL_CTX_set_tmp_rsa(ctx,rsa) \
lib/libssl/ssl.h
955
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)
lib/libssl/ssl.h
956
#define SSL_CTX_set_tmp_dh(ctx,dh) \
lib/libssl/ssl.h
957
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh)
lib/libssl/ssl.h
958
#define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \
lib/libssl/ssl.h
959
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh)
lib/libssl/ssl.h
960
#define SSL_CTX_set_dh_auto(ctx, onoff) \
lib/libssl/ssl.h
961
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_DH_AUTO,onoff,NULL)
lib/libssl/ssl.h
962
#define SSL_CTX_set_ecdh_auto(ctx, onoff) \
lib/libssl/ssl.h
963
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_ECDH_AUTO,onoff,NULL)
lib/libssl/ssl.h
978
int SSL_CTX_set0_chain(SSL_CTX *ctx, STACK_OF(X509) *chain);
lib/libssl/ssl.h
979
int SSL_CTX_set1_chain(SSL_CTX *ctx, STACK_OF(X509) *chain);
lib/libssl/ssl.h
980
int SSL_CTX_add0_chain_cert(SSL_CTX *ctx, X509 *x509);
lib/libssl/ssl.h
981
int SSL_CTX_add1_chain_cert(SSL_CTX *ctx, X509 *x509);
lib/libssl/ssl.h
982
int SSL_CTX_get0_chain_certs(const SSL_CTX *ctx, STACK_OF(X509) **out_chain);
lib/libssl/ssl.h
983
int SSL_CTX_clear_chain_certs(SSL_CTX *ctx);
lib/libssl/ssl.h
992
int SSL_CTX_set1_groups(SSL_CTX *ctx, const int *groups, size_t groups_len);
lib/libssl/ssl.h
993
int SSL_CTX_set1_groups_list(SSL_CTX *ctx, const char *groups);
lib/libssl/ssl.h
998
int SSL_CTX_get_min_proto_version(SSL_CTX *ctx);
lib/libssl/ssl.h
999
int SSL_CTX_get_max_proto_version(SSL_CTX *ctx);
lib/libssl/ssl_both.c
208
chain = s->ctx->extra_certs;
lib/libssl/ssl_both.c
216
if (!X509_STORE_CTX_init(xs_ctx, s->ctx->cert_store,
lib/libssl/ssl_cert.c
299
ssl_get0_cert(SSL_CTX *ctx, SSL *ssl)
lib/libssl/ssl_cert.c
304
return ctx->cert;
lib/libssl/ssl_cert.c
308
ssl_cert_set0_chain(SSL_CTX *ctx, SSL *ssl, STACK_OF(X509) *chain)
lib/libssl/ssl_cert.c
316
if ((ssl_cert = ssl_get0_cert(ctx, ssl)) == NULL)
lib/libssl/ssl_cert.c
324
if (!ssl_security_cert(ctx, ssl, x509, 0, &ssl_err)) {
lib/libssl/ssl_cert.c
337
ssl_cert_set1_chain(SSL_CTX *ctx, SSL *ssl, STACK_OF(X509) *chain)
lib/libssl/ssl_cert.c
345
if (!ssl_cert_set0_chain(ctx, ssl, new_chain)) {
lib/libssl/ssl_cert.c
354
ssl_cert_add0_chain_cert(SSL_CTX *ctx, SSL *ssl, X509 *cert)
lib/libssl/ssl_cert.c
360
if ((ssl_cert = ssl_get0_cert(ctx, ssl)) == NULL)
lib/libssl/ssl_cert.c
366
if (!ssl_security_cert(ctx, ssl, cert, 0, &ssl_err)) {
lib/libssl/ssl_cert.c
382
ssl_cert_add1_chain_cert(SSL_CTX *ctx, SSL *ssl, X509 *cert)
lib/libssl/ssl_cert.c
384
if (!ssl_cert_add0_chain_cert(ctx, ssl, cert))
lib/libssl/ssl_cert.c
395
X509_STORE_CTX *ctx = NULL;
lib/libssl/ssl_cert.c
403
if ((ctx = X509_STORE_CTX_new()) == NULL)
lib/libssl/ssl_cert.c
407
if (!X509_STORE_CTX_init(ctx, s->ctx->cert_store, cert, certs)) {
lib/libssl/ssl_cert.c
411
X509_STORE_CTX_set_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx(), s);
lib/libssl/ssl_cert.c
418
X509_STORE_CTX_set_default(ctx, s->server ? "ssl_client" : "ssl_server");
lib/libssl/ssl_cert.c
420
param = X509_STORE_CTX_get0_param(ctx);
lib/libssl/ssl_cert.c
431
X509_STORE_CTX_set_verify_cb(ctx, s->verify_callback);
lib/libssl/ssl_cert.c
433
if (s->ctx->app_verify_callback != NULL)
lib/libssl/ssl_cert.c
434
ret = s->ctx->app_verify_callback(ctx,
lib/libssl/ssl_cert.c
435
s->ctx->app_verify_arg);
lib/libssl/ssl_cert.c
437
ret = X509_verify_cert(ctx);
lib/libssl/ssl_cert.c
439
s->verify_result = X509_STORE_CTX_get_error(ctx);
lib/libssl/ssl_cert.c
442
if (X509_STORE_CTX_get0_chain(ctx) != NULL) {
lib/libssl/ssl_cert.c
443
s->s3->hs.verified_chain = X509_STORE_CTX_get1_chain(ctx);
lib/libssl/ssl_cert.c
451
X509_STORE_CTX_free(ctx);
lib/libssl/ssl_cert.c
497
SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list)
lib/libssl/ssl_cert.c
499
set_client_CA_list(&(ctx->client_CA), name_list);
lib/libssl/ssl_cert.c
504
SSL_CTX_get_client_CA_list(const SSL_CTX *ctx)
lib/libssl/ssl_cert.c
506
return (ctx->client_CA);
lib/libssl/ssl_cert.c
523
return (s->ctx->client_CA);
lib/libssl/ssl_cert.c
556
SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x)
lib/libssl/ssl_cert.c
558
return (add_client_CA(&(ctx->client_CA), x));
lib/libssl/ssl_clnt.c
1684
if (s->ctx->tlsext_status_cb) {
lib/libssl/ssl_clnt.c
1689
ret = s->ctx->tlsext_status_cb(s,
lib/libssl/ssl_clnt.c
1690
s->ctx->tlsext_status_arg);
lib/libssl/ssl_clnt.c
1749
if (s->ctx->tlsext_status_cb) {
lib/libssl/ssl_clnt.c
1750
ret = s->ctx->tlsext_status_cb(s,
lib/libssl/ssl_clnt.c
1751
s->ctx->tlsext_status_arg);
lib/libssl/ssl_clnt.c
211
s->ctx->stats.sess_connect_renegotiate++;
lib/libssl/ssl_clnt.c
2325
if (s->ctx->client_cert_cb == NULL)
lib/libssl/ssl_clnt.c
2328
return s->ctx->client_cert_cb(s, px509, ppkey);
lib/libssl/ssl_clnt.c
271
s->ctx->stats.sess_connect++;
lib/libssl/ssl_clnt.c
604
s->ctx->stats.sess_hit++;
lib/libssl/ssl_clnt.c
609
s->ctx->stats.sess_connect_good++;
lib/libssl/ssl_lib.c
1003
return (X509_check_private_key(ctx->cert->key->x509,
lib/libssl/ssl_lib.c
1004
ctx->cert->key->privatekey));
lib/libssl/ssl_lib.c
1229
SSL_CTX_get_max_early_data(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
1236
SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data)
lib/libssl/ssl_lib.c
1424
SSL_CTX_sessions(SSL_CTX *ctx)
lib/libssl/ssl_lib.c
1426
return (ctx->sessions);
lib/libssl/ssl_lib.c
1431
SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
lib/libssl/ssl_lib.c
1437
return (ctx->read_ahead);
lib/libssl/ssl_lib.c
1439
l = ctx->read_ahead;
lib/libssl/ssl_lib.c
1440
ctx->read_ahead = larg;
lib/libssl/ssl_lib.c
1444
ctx->msg_callback_arg = parg;
lib/libssl/ssl_lib.c
1448
return (ctx->max_cert_list);
lib/libssl/ssl_lib.c
1450
l = ctx->max_cert_list;
lib/libssl/ssl_lib.c
1451
ctx->max_cert_list = larg;
lib/libssl/ssl_lib.c
1455
l = ctx->session_cache_size;
lib/libssl/ssl_lib.c
1456
ctx->session_cache_size = larg;
lib/libssl/ssl_lib.c
1459
return (ctx->session_cache_size);
lib/libssl/ssl_lib.c
1461
l = ctx->session_cache_mode;
lib/libssl/ssl_lib.c
1462
ctx->session_cache_mode = larg;
lib/libssl/ssl_lib.c
1465
return (ctx->session_cache_mode);
lib/libssl/ssl_lib.c
1468
return (lh_SSL_SESSION_num_items(ctx->sessions));
lib/libssl/ssl_lib.c
1470
return (ctx->stats.sess_connect);
lib/libssl/ssl_lib.c
1472
return (ctx->stats.sess_connect_good);
lib/libssl/ssl_lib.c
1474
return (ctx->stats.sess_connect_renegotiate);
lib/libssl/ssl_lib.c
1476
return (ctx->stats.sess_accept);
lib/libssl/ssl_lib.c
1478
return (ctx->stats.sess_accept_good);
lib/libssl/ssl_lib.c
1480
return (ctx->stats.sess_accept_renegotiate);
lib/libssl/ssl_lib.c
1482
return (ctx->stats.sess_hit);
lib/libssl/ssl_lib.c
1484
return (ctx->stats.sess_cb_hit);
lib/libssl/ssl_lib.c
1486
return (ctx->stats.sess_miss);
lib/libssl/ssl_lib.c
1488
return (ctx->stats.sess_timeout);
lib/libssl/ssl_lib.c
1490
return (ctx->stats.sess_cache_full);
lib/libssl/ssl_lib.c
1492
return (ctx->options|=larg);
lib/libssl/ssl_lib.c
1494
return (ctx->options&=~larg);
lib/libssl/ssl_lib.c
1496
return (ctx->mode|=larg);
lib/libssl/ssl_lib.c
1498
return (ctx->mode&=~larg);
lib/libssl/ssl_lib.c
1502
ctx->max_send_fragment = larg;
lib/libssl/ssl_lib.c
1505
return (ssl3_ctx_ctrl(ctx, cmd, larg, parg));
lib/libssl/ssl_lib.c
1511
SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void))
lib/libssl/ssl_lib.c
1515
ctx->msg_callback = (ssl_msg_callback_fn *)fp;
lib/libssl/ssl_lib.c
1519
return (ssl3_ctx_callback_ctrl(ctx, cmd, fp));
lib/libssl/ssl_lib.c
1532
return (s->ctx->cipher_list);
lib/libssl/ssl_lib.c
1625
SSL_CTX_get_ciphers(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
1627
if (ctx == NULL)
lib/libssl/ssl_lib.c
1629
return ctx->cipher_list;
lib/libssl/ssl_lib.c
1635
SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str)
lib/libssl/ssl_lib.c
1646
ciphers = ssl_create_cipher_list(ctx->method, &ctx->cipher_list,
lib/libssl/ssl_lib.c
1647
ctx->cipher_list_tls13, str, ctx->cert);
lib/libssl/ssl_lib.c
1659
SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str)
lib/libssl/ssl_lib.c
1661
if (!ssl_parse_ciphersuites(&ctx->cipher_list_tls13, str)) {
lib/libssl/ssl_lib.c
1665
if (!ssl_merge_cipherlists(ctx->cipher_list,
lib/libssl/ssl_lib.c
1666
ctx->cipher_list_tls13, &ctx->cipher_list))
lib/libssl/ssl_lib.c
1680
ciphers_tls13 = s->ctx->cipher_list_tls13;
lib/libssl/ssl_lib.c
1683
ciphers = ssl_create_cipher_list(s->ctx->method, &s->cipher_list,
lib/libssl/ssl_lib.c
1701
ciphers = s->ctx->cipher_list;
lib/libssl/ssl_lib.c
1877
SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *ctx, int (*cb) (SSL *ssl,
lib/libssl/ssl_lib.c
1885
SSL_CTX_set_next_proto_select_cb(SSL_CTX *ctx, int (*cb) (SSL *s,
lib/libssl/ssl_lib.c
1898
SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos,
lib/libssl/ssl_lib.c
1914
if (!CBS_stow(&cbs, &ctx->alpn_client_proto_list,
lib/libssl/ssl_lib.c
1915
&ctx->alpn_client_proto_list_len))
lib/libssl/ssl_lib.c
1966
SSL_CTX_set_alpn_select_cb(SSL_CTX* ctx,
lib/libssl/ssl_lib.c
1970
ctx->alpn_select_cb = cb;
lib/libssl/ssl_lib.c
1971
ctx->alpn_select_cb_arg = arg;
lib/libssl/ssl_lib.c
205
(s->method != s->ctx->method)) {
lib/libssl/ssl_lib.c
207
s->method = s->ctx->method;
lib/libssl/ssl_lib.c
219
SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth)
lib/libssl/ssl_lib.c
2199
SSL_CTX_free(SSL_CTX *ctx)
lib/libssl/ssl_lib.c
2203
if (ctx == NULL)
lib/libssl/ssl_lib.c
2206
i = CRYPTO_add(&ctx->references, -1, CRYPTO_LOCK_SSL_CTX);
lib/libssl/ssl_lib.c
2210
X509_VERIFY_PARAM_free(ctx->param);
lib/libssl/ssl_lib.c
2221
if (ctx->sessions != NULL)
lib/libssl/ssl_lib.c
2222
SSL_CTX_flush_sessions(ctx, 0);
lib/libssl/ssl_lib.c
2224
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, ctx, &ctx->ex_data);
lib/libssl/ssl_lib.c
2226
lh_SSL_SESSION_free(ctx->sessions);
lib/libssl/ssl_lib.c
2228
X509_STORE_free(ctx->cert_store);
lib/libssl/ssl_lib.c
2229
sk_SSL_CIPHER_free(ctx->cipher_list);
lib/libssl/ssl_lib.c
223
ctx->method = meth;
lib/libssl/ssl_lib.c
2230
sk_SSL_CIPHER_free(ctx->cipher_list_tls13);
lib/libssl/ssl_lib.c
2231
ssl_cert_free(ctx->cert);
lib/libssl/ssl_lib.c
2232
sk_X509_NAME_pop_free(ctx->client_CA, X509_NAME_free);
lib/libssl/ssl_lib.c
2233
sk_X509_pop_free(ctx->extra_certs, X509_free);
lib/libssl/ssl_lib.c
2236
if (ctx->srtp_profiles)
lib/libssl/ssl_lib.c
2237
sk_SRTP_PROTECTION_PROFILE_free(ctx->srtp_profiles);
lib/libssl/ssl_lib.c
2240
free(ctx->tlsext_ecpointformatlist);
lib/libssl/ssl_lib.c
2241
free(ctx->tlsext_supportedgroups);
lib/libssl/ssl_lib.c
2243
free(ctx->alpn_client_proto_list);
lib/libssl/ssl_lib.c
2245
free(ctx);
lib/libssl/ssl_lib.c
225
ciphers = ssl_create_cipher_list(ctx->method, &ctx->cipher_list,
lib/libssl/ssl_lib.c
2250
SSL_CTX_up_ref(SSL_CTX *ctx)
lib/libssl/ssl_lib.c
2252
return CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX) > 1;
lib/libssl/ssl_lib.c
2257
SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx)
lib/libssl/ssl_lib.c
2259
return (ctx->default_passwd_callback);
lib/libssl/ssl_lib.c
226
ctx->cipher_list_tls13, SSL_DEFAULT_CIPHER_LIST,
lib/libssl/ssl_lib.c
2264
SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb)
lib/libssl/ssl_lib.c
2266
ctx->default_passwd_callback = cb;
lib/libssl/ssl_lib.c
227
ctx->cert);
lib/libssl/ssl_lib.c
2271
SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx)
lib/libssl/ssl_lib.c
2273
return ctx->default_passwd_callback_userdata;
lib/libssl/ssl_lib.c
2278
SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u)
lib/libssl/ssl_lib.c
2280
ctx->default_passwd_callback_userdata = u;
lib/libssl/ssl_lib.c
2285
SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx,
lib/libssl/ssl_lib.c
2288
ctx->app_verify_callback = cb;
lib/libssl/ssl_lib.c
2289
ctx->app_verify_arg = arg;
lib/libssl/ssl_lib.c
2294
SSL_CTX_set_verify(SSL_CTX *ctx, int mode, int (*cb)(int, X509_STORE_CTX *))
lib/libssl/ssl_lib.c
2296
ctx->verify_mode = mode;
lib/libssl/ssl_lib.c
2297
ctx->default_verify_callback = cb;
lib/libssl/ssl_lib.c
2302
SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth)
lib/libssl/ssl_lib.c
2304
X509_VERIFY_PARAM_set_depth(ctx->param, depth);
lib/libssl/ssl_lib.c
237
SSL_new(SSL_CTX *ctx)
lib/libssl/ssl_lib.c
242
if (ctx == NULL) {
lib/libssl/ssl_lib.c
246
if (ctx->method == NULL) {
lib/libssl/ssl_lib.c
257
s->min_tls_version = ctx->min_tls_version;
lib/libssl/ssl_lib.c
258
s->max_tls_version = ctx->max_tls_version;
lib/libssl/ssl_lib.c
259
s->min_proto_version = ctx->min_proto_version;
lib/libssl/ssl_lib.c
260
s->max_proto_version = ctx->max_proto_version;
lib/libssl/ssl_lib.c
262
s->options = ctx->options;
lib/libssl/ssl_lib.c
263
s->mode = ctx->mode;
lib/libssl/ssl_lib.c
264
s->max_cert_list = ctx->max_cert_list;
lib/libssl/ssl_lib.c
265
s->num_tickets = ctx->num_tickets;
lib/libssl/ssl_lib.c
267
if ((s->cert = ssl_cert_dup(ctx->cert)) == NULL)
lib/libssl/ssl_lib.c
2689
SSL_CTX_set_quic_method(SSL_CTX *ctx, const SSL_QUIC_METHOD *quic_method)
lib/libssl/ssl_lib.c
2691
if (ctx->method->dtls)
lib/libssl/ssl_lib.c
2694
ctx->quic_method = quic_method;
lib/libssl/ssl_lib.c
270
s->read_ahead = ctx->read_ahead;
lib/libssl/ssl_lib.c
271
s->msg_callback = ctx->msg_callback;
lib/libssl/ssl_lib.c
272
s->msg_callback_arg = ctx->msg_callback_arg;
lib/libssl/ssl_lib.c
273
s->verify_mode = ctx->verify_mode;
lib/libssl/ssl_lib.c
274
s->sid_ctx_length = ctx->sid_ctx_length;
lib/libssl/ssl_lib.c
276
memcpy(&s->sid_ctx, &ctx->sid_ctx, sizeof(s->sid_ctx));
lib/libssl/ssl_lib.c
277
s->verify_callback = ctx->default_verify_callback;
lib/libssl/ssl_lib.c
278
s->generate_session_id = ctx->generate_session_id;
lib/libssl/ssl_lib.c
283
X509_VERIFY_PARAM_inherit(s->param, ctx->param);
lib/libssl/ssl_lib.c
284
s->quiet_shutdown = ctx->quiet_shutdown;
lib/libssl/ssl_lib.c
285
s->max_send_fragment = ctx->max_send_fragment;
lib/libssl/ssl_lib.c
287
CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX);
lib/libssl/ssl_lib.c
288
s->ctx = ctx;
lib/libssl/ssl_lib.c
298
CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX);
lib/libssl/ssl_lib.c
299
s->initial_ctx = ctx;
lib/libssl/ssl_lib.c
304
if (ctx->tlsext_ecpointformatlist != NULL) {
lib/libssl/ssl_lib.c
3044
cb = s->ctx->info_callback;
lib/libssl/ssl_lib.c
306
calloc(ctx->tlsext_ecpointformatlist_length,
lib/libssl/ssl_lib.c
307
sizeof(ctx->tlsext_ecpointformatlist[0]));
lib/libssl/ssl_lib.c
311
ctx->tlsext_ecpointformatlist,
lib/libssl/ssl_lib.c
312
ctx->tlsext_ecpointformatlist_length *
lib/libssl/ssl_lib.c
313
sizeof(ctx->tlsext_ecpointformatlist[0]));
lib/libssl/ssl_lib.c
315
ctx->tlsext_ecpointformatlist_length;
lib/libssl/ssl_lib.c
317
if (ctx->tlsext_supportedgroups != NULL) {
lib/libssl/ssl_lib.c
3186
SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode)
lib/libssl/ssl_lib.c
3188
ctx->quiet_shutdown = mode;
lib/libssl/ssl_lib.c
319
calloc(ctx->tlsext_supportedgroups_length,
lib/libssl/ssl_lib.c
3193
SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
3195
return (ctx->quiet_shutdown);
lib/libssl/ssl_lib.c
320
sizeof(ctx->tlsext_supportedgroups[0]));
lib/libssl/ssl_lib.c
3237
return (ssl->ctx);
lib/libssl/ssl_lib.c
324
ctx->tlsext_supportedgroups,
lib/libssl/ssl_lib.c
3242
SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx)
lib/libssl/ssl_lib.c
3246
if (ctx == NULL)
lib/libssl/ssl_lib.c
3247
ctx = ssl->initial_ctx;
lib/libssl/ssl_lib.c
3248
if (ssl->ctx == ctx)
lib/libssl/ssl_lib.c
3249
return (ssl->ctx);
lib/libssl/ssl_lib.c
325
ctx->tlsext_supportedgroups_length *
lib/libssl/ssl_lib.c
3251
if ((new_cert = ssl_cert_dup(ctx->cert)) == NULL)
lib/libssl/ssl_lib.c
3256
SSL_CTX_up_ref(ctx);
lib/libssl/ssl_lib.c
3257
SSL_CTX_free(ssl->ctx); /* decrement reference count */
lib/libssl/ssl_lib.c
3258
ssl->ctx = ctx;
lib/libssl/ssl_lib.c
326
sizeof(ctx->tlsext_supportedgroups[0]));
lib/libssl/ssl_lib.c
3260
return (ssl->ctx);
lib/libssl/ssl_lib.c
3265
SSL_CTX_set_default_verify_paths(SSL_CTX *ctx)
lib/libssl/ssl_lib.c
3267
return (X509_STORE_set_default_paths(ctx->cert_store));
lib/libssl/ssl_lib.c
3272
SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
lib/libssl/ssl_lib.c
3275
return (X509_STORE_load_locations(ctx->cert_store, CAfile, CApath));
lib/libssl/ssl_lib.c
328
ctx->tlsext_supportedgroups_length;
lib/libssl/ssl_lib.c
3280
SSL_CTX_load_verify_mem(SSL_CTX *ctx, void *buf, int len)
lib/libssl/ssl_lib.c
3282
return (X509_STORE_load_mem(ctx->cert_store, buf, len));
lib/libssl/ssl_lib.c
331
CBS_init(&cbs, ctx->alpn_client_proto_list,
lib/libssl/ssl_lib.c
332
ctx->alpn_client_proto_list_len);
lib/libssl/ssl_lib.c
3335
SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val)
lib/libssl/ssl_lib.c
339
s->method = ctx->method;
lib/libssl/ssl_lib.c
340
s->quic_method = ctx->quic_method;
lib/libssl/ssl_lib.c
3401
SSL_CTX_get_cert_store(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
3403
return (ctx->cert_store);
lib/libssl/ssl_lib.c
3408
SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store)
lib/libssl/ssl_lib.c
3410
X509_STORE_free(ctx->cert_store);
lib/libssl/ssl_lib.c
3411
ctx->cert_store = store;
lib/libssl/ssl_lib.c
3416
SSL_CTX_set1_cert_store(SSL_CTX *ctx, X509_STORE *store)
lib/libssl/ssl_lib.c
3421
SSL_CTX_set_cert_store(ctx, store);
lib/libssl/ssl_lib.c
3426
SSL_CTX_get0_certificate(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
3428
if (ctx->cert == NULL)
lib/libssl/ssl_lib.c
3431
return ctx->cert->key->x509;
lib/libssl/ssl_lib.c
3436
SSL_CTX_get0_privatekey(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
3438
if (ctx->cert == NULL)
lib/libssl/ssl_lib.c
3441
return ctx->cert->key->privatekey;
lib/libssl/ssl_lib.c
3453
SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*cb)(SSL *ssl, int is_export,
lib/libssl/ssl_lib.c
3456
SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TMP_RSA_CB,(void (*)(void))cb);
lib/libssl/ssl_lib.c
346
s->server = ctx->method->server;
lib/libssl/ssl_lib.c
3469
SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, DH *(*dh)(SSL *ssl, int is_export,
lib/libssl/ssl_lib.c
3472
SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TMP_DH_CB,(void (*)(void))dh);
lib/libssl/ssl_lib.c
3485
SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx, EC_KEY *(*ecdh)(SSL *ssl,
lib/libssl/ssl_lib.c
3488
SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TMP_ECDH_CB,
lib/libssl/ssl_lib.c
3503
SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version,
lib/libssl/ssl_lib.c
3506
SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_MSG_CALLBACK,
lib/libssl/ssl_lib.c
3527
SSL_CTX_get_min_proto_version(SSL_CTX *ctx)
lib/libssl/ssl_lib.c
3529
return ctx->min_proto_version;
lib/libssl/ssl_lib.c
3534
SSL_CTX_set_min_proto_version(SSL_CTX *ctx, uint16_t version)
lib/libssl/ssl_lib.c
3536
return ssl_version_set_min(ctx->method, version,
lib/libssl/ssl_lib.c
3537
ctx->max_tls_version, &ctx->min_tls_version,
lib/libssl/ssl_lib.c
3538
&ctx->min_proto_version);
lib/libssl/ssl_lib.c
3543
SSL_CTX_get_max_proto_version(SSL_CTX *ctx)
lib/libssl/ssl_lib.c
3545
return ctx->max_proto_version;
lib/libssl/ssl_lib.c
3550
SSL_CTX_set_max_proto_version(SSL_CTX *ctx, uint16_t version)
lib/libssl/ssl_lib.c
3552
return ssl_version_set_max(ctx->method, version,
lib/libssl/ssl_lib.c
3553
ctx->min_tls_version, &ctx->max_tls_version,
lib/libssl/ssl_lib.c
3554
&ctx->max_proto_version);
lib/libssl/ssl_lib.c
3590
SSL_CTX_get_ssl_method(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
3592
return ctx->method;
lib/libssl/ssl_lib.c
3597
SSL_CTX_get_security_level(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
3599
return ctx->cert->security_level;
lib/libssl/ssl_lib.c
3604
SSL_CTX_set_security_level(SSL_CTX *ctx, int level)
lib/libssl/ssl_lib.c
3606
ctx->cert->security_level = level;
lib/libssl/ssl_lib.c
362
SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx,
lib/libssl/ssl_lib.c
365
if (sid_ctx_len > sizeof ctx->sid_ctx) {
lib/libssl/ssl_lib.c
369
ctx->sid_ctx_length = sid_ctx_len;
lib/libssl/ssl_lib.c
370
memcpy(ctx->sid_ctx, sid_ctx, sid_ctx_len);
lib/libssl/ssl_lib.c
392
SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb)
lib/libssl/ssl_lib.c
395
ctx->generate_session_id = cb;
lib/libssl/ssl_lib.c
432
p = lh_SSL_SESSION_retrieve(ssl->ctx->sessions, &r);
lib/libssl/ssl_lib.c
496
SSL_CTX_get0_param(SSL_CTX *ctx)
lib/libssl/ssl_lib.c
498
return (ctx->param);
lib/libssl/ssl_lib.c
503
SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm)
lib/libssl/ssl_lib.c
505
return (X509_VERIFY_PARAM_set1(ctx->param, vpm));
lib/libssl/ssl_lib.c
587
SSL_CTX_free(s->ctx);
lib/libssl/ssl_lib.c
807
SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb)
lib/libssl/ssl_lib.c
809
ctx->keylog_callback = cb;
lib/libssl/ssl_lib.c
814
SSL_CTX_get_keylog_callback(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
816
return (ctx->keylog_callback);
lib/libssl/ssl_lib.c
837
SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets)
lib/libssl/ssl_lib.c
839
ctx->num_tickets = num_tickets;
lib/libssl/ssl_lib.c
846
SSL_CTX_get_num_tickets(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
848
return ctx->num_tickets;
lib/libssl/ssl_lib.c
853
SSL_CTX_get_verify_mode(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
855
return (ctx->verify_mode);
lib/libssl/ssl_lib.c
860
SSL_CTX_get_verify_depth(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
862
return (X509_VERIFY_PARAM_get_depth(ctx->param));
lib/libssl/ssl_lib.c
867
(*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int, X509_STORE_CTX *)
lib/libssl/ssl_lib.c
869
return (ctx->default_verify_callback);
lib/libssl/ssl_lib.c
875
int (*callback)(int ok, X509_STORE_CTX *ctx))
lib/libssl/ssl_lib.c
992
SSL_CTX_check_private_key(const SSL_CTX *ctx)
lib/libssl/ssl_lib.c
994
if ((ctx == NULL) || (ctx->cert == NULL) ||
lib/libssl/ssl_lib.c
995
(ctx->cert->key->x509 == NULL)) {
lib/libssl/ssl_lib.c
999
if (ctx->cert->key->privatekey == NULL) {
lib/libssl/ssl_local.h
1216
SSL_CERT *ssl_get0_cert(SSL_CTX *ctx, SSL *ssl);
lib/libssl/ssl_local.h
1217
int ssl_cert_set0_chain(SSL_CTX *ctx, SSL *ssl, STACK_OF(X509) *chain);
lib/libssl/ssl_local.h
1218
int ssl_cert_set1_chain(SSL_CTX *ctx, SSL *ssl, STACK_OF(X509) *chain);
lib/libssl/ssl_local.h
1219
int ssl_cert_add0_chain_cert(SSL_CTX *ctx, SSL *ssl, X509 *cert);
lib/libssl/ssl_local.h
1220
int ssl_cert_add1_chain_cert(SSL_CTX *ctx, SSL *ssl, X509 *cert);
lib/libssl/ssl_local.h
1222
int ssl_security_default_cb(const SSL *ssl, const SSL_CTX *ctx, int op,
lib/libssl/ssl_local.h
1228
int ssl_ctx_security_dh(const SSL_CTX *ctx, DH *dh);
lib/libssl/ssl_local.h
1233
int ssl_security_cert(const SSL_CTX *ctx, const SSL *ssl, X509 *x509,
lib/libssl/ssl_local.h
1431
char ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx);
lib/libssl/ssl_local.h
1432
int ssl3_cbc_digest_record(const EVP_MD_CTX *ctx, unsigned char *md_out,
lib/libssl/ssl_local.h
320
int (*security_cb)(const SSL *s, const SSL_CTX *ctx, int op, int bits,
lib/libssl/ssl_local.h
718
void (*remove_session_cb)(struct ssl_ctx_st *ctx, SSL_SESSION *sess);
lib/libssl/ssl_local.h
743
int (*default_verify_callback)(int ok,X509_STORE_CTX *ctx); /* called 'verify_callback' in the SSL */
lib/libssl/ssl_local.h
901
SSL_CTX *ctx;
lib/libssl/ssl_local.h
959
int (*verify_callback)(int ok,X509_STORE_CTX *ctx); /* fail if callback returns 0 */
lib/libssl/ssl_pkt.c
1238
SSL_CTX_remove_session(s->ctx, s->session);
lib/libssl/ssl_pkt.c
713
SSL_CTX_remove_session(s->ctx, s->session);
lib/libssl/ssl_rsa.c
112
ssl->ctx->default_passwd_callback,
lib/libssl/ssl_rsa.c
113
ssl->ctx->default_passwd_callback_userdata);
lib/libssl/ssl_rsa.c
179
ssl_set_pkey(SSL_CTX *ctx, SSL *ssl, EVP_PKEY *pkey)
lib/libssl/ssl_rsa.c
190
if ((c = ssl_get0_cert(ctx, ssl)) == NULL)
lib/libssl/ssl_rsa.c
254
ssl->ctx->default_passwd_callback,
lib/libssl/ssl_rsa.c
255
ssl->ctx->default_passwd_callback_userdata);
lib/libssl/ssl_rsa.c
323
ssl->ctx->default_passwd_callback,
lib/libssl/ssl_rsa.c
324
ssl->ctx->default_passwd_callback_userdata);
lib/libssl/ssl_rsa.c
362
SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x)
lib/libssl/ssl_rsa.c
368
return ssl_set_cert(ctx, NULL, x);
lib/libssl/ssl_rsa.c
373
ssl_get_password_cb_and_arg(SSL_CTX *ctx, SSL *ssl,
lib/libssl/ssl_rsa.c
377
ctx = ssl->ctx;
lib/libssl/ssl_rsa.c
379
*passwd_cb = ctx->default_passwd_callback;
lib/libssl/ssl_rsa.c
380
*passwd_arg = ctx->default_passwd_callback_userdata;
lib/libssl/ssl_rsa.c
386
ssl_set_cert(SSL_CTX *ctx, SSL *ssl, X509 *x)
lib/libssl/ssl_rsa.c
393
if (!ssl_security_cert(ctx, ssl, x, 1, &ssl_err)) {
lib/libssl/ssl_rsa.c
398
if ((c = ssl_get0_cert(ctx, ssl)) == NULL)
lib/libssl/ssl_rsa.c
452
SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type)
lib/libssl/ssl_rsa.c
474
x = PEM_read_bio_X509(in, NULL, ctx->default_passwd_callback,
lib/libssl/ssl_rsa.c
475
ctx->default_passwd_callback_userdata);
lib/libssl/ssl_rsa.c
486
ret = SSL_CTX_use_certificate(ctx, x);
lib/libssl/ssl_rsa.c
495
SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d)
lib/libssl/ssl_rsa.c
506
ret = SSL_CTX_use_certificate(ctx, x);
lib/libssl/ssl_rsa.c
513
SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa)
lib/libssl/ssl_rsa.c
528
if (!ssl_set_pkey(ctx, NULL, pkey))
lib/libssl/ssl_rsa.c
541
SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type)
lib/libssl/ssl_rsa.c
563
ctx->default_passwd_callback,
lib/libssl/ssl_rsa.c
564
ctx->default_passwd_callback_userdata);
lib/libssl/ssl_rsa.c
573
ret = SSL_CTX_use_RSAPrivateKey(ctx, rsa);
lib/libssl/ssl_rsa.c
582
SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len)
lib/libssl/ssl_rsa.c
592
ret = SSL_CTX_use_RSAPrivateKey(ctx, rsa);
lib/libssl/ssl_rsa.c
599
SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey)
lib/libssl/ssl_rsa.c
605
return ssl_set_pkey(ctx, NULL, pkey);
lib/libssl/ssl_rsa.c
610
SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type)
lib/libssl/ssl_rsa.c
629
ctx->default_passwd_callback,
lib/libssl/ssl_rsa.c
630
ctx->default_passwd_callback_userdata);
lib/libssl/ssl_rsa.c
642
ret = SSL_CTX_use_PrivateKey(ctx, pkey);
lib/libssl/ssl_rsa.c
651
SSL_CTX_use_PrivateKey_ASN1(int type, SSL_CTX *ctx, const unsigned char *d,
lib/libssl/ssl_rsa.c
662
ret = SSL_CTX_use_PrivateKey(ctx, pkey);
lib/libssl/ssl_rsa.c
675
ssl_use_certificate_chain_bio(SSL_CTX *ctx, SSL *ssl, BIO *in)
lib/libssl/ssl_rsa.c
683
if (!ssl_get_password_cb_and_arg(ctx, ssl, &passwd_cb, &passwd_arg))
lib/libssl/ssl_rsa.c
69
static int ssl_get_password_cb_and_arg(SSL_CTX *ctx, SSL *ssl,
lib/libssl/ssl_rsa.c
692
if (!ssl_set_cert(ctx, ssl, x))
lib/libssl/ssl_rsa.c
695
if (!ssl_cert_set0_chain(ctx, ssl, NULL))
lib/libssl/ssl_rsa.c
701
if (!ssl_cert_add0_chain_cert(ctx, ssl, ca)) {
lib/libssl/ssl_rsa.c
71
static int ssl_set_cert(SSL_CTX *ctx, SSL *ssl, X509 *x509);
lib/libssl/ssl_rsa.c
72
static int ssl_set_pkey(SSL_CTX *ctx, SSL *ssl, EVP_PKEY *pkey);
lib/libssl/ssl_rsa.c
722
ssl_use_certificate_chain_file(SSL_CTX *ctx, SSL *ssl, const char *file)
lib/libssl/ssl_rsa.c
73
static int ssl_use_certificate_chain_bio(SSL_CTX *ctx, SSL *ssl, BIO *in);
lib/libssl/ssl_rsa.c
738
ret = ssl_use_certificate_chain_bio(ctx, ssl, in);
lib/libssl/ssl_rsa.c
74
static int ssl_use_certificate_chain_file(SSL_CTX *ctx, SSL *ssl,
lib/libssl/ssl_rsa.c
746
SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file)
lib/libssl/ssl_rsa.c
748
return ssl_use_certificate_chain_file(ctx, NULL, file);
lib/libssl/ssl_rsa.c
760
SSL_CTX_use_certificate_chain_mem(SSL_CTX *ctx, void *buf, int len)
lib/libssl/ssl_rsa.c
771
ret = ssl_use_certificate_chain_bio(ctx, NULL, in);
lib/libssl/ssl_seclevel.c
101
if (!ssl_security_level_and_minimum_bits(ctx, ssl, &security_level,
lib/libssl/ssl_seclevel.c
142
ssl_security_secop_version(const SSL_CTX *ctx, const SSL *ssl, int version)
lib/libssl/ssl_seclevel.c
147
if (!ssl_security_level_and_minimum_bits(ctx, ssl, &security_level, NULL))
lib/libssl/ssl_seclevel.c
159
ssl_security_secop_compression(const SSL_CTX *ctx, const SSL *ssl)
lib/libssl/ssl_seclevel.c
165
ssl_security_secop_tickets(const SSL_CTX *ctx, const SSL *ssl)
lib/libssl/ssl_seclevel.c
169
if (!ssl_security_level_and_minimum_bits(ctx, ssl, &security_level, NULL))
lib/libssl/ssl_seclevel.c
176
ssl_security_secop_tmp_dh(const SSL_CTX *ctx, const SSL *ssl, int bits)
lib/libssl/ssl_seclevel.c
180
if (!ssl_security_level_and_minimum_bits(ctx, ssl, &security_level,
lib/libssl/ssl_seclevel.c
192
ssl_security_secop_default(const SSL_CTX *ctx, const SSL *ssl, int bits)
lib/libssl/ssl_seclevel.c
196
if (!ssl_security_level_and_minimum_bits(ctx, ssl, NULL, &minimum_bits))
lib/libssl/ssl_seclevel.c
203
ssl_security_default_cb(const SSL *ssl, const SSL_CTX *ctx, int secop, int bits,
lib/libssl/ssl_seclevel.c
210
return ssl_security_secop_cipher(ctx, ssl, bits, cipher);
lib/libssl/ssl_seclevel.c
212
return ssl_security_secop_version(ctx, ssl, version);
lib/libssl/ssl_seclevel.c
214
return ssl_security_secop_compression(ctx, ssl);
lib/libssl/ssl_seclevel.c
216
return ssl_security_secop_tickets(ctx, ssl);
lib/libssl/ssl_seclevel.c
218
return ssl_security_secop_tmp_dh(ctx, ssl, bits);
lib/libssl/ssl_seclevel.c
220
return ssl_security_secop_default(ctx, ssl, bits);
lib/libssl/ssl_seclevel.c
225
ssl_ctx_security(const SSL_CTX *ctx, int secop, int bits, int nid, void *other)
lib/libssl/ssl_seclevel.c
227
return ctx->cert->security_cb(NULL, ctx, secop, bits, nid,
lib/libssl/ssl_seclevel.c
228
other, ctx->cert->security_ex_data);
lib/libssl/ssl_seclevel.c
285
ssl_ctx_security_dh(const SSL_CTX *ctx, DH *dh)
lib/libssl/ssl_seclevel.c
291
return ssl_ctx_security(ctx, SSL_SECOP_TMP_DH, bits, 0, dh);
lib/libssl/ssl_seclevel.c
316
ssl_security_cert_key(const SSL_CTX *ctx, const SSL *ssl, X509 *x509, int secop)
lib/libssl/ssl_seclevel.c
325
return ssl_ctx_security(ctx, secop, security_bits, 0, x509);
lib/libssl/ssl_seclevel.c
34
ssl_security_normalize_level(const SSL_CTX *ctx, const SSL *ssl, int *out_level)
lib/libssl/ssl_seclevel.c
359
ssl_security_cert_sig(const SSL_CTX *ctx, const SSL *ssl, X509 *x509, int secop)
lib/libssl/ssl_seclevel.c
376
return ssl_ctx_security(ctx, secop, security_bits, md_nid, x509);
lib/libssl/ssl_seclevel.c
38
if (ctx != NULL)
lib/libssl/ssl_seclevel.c
380
ssl_security_cert(const SSL_CTX *ctx, const SSL *ssl, X509 *x509,
lib/libssl/ssl_seclevel.c
39
security_level = SSL_CTX_get_security_level(ctx);
lib/libssl/ssl_seclevel.c
395
if (!ssl_security_cert_key(ctx, ssl, x509, operation)) {
lib/libssl/ssl_seclevel.c
400
if (!ssl_security_cert_sig(ctx, ssl, x509, SSL_SECOP_CA_MD)) {
lib/libssl/ssl_seclevel.c
76
ssl_security_level_and_minimum_bits(const SSL_CTX *ctx, const SSL *ssl,
lib/libssl/ssl_seclevel.c
81
if (!ssl_security_normalize_level(ctx, ssl, &security_level))
lib/libssl/ssl_seclevel.c
95
ssl_security_secop_cipher(const SSL_CTX *ctx, const SSL *ssl, int bits,
lib/libssl/ssl_sess.c
1120
SSL_CTX *ctx;
lib/libssl/ssl_sess.c
1133
SSL_SESSION_list_remove(p->ctx, s);
lib/libssl/ssl_sess.c
1135
if (p->ctx->remove_session_cb != NULL)
lib/libssl/ssl_sess.c
1136
p->ctx->remove_session_cb(p->ctx, s);
lib/libssl/ssl_sess.c
1156
tp.ctx = s;
lib/libssl/ssl_sess.c
1174
SSL_CTX_remove_session(s->ctx, s->session);
lib/libssl/ssl_sess.c
1182
SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s)
lib/libssl/ssl_sess.c
1187
if (s->next == (SSL_SESSION *)&(ctx->session_cache_tail)) {
lib/libssl/ssl_sess.c
1189
if (s->prev == (SSL_SESSION *)&(ctx->session_cache_head)) {
lib/libssl/ssl_sess.c
1191
ctx->session_cache_head = NULL;
lib/libssl/ssl_sess.c
1192
ctx->session_cache_tail = NULL;
lib/libssl/ssl_sess.c
1194
ctx->session_cache_tail = s->prev;
lib/libssl/ssl_sess.c
1196
(SSL_SESSION *)&(ctx->session_cache_tail);
lib/libssl/ssl_sess.c
1199
if (s->prev == (SSL_SESSION *)&(ctx->session_cache_head)) {
lib/libssl/ssl_sess.c
1201
ctx->session_cache_head = s->next;
lib/libssl/ssl_sess.c
1203
(SSL_SESSION *)&(ctx->session_cache_head);
lib/libssl/ssl_sess.c
1214
SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s)
lib/libssl/ssl_sess.c
1217
SSL_SESSION_list_remove(ctx, s);
lib/libssl/ssl_sess.c
1219
if (ctx->session_cache_head == NULL) {
lib/libssl/ssl_sess.c
1220
ctx->session_cache_head = s;
lib/libssl/ssl_sess.c
1221
ctx->session_cache_tail = s;
lib/libssl/ssl_sess.c
1222
s->prev = (SSL_SESSION *)&(ctx->session_cache_head);
lib/libssl/ssl_sess.c
1223
s->next = (SSL_SESSION *)&(ctx->session_cache_tail);
lib/libssl/ssl_sess.c
1225
s->next = ctx->session_cache_head;
lib/libssl/ssl_sess.c
1227
s->prev = (SSL_SESSION *)&(ctx->session_cache_head);
lib/libssl/ssl_sess.c
1228
ctx->session_cache_head = s;
lib/libssl/ssl_sess.c
1233
SSL_CTX_sess_set_new_cb(SSL_CTX *ctx,
lib/libssl/ssl_sess.c
1235
ctx->new_session_cb = cb;
lib/libssl/ssl_sess.c
1240
(*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(SSL *ssl, SSL_SESSION *sess)
lib/libssl/ssl_sess.c
1242
return ctx->new_session_cb;
lib/libssl/ssl_sess.c
1247
SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx,
lib/libssl/ssl_sess.c
1248
void (*cb)(SSL_CTX *ctx, SSL_SESSION *sess))
lib/libssl/ssl_sess.c
1250
ctx->remove_session_cb = cb;
lib/libssl/ssl_sess.c
1255
(*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(SSL_CTX * ctx, SSL_SESSION *sess)
lib/libssl/ssl_sess.c
1257
return ctx->remove_session_cb;
lib/libssl/ssl_sess.c
1262
SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, SSL_SESSION *(*cb)(struct ssl_st *ssl,
lib/libssl/ssl_sess.c
1265
ctx->get_session_cb = cb;
lib/libssl/ssl_sess.c
1270
(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(SSL *ssl, const unsigned char *data,
lib/libssl/ssl_sess.c
1273
return ctx->get_session_cb;
lib/libssl/ssl_sess.c
1278
SSL_CTX_set_info_callback(SSL_CTX *ctx,
lib/libssl/ssl_sess.c
1281
ctx->info_callback = cb;
lib/libssl/ssl_sess.c
1286
(*SSL_CTX_get_info_callback(SSL_CTX *ctx))(const SSL *ssl, int type, int val)
lib/libssl/ssl_sess.c
1288
return ctx->info_callback;
lib/libssl/ssl_sess.c
1293
SSL_CTX_set_client_cert_cb(SSL_CTX *ctx,
lib/libssl/ssl_sess.c
1296
ctx->client_cert_cb = cb;
lib/libssl/ssl_sess.c
1301
(*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL * ssl, X509 ** x509,
lib/libssl/ssl_sess.c
1304
return ctx->client_cert_cb;
lib/libssl/ssl_sess.c
1309
SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx,
lib/libssl/ssl_sess.c
1312
ctx->app_gen_cookie_cb = cb;
lib/libssl/ssl_sess.c
1317
SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx,
lib/libssl/ssl_sess.c
1320
ctx->app_verify_cookie_cb = cb;
lib/libssl/ssl_sess.c
143
static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
lib/libssl/ssl_sess.c
144
static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s);
lib/libssl/ssl_sess.c
145
static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck);
lib/libssl/ssl_sess.c
750
SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c)
lib/libssl/ssl_sess.c
767
s = lh_SSL_SESSION_insert(ctx->sessions, c);
lib/libssl/ssl_sess.c
776
SSL_SESSION_list_remove(ctx, s);
lib/libssl/ssl_sess.c
790
SSL_SESSION_list_add(ctx, c);
lib/libssl/ssl_sess.c
808
if (SSL_CTX_sess_get_cache_size(ctx) > 0) {
lib/libssl/ssl_sess.c
809
while (SSL_CTX_sess_number(ctx) >
lib/libssl/ssl_sess.c
810
SSL_CTX_sess_get_cache_size(ctx)) {
lib/libssl/ssl_sess.c
811
if (!remove_session_lock(ctx,
lib/libssl/ssl_sess.c
812
ctx->session_cache_tail, 0))
lib/libssl/ssl_sess.c
815
ctx->stats.sess_cache_full++;
lib/libssl/ssl_sess.c
825
SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c)
lib/libssl/ssl_sess.c
827
return remove_session_lock(ctx, c, 1);
lib/libssl/ssl_sess.c
832
remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck)
lib/libssl/ssl_sess.c
842
if ((r = lh_SSL_SESSION_retrieve(ctx->sessions, c)) == c) {
lib/libssl/ssl_sess.c
844
r = lh_SSL_SESSION_delete(ctx->sessions, c);
lib/libssl/ssl_sess.c
845
SSL_SESSION_list_remove(ctx, c);
lib/libssl/ssl_sess.c
852
if (ctx->remove_session_cb != NULL)
lib/libssl/ssl_sess.c
853
ctx->remove_session_cb(ctx, r);
lib/libssl/ssl_sess.c
906
return SSL_set_ssl_method(s, s->ctx->method);
lib/libssl/ssl_srvr.c
1189
if (s->ctx->app_gen_cookie_cb == NULL ||
lib/libssl/ssl_srvr.c
1190
s->ctx->app_gen_cookie_cb(s, s->d1->cookie,
lib/libssl/ssl_srvr.c
1262
if (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_SERVER)
lib/libssl/ssl_srvr.c
2216
EVP_CIPHER_CTX *ctx = NULL;
lib/libssl/ssl_srvr.c
2226
if ((ctx = EVP_CIPHER_CTX_new()) == NULL)
lib/libssl/ssl_srvr.c
2248
key_name, iv, ctx, hctx, 1) < 0)
lib/libssl/ssl_srvr.c
2252
EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL,
lib/libssl/ssl_srvr.c
2264
if (!EVP_EncryptUpdate(ctx, enc_session, &len, session,
lib/libssl/ssl_srvr.c
2268
if (!EVP_EncryptFinal_ex(ctx, enc_session + enc_session_len,
lib/libssl/ssl_srvr.c
2279
if (!HMAC_Update(hctx, iv, EVP_CIPHER_CTX_iv_length(ctx)))
lib/libssl/ssl_srvr.c
2301
if ((iv_len = EVP_CIPHER_CTX_iv_length(ctx)) < 0)
lib/libssl/ssl_srvr.c
2321
EVP_CIPHER_CTX_free(ctx);
lib/libssl/ssl_srvr.c
2331
EVP_CIPHER_CTX_free(ctx);
lib/libssl/ssl_srvr.c
283
s->ctx->stats.sess_accept++;
lib/libssl/ssl_srvr.c
300
s->ctx->stats.sess_accept_renegotiate++;
lib/libssl/ssl_srvr.c
712
s->ctx->stats.sess_accept_good++;
lib/libssl/ssl_srvr.c
949
if (s->ctx->app_verify_cookie_cb != NULL) {
lib/libssl/ssl_srvr.c
950
if (s->ctx->app_verify_cookie_cb(s,
lib/libssl/ssl_tlsext.c
102
if (s->ctx->alpn_select_cb == NULL)
lib/libssl/ssl_tlsext.c
1022
s->ctx->tlsext_status_cb != NULL) {
lib/libssl/ssl_tlsext.c
1024
if (s->ctx->tlsext_status_cb(s,
lib/libssl/ssl_tlsext.c
1025
s->ctx->tlsext_status_arg) == SSL_TLSEXT_ERR_OK &&
lib/libssl/ssl_tlsext.c
111
r = s->ctx->alpn_select_cb(s, &selected, &selected_len,
lib/libssl/ssl_tlsext.c
112
CBS_data(&alpn), CBS_len(&alpn), s->ctx->alpn_select_cb_arg);
lib/libssl/ssl_tlsext.c
2560
struct tls13_ctx *ctx = s->tls13;
lib/libssl/ssl_tlsext.c
2565
if (!tls13_clienthello_hash_update_bytes(ctx, (void *)&type,
lib/libssl/ssl_tlsext.c
2574
if (!tls13_clienthello_hash_update(ctx, cbs))
lib/libssl/t1_enc.c
167
EVP_MD_CTX *ctx = NULL;
lib/libssl/t1_enc.c
176
if ((ctx = EVP_MD_CTX_new()) == NULL)
lib/libssl/t1_enc.c
182
if (!EVP_DigestSignInit(ctx, NULL, md, NULL, mac_key))
lib/libssl/t1_enc.c
184
if (seed1 && !EVP_DigestSignUpdate(ctx, seed1, seed1_len))
lib/libssl/t1_enc.c
186
if (seed2 && !EVP_DigestSignUpdate(ctx, seed2, seed2_len))
lib/libssl/t1_enc.c
188
if (seed3 && !EVP_DigestSignUpdate(ctx, seed3, seed3_len))
lib/libssl/t1_enc.c
190
if (seed4 && !EVP_DigestSignUpdate(ctx, seed4, seed4_len))
lib/libssl/t1_enc.c
192
if (seed5 && !EVP_DigestSignUpdate(ctx, seed5, seed5_len))
lib/libssl/t1_enc.c
194
if (!EVP_DigestSignFinal(ctx, A1, &A1_len))
lib/libssl/t1_enc.c
198
if (!EVP_DigestSignInit(ctx, NULL, md, NULL, mac_key))
lib/libssl/t1_enc.c
200
if (!EVP_DigestSignUpdate(ctx, A1, A1_len))
lib/libssl/t1_enc.c
202
if (seed1 && !EVP_DigestSignUpdate(ctx, seed1, seed1_len))
lib/libssl/t1_enc.c
204
if (seed2 && !EVP_DigestSignUpdate(ctx, seed2, seed2_len))
lib/libssl/t1_enc.c
206
if (seed3 && !EVP_DigestSignUpdate(ctx, seed3, seed3_len))
lib/libssl/t1_enc.c
208
if (seed4 && !EVP_DigestSignUpdate(ctx, seed4, seed4_len))
lib/libssl/t1_enc.c
210
if (seed5 && !EVP_DigestSignUpdate(ctx, seed5, seed5_len))
lib/libssl/t1_enc.c
212
if (!EVP_DigestSignFinal(ctx, hmac, &hmac_len))
lib/libssl/t1_enc.c
227
if (!EVP_DigestSignInit(ctx, NULL, md, NULL, mac_key))
lib/libssl/t1_enc.c
229
if (!EVP_DigestSignUpdate(ctx, A1, A1_len))
lib/libssl/t1_enc.c
231
if (!EVP_DigestSignFinal(ctx, A1, &A1_len))
lib/libssl/t1_enc.c
238
EVP_MD_CTX_free(ctx);
lib/libssl/t1_lib.c
767
if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0)
lib/libssl/t1_lib.c
768
ret = s->ctx->tlsext_servername_callback(s, &al,
lib/libssl/t1_lib.c
769
s->ctx->tlsext_servername_arg);
lib/libssl/t1_lib.c
799
s->ctx && s->ctx->tlsext_status_cb) {
lib/libssl/t1_lib.c
812
r = s->ctx->tlsext_status_cb(s,
lib/libssl/t1_lib.c
813
s->ctx->tlsext_status_arg);
lib/libssl/t1_lib.c
856
if (s->ctx != NULL && s->ctx->tlsext_servername_callback != 0)
lib/libssl/t1_lib.c
857
ret = s->ctx->tlsext_servername_callback(s, &al,
lib/libssl/t1_lib.c
858
s->ctx->tlsext_servername_arg);
lib/libssl/t1_lib.c
867
s->ctx && s->ctx->tlsext_status_cb) {
lib/libssl/t1_lib.c
874
r = s->ctx->tlsext_status_cb(s,
lib/libssl/t1_lib.c
875
s->ctx->tlsext_status_arg);
lib/libssl/tls1.h
355
#define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \
lib/libssl/tls1.h
356
SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,(void (*)(void))cb)
lib/libssl/tls1.h
363
#define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \
lib/libssl/tls1.h
364
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0, (void *)arg)
lib/libssl/tls1.h
366
#define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \
lib/libssl/tls1.h
367
SSL_CTX_ctrl((ctx),SSL_CTRL_GET_TLSEXT_TICKET_KEYS,(keylen),(keys))
lib/libssl/tls1.h
368
#define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \
lib/libssl/tls1.h
369
SSL_CTX_ctrl((ctx),SSL_CTRL_SET_TLSEXT_TICKET_KEYS,(keylen),(keys))
lib/libssl/tls13_client.c
100
tls13_client_hello_build(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_client.c
1005
tls13_client_finished_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_client.c
1007
struct tls13_secrets *secrets = ctx->hs->tls13.secrets;
lib/libssl/tls13_client.c
1019
if (!tls13_secret_init(&finished_key, EVP_MD_size(ctx->hash)))
lib/libssl/tls13_client.c
1022
if (!tls13_hkdf_expand_label(&finished_key, ctx->hash,
lib/libssl/tls13_client.c
1027
if (!tls1_transcript_hash_value(ctx->ssl, transcript_hash,
lib/libssl/tls13_client.c
1034
ctx->hash, NULL))
lib/libssl/tls13_client.c
104
SSL *s = ctx->ssl;
lib/libssl/tls13_client.c
1048
if (!CBS_write_bytes(&cbs, ctx->hs->finished,
lib/libssl/tls13_client.c
1049
sizeof(ctx->hs->finished), &ctx->hs->finished_len))
lib/libssl/tls13_client.c
1062
tls13_client_finished_sent(struct tls13_ctx *ctx)
lib/libssl/tls13_client.c
1064
struct tls13_secrets *secrets = ctx->hs->tls13.secrets;
lib/libssl/tls13_client.c
1070
return tls13_record_layer_set_write_traffic_key(ctx->rl,
lib/libssl/tls13_client.c
117
if (!CBB_add_bytes(&session_id, ctx->hs->tls13.legacy_session_id,
lib/libssl/tls13_client.c
118
ctx->hs->tls13.legacy_session_id_len))
lib/libssl/tls13_client.c
146
tls13_client_hello_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_client.c
148
if (ctx->hs->our_min_tls_version < TLS1_2_VERSION)
lib/libssl/tls13_client.c
149
tls13_record_layer_set_legacy_version(ctx->rl, TLS1_VERSION);
lib/libssl/tls13_client.c
152
tls13_record_layer_allow_legacy_alerts(ctx->rl, 1);
lib/libssl/tls13_client.c
154
if (!tls13_client_hello_build(ctx, cbb))
lib/libssl/tls13_client.c
161
tls13_client_hello_sent(struct tls13_ctx *ctx)
lib/libssl/tls13_client.c
163
tls1_transcript_freeze(ctx->ssl);
lib/libssl/tls13_client.c
165
if (ctx->middlebox_compat) {
lib/libssl/tls13_client.c
166
tls13_record_layer_allow_ccs(ctx->rl, 1);
lib/libssl/tls13_client.c
167
ctx->send_dummy_ccs = 1;
lib/libssl/tls13_client.c
221
tls13_server_hello_process(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_client.c
229
SSL *s = ctx->ssl;
lib/libssl/tls13_client.c
243
if (ctx->hs->our_max_tls_version >= TLS1_3_VERSION) {
lib/libssl/tls13_client.c
256
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_client.c
264
ctx->hs->tls13.use_legacy = 1;
lib/libssl/tls13_client.c
269
tls13_record_layer_set_legacy_version(ctx->rl, TLS1_2_VERSION);
lib/libssl/tls13_client.c
270
tls13_record_layer_allow_legacy_alerts(ctx->rl, 0);
lib/libssl/tls13_client.c
277
ctx->hs->tls13.hrr = 1;
lib/libssl/tls13_client.c
28
tls13_client_init(struct tls13_ctx *ctx)
lib/libssl/tls13_client.c
281
ctx->alert = alert_desc;
lib/libssl/tls13_client.c
290
if (ctx->hs->tls13.server_version != TLS1_3_VERSION ||
lib/libssl/tls13_client.c
292
ctx->alert = TLS13_ALERT_PROTOCOL_VERSION;
lib/libssl/tls13_client.c
295
ctx->hs->negotiated_tls_version = ctx->hs->tls13.server_version;
lib/libssl/tls13_client.c
296
ctx->hs->peer_legacy_version = legacy_version;
lib/libssl/tls13_client.c
299
if (!CBS_mem_equal(&session_id, ctx->hs->tls13.legacy_session_id,
lib/libssl/tls13_client.c
300
ctx->hs->tls13.legacy_session_id_len)) {
lib/libssl/tls13_client.c
301
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_client.c
311
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_client.c
315
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_client.c
318
if (!(ctx->handshake_stage.hs_type & WITHOUT_HRR) && !ctx->hs->tls13.hrr) {
lib/libssl/tls13_client.c
32
SSL *s = ctx->ssl;
lib/libssl/tls13_client.c
323
if (ctx->hs->cipher != cipher) {
lib/libssl/tls13_client.c
324
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_client.c
328
ctx->hs->cipher = cipher;
lib/libssl/tls13_client.c
331
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_client.c
338
if (ctx->alert == 0)
lib/libssl/tls13_client.c
339
ctx->alert = TLS13_ALERT_DECODE_ERROR;
lib/libssl/tls13_client.c
34
if (!ssl_supported_tls_version_range(s, &ctx->hs->our_min_tls_version,
lib/libssl/tls13_client.c
345
tls13_client_engage_record_protection(struct tls13_ctx *ctx)
lib/libssl/tls13_client.c
35
&ctx->hs->our_max_tls_version)) {
lib/libssl/tls13_client.c
353
SSL *s = ctx->ssl;
lib/libssl/tls13_client.c
358
if (!tls_key_share_derive(ctx->hs->key_share, &shared_key,
lib/libssl/tls13_client.c
362
s->session->cipher_value = ctx->hs->cipher->value;
lib/libssl/tls13_client.c
363
s->session->ssl_version = ctx->hs->tls13.server_version;
lib/libssl/tls13_client.c
365
if ((ctx->aead = tls13_cipher_aead(ctx->hs->cipher)) == NULL)
lib/libssl/tls13_client.c
367
if ((ctx->hash = tls13_cipher_hash(ctx->hs->cipher)) == NULL)
lib/libssl/tls13_client.c
370
if ((secrets = tls13_secrets_create(ctx->hash, 0)) == NULL)
lib/libssl/tls13_client.c
372
ctx->hs->tls13.secrets = secrets;
lib/libssl/tls13_client.c
389
if (!tls13_derive_handshake_secrets(ctx->hs->tls13.secrets, shared_key,
lib/libssl/tls13_client.c
39
s->version = ctx->hs->our_max_tls_version;
lib/libssl/tls13_client.c
393
tls13_record_layer_set_aead(ctx->rl, ctx->aead);
lib/libssl/tls13_client.c
394
tls13_record_layer_set_hash(ctx->rl, ctx->hash);
lib/libssl/tls13_client.c
396
if (!tls13_record_layer_set_read_traffic_key(ctx->rl,
lib/libssl/tls13_client.c
399
if (!tls13_record_layer_set_write_traffic_key(ctx->rl,
lib/libssl/tls13_client.c
41
tls13_record_layer_set_retry_after_phh(ctx->rl,
lib/libssl/tls13_client.c
412
tls13_server_hello_retry_request_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_client.c
420
ctx->handshake_stage.hs_type |= WITHOUT_HRR;
lib/libssl/tls13_client.c
421
return tls13_server_hello_recv(ctx, cbs);
lib/libssl/tls13_client.c
424
if (!tls13_server_hello_process(ctx, cbs))
lib/libssl/tls13_client.c
431
if (ctx->hs->tls13.use_legacy)
lib/libssl/tls13_client.c
432
return tls13_use_legacy_client(ctx);
lib/libssl/tls13_client.c
434
if (!ctx->hs->tls13.hrr)
lib/libssl/tls13_client.c
437
if (!tls13_synthetic_handshake_message(ctx))
lib/libssl/tls13_client.c
439
if (!tls13_handshake_msg_record(ctx))
lib/libssl/tls13_client.c
442
ctx->hs->tls13.hrr = 0;
lib/libssl/tls13_client.c
448
tls13_client_hello_retry_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_client.c
455
if (!tls1_check_group(ctx->ssl, ctx->hs->tls13.server_group))
lib/libssl/tls13_client.c
457
if (ctx->hs->tls13.server_group == tls_key_share_group(ctx->hs->key_share))
lib/libssl/tls13_client.c
461
tls_key_share_free(ctx->hs->key_share);
lib/libssl/tls13_client.c
462
if ((ctx->hs->key_share =
lib/libssl/tls13_client.c
463
tls_key_share_new(ctx->hs->tls13.server_group)) == NULL)
lib/libssl/tls13_client.c
465
if (!tls_key_share_client_generate(ctx->hs->key_share))
lib/libssl/tls13_client.c
468
if (!tls13_client_hello_build(ctx, cbb))
lib/libssl/tls13_client.c
475
tls13_server_hello_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_client.c
477
SSL *s = ctx->ssl;
lib/libssl/tls13_client.c
483
if (!tls13_server_hello_process(ctx, cbs))
lib/libssl/tls13_client.c
486
if (ctx->handshake_stage.hs_type & WITHOUT_HRR) {
lib/libssl/tls13_client.c
488
if (!tls13_handshake_msg_record(ctx))
lib/libssl/tls13_client.c
492
if (ctx->hs->tls13.use_legacy) {
lib/libssl/tls13_client.c
493
if (!(ctx->handshake_stage.hs_type & WITHOUT_HRR))
lib/libssl/tls13_client.c
495
return tls13_use_legacy_client(ctx);
lib/libssl/tls13_client.c
498
if (ctx->hs->tls13.hrr) {
lib/libssl/tls13_client.c
500
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_client.c
504
if (!tls13_client_engage_record_protection(ctx))
lib/libssl/tls13_client.c
507
ctx->handshake_stage.hs_type |= NEGOTIATED;
lib/libssl/tls13_client.c
513
tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_client.c
517
if (!tlsext_client_parse(ctx->ssl, SSL_TLSEXT_MSG_EE, cbs, &alert_desc)) {
lib/libssl/tls13_client.c
518
ctx->alert = alert_desc;
lib/libssl/tls13_client.c
526
tls13_server_certificate_request_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_client.c
537
if (tls13_handshake_msg_type(ctx->hs_msg) == TLS13_MT_CERTIFICATE) {
lib/libssl/tls13_client.c
538
ctx->handshake_stage.hs_type |= WITHOUT_CR;
lib/libssl/tls13_client.c
539
return tls13_server_certificate_recv(ctx, cbs);
lib/libssl/tls13_client.c
54
if ((ctx->hs->key_share = tls_key_share_new(groups[0])) == NULL)
lib/libssl/tls13_client.c
547
if (!tlsext_client_parse(ctx->ssl, SSL_TLSEXT_MSG_CR, cbs, &alert_desc)) {
lib/libssl/tls13_client.c
548
ctx->alert = alert_desc;
lib/libssl/tls13_client.c
555
if (ctx->alert == 0)
lib/libssl/tls13_client.c
556
ctx->alert = TLS13_ALERT_DECODE_ERROR;
lib/libssl/tls13_client.c
56
if (!tls_key_share_client_generate(ctx->hs->key_share))
lib/libssl/tls13_client.c
562
tls13_server_certificate_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_client.c
566
SSL *s = ctx->ssl;
lib/libssl/tls13_client.c
586
if (!tlsext_client_parse(ctx->ssl, SSL_TLSEXT_MSG_CT,
lib/libssl/tls13_client.c
588
ctx->alert = alert_desc;
lib/libssl/tls13_client.c
606
ctx->alert = TLS13_ALERT_DECODE_ERROR;
lib/libssl/tls13_client.c
607
tls13_set_errorx(ctx, TLS13_ERR_NO_PEER_CERTIFICATE, 0,
lib/libssl/tls13_client.c
619
ctx->alert = ssl_verify_alarm_type(s->verify_result);
lib/libssl/tls13_client.c
620
tls13_set_errorx(ctx, TLS13_ERR_VERIFY_FAILED, 0,
lib/libssl/tls13_client.c
630
if (ctx->ocsp_status_recv_cb != NULL &&
lib/libssl/tls13_client.c
631
!ctx->ocsp_status_recv_cb(ctx))
lib/libssl/tls13_client.c
64
if ((ctx->hs->tls13.key_share = tls_key_share_new(groups[1])) ==
lib/libssl/tls13_client.c
644
tls13_server_certificate_verify_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_client.c
67
if (!tls_key_share_client_generate(ctx->hs->tls13.key_share))
lib/libssl/tls13_client.c
675
if (!CBB_add_bytes(&cbb, ctx->hs->tls13.transcript_hash,
lib/libssl/tls13_client.c
676
ctx->hs->tls13.transcript_hash_len))
lib/libssl/tls13_client.c
681
if ((cert = ctx->ssl->session->peer_cert) == NULL)
lib/libssl/tls13_client.c
685
if ((sigalg = ssl_sigalg_for_peer(ctx->ssl, pkey,
lib/libssl/tls13_client.c
688
ctx->hs->peer_sigalg = sigalg;
lib/libssl/tls13_client.c
705
ctx->alert = TLS13_ALERT_DECRYPT_ERROR;
lib/libssl/tls13_client.c
712
if (!ret && ctx->alert == 0)
lib/libssl/tls13_client.c
713
ctx->alert = TLS13_ALERT_DECODE_ERROR;
lib/libssl/tls13_client.c
722
tls13_server_finished_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_client.c
724
struct tls13_secrets *secrets = ctx->hs->tls13.secrets;
lib/libssl/tls13_client.c
740
finished_key.len = EVP_MD_size(ctx->hash);
lib/libssl/tls13_client.c
742
if (!tls13_hkdf_expand_label(&finished_key, ctx->hash,
lib/libssl/tls13_client.c
750
ctx->hash, NULL))
lib/libssl/tls13_client.c
752
if (!HMAC_Update(hmac_ctx, ctx->hs->tls13.transcript_hash,
lib/libssl/tls13_client.c
753
ctx->hs->tls13.transcript_hash_len))
lib/libssl/tls13_client.c
764
ctx->alert = TLS13_ALERT_DECRYPT_ERROR;
lib/libssl/tls13_client.c
768
if (!CBS_write_bytes(cbs, ctx->hs->peer_finished,
lib/libssl/tls13_client.c
769
sizeof(ctx->hs->peer_finished),
lib/libssl/tls13_client.c
770
&ctx->hs->peer_finished_len))
lib/libssl/tls13_client.c
779
if (!tls1_transcript_hash_value(ctx->ssl, transcript_hash,
lib/libssl/tls13_client.c
79
if (ctx->middlebox_compat &&
lib/libssl/tls13_client.c
793
if (!tls13_record_layer_set_read_traffic_key(ctx->rl,
lib/libssl/tls13_client.c
797
tls13_record_layer_allow_ccs(ctx->rl, 0);
lib/libssl/tls13_client.c
80
ctx->hs->our_max_tls_version >= TLS1_3_VERSION) {
lib/libssl/tls13_client.c
809
tls13_client_check_certificate(struct tls13_ctx *ctx, SSL_CERT_PKEY *cpk,
lib/libssl/tls13_client.c
81
arc4random_buf(ctx->hs->tls13.legacy_session_id,
lib/libssl/tls13_client.c
813
SSL *s = ctx->ssl;
lib/libssl/tls13_client.c
82
sizeof(ctx->hs->tls13.legacy_session_id));
lib/libssl/tls13_client.c
83
ctx->hs->tls13.legacy_session_id_len =
lib/libssl/tls13_client.c
832
tls13_client_select_certificate(struct tls13_ctx *ctx, SSL_CERT_PKEY **out_cpk,
lib/libssl/tls13_client.c
835
SSL *s = ctx->ssl;
lib/libssl/tls13_client.c
84
sizeof(ctx->hs->tls13.legacy_session_id);
lib/libssl/tls13_client.c
850
if (!tls13_client_check_certificate(ctx, cpk, &cert_ok, &sigalg))
lib/libssl/tls13_client.c
856
if (!tls13_client_check_certificate(ctx, cpk, &cert_ok, &sigalg))
lib/libssl/tls13_client.c
872
tls13_client_certificate_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_client.c
874
SSL *s = ctx->ssl;
lib/libssl/tls13_client.c
882
if (!tls13_client_select_certificate(ctx, &cpk, &sigalg))
lib/libssl/tls13_client.c
885
ctx->hs->tls13.cpk = cpk;
lib/libssl/tls13_client.c
886
ctx->hs->our_sigalg = sigalg;
lib/libssl/tls13_client.c
898
chain = s->ctx->extra_certs;
lib/libssl/tls13_client.c
900
if (!tls13_cert_add(ctx, &cert_list, cpk->x509, tlsext_client_build))
lib/libssl/tls13_client.c
905
if (!tls13_cert_add(ctx, &cert_list, cert, tlsext_client_build))
lib/libssl/tls13_client.c
909
ctx->handshake_stage.hs_type |= WITH_CCV;
lib/libssl/tls13_client.c
91
tls13_client_connect(struct tls13_ctx *ctx)
lib/libssl/tls13_client.c
921
tls13_client_certificate_verify_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_client.c
93
if (ctx->mode != TLS13_HS_CLIENT)
lib/libssl/tls13_client.c
935
if ((cpk = ctx->hs->tls13.cpk) == NULL)
lib/libssl/tls13_client.c
937
if ((sigalg = ctx->hs->our_sigalg) == NULL)
lib/libssl/tls13_client.c
951
if (!CBB_add_bytes(&sig_cbb, ctx->hs->tls13.transcript_hash,
lib/libssl/tls13_client.c
952
ctx->hs->tls13.transcript_hash_len))
lib/libssl/tls13_client.c
96
return tls13_handshake_perform(ctx);
lib/libssl/tls13_client.c
987
if (!ret && ctx->alert == 0)
lib/libssl/tls13_client.c
988
ctx->alert = TLS13_ALERT_INTERNAL_ERROR;
lib/libssl/tls13_client.c
999
tls13_client_end_of_early_data_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_handshake.c
300
tls13_handshake_active_state(struct tls13_ctx *ctx)
lib/libssl/tls13_handshake.c
302
struct tls13_handshake_stage hs = ctx->handshake_stage;
lib/libssl/tls13_handshake.c
313
tls13_handshake_active_action(struct tls13_ctx *ctx)
lib/libssl/tls13_handshake.c
315
enum tls13_message_type mt = tls13_handshake_active_state(ctx);
lib/libssl/tls13_handshake.c
324
tls13_handshake_advance_state_machine(struct tls13_ctx *ctx)
lib/libssl/tls13_handshake.c
326
if (++ctx->handshake_stage.message_number >= TLS13_NUM_MESSAGE_TYPES)
lib/libssl/tls13_handshake.c
333
tls13_handshake_end_of_flight(struct tls13_ctx *ctx,
lib/libssl/tls13_handshake.c
338
if ((current = tls13_handshake_active_action(ctx)) == NULL)
lib/libssl/tls13_handshake.c
34
int (*send)(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_handshake.c
345
tls13_handshake_msg_record(struct tls13_ctx *ctx)
lib/libssl/tls13_handshake.c
349
tls13_handshake_msg_data(ctx->hs_msg, &cbs);
lib/libssl/tls13_handshake.c
35
int (*sent)(struct tls13_ctx *ctx);
lib/libssl/tls13_handshake.c
350
return tls1_transcript_record(ctx->ssl, CBS_data(&cbs), CBS_len(&cbs));
lib/libssl/tls13_handshake.c
354
tls13_handshake_perform(struct tls13_ctx *ctx)
lib/libssl/tls13_handshake.c
36
int (*recv)(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_handshake.c
360
if (!ctx->handshake_started) {
lib/libssl/tls13_handshake.c
365
if (!tls13_handshake_set_legacy_state(ctx))
lib/libssl/tls13_handshake.c
367
if (!tls13_handshake_legacy_info_callback(ctx))
lib/libssl/tls13_handshake.c
370
ctx->handshake_started = 1;
lib/libssl/tls13_handshake.c
373
if (!tls13_handshake_set_legacy_state(ctx))
lib/libssl/tls13_handshake.c
378
if ((action = tls13_handshake_active_action(ctx)) == NULL)
lib/libssl/tls13_handshake.c
381
if (ctx->need_flush) {
lib/libssl/tls13_handshake.c
382
if ((ret = tls13_record_layer_flush(ctx->rl)) !=
lib/libssl/tls13_handshake.c
385
ctx->need_flush = 0;
lib/libssl/tls13_handshake.c
389
ctx->handshake_completed = 1;
lib/libssl/tls13_handshake.c
390
tls13_record_layer_handshake_completed(ctx->rl);
lib/libssl/tls13_handshake.c
392
if (!tls13_handshake_set_legacy_state(ctx))
lib/libssl/tls13_handshake.c
394
if (!tls13_handshake_legacy_info_callback(ctx))
lib/libssl/tls13_handshake.c
40
tls13_handshake_active_state(struct tls13_ctx *ctx);
lib/libssl/tls13_handshake.c
400
sending = action->sender == ctx->mode;
lib/libssl/tls13_handshake.c
402
DEBUGF("%s %s %s\n", tls13_handshake_mode_name(ctx->mode),
lib/libssl/tls13_handshake.c
406
if (ctx->alert != 0)
lib/libssl/tls13_handshake.c
407
return tls13_send_alert(ctx->rl, ctx->alert);
lib/libssl/tls13_handshake.c
410
ret = tls13_handshake_send_action(ctx, action);
lib/libssl/tls13_handshake.c
412
ret = tls13_handshake_recv_action(ctx, action);
lib/libssl/tls13_handshake.c
414
if (ctx->alert != 0)
lib/libssl/tls13_handshake.c
415
return tls13_send_alert(ctx->rl, ctx->alert);
lib/libssl/tls13_handshake.c
419
tls13_handshake_mode_name(ctx->mode),
lib/libssl/tls13_handshake.c
420
(action->sender == ctx->mode) ? "send" : "recv",
lib/libssl/tls13_handshake.c
425
if (!tls13_handshake_legacy_info_callback(ctx))
lib/libssl/tls13_handshake.c
428
if (!tls13_handshake_advance_state_machine(ctx))
lib/libssl/tls13_handshake.c
43
tls13_handshake_active_action(struct tls13_ctx *ctx);
lib/libssl/tls13_handshake.c
432
ctx->need_flush = tls13_handshake_end_of_flight(ctx,
lib/libssl/tls13_handshake.c
435
if (!tls13_handshake_set_legacy_state(ctx))
lib/libssl/tls13_handshake.c
44
static int tls13_handshake_advance_state_machine(struct tls13_ctx *ctx);
lib/libssl/tls13_handshake.c
441
tls13_handshake_send_action(struct tls13_ctx *ctx,
lib/libssl/tls13_handshake.c
447
if (ctx->send_dummy_ccs) {
lib/libssl/tls13_handshake.c
448
if ((ret = tls13_send_dummy_ccs(ctx->rl)) != TLS13_IO_SUCCESS)
lib/libssl/tls13_handshake.c
450
ctx->send_dummy_ccs = 0;
lib/libssl/tls13_handshake.c
451
if (ctx->send_dummy_ccs_after) {
lib/libssl/tls13_handshake.c
452
ctx->send_dummy_ccs_after = 0;
lib/libssl/tls13_handshake.c
458
if (ctx->hs_msg == NULL) {
lib/libssl/tls13_handshake.c
459
if ((ctx->hs_msg = tls13_handshake_msg_new()) == NULL)
lib/libssl/tls13_handshake.c
46
static int tls13_handshake_send_action(struct tls13_ctx *ctx,
lib/libssl/tls13_handshake.c
461
if (!tls13_handshake_msg_start(ctx->hs_msg, &cbb,
lib/libssl/tls13_handshake.c
464
if (!action->send(ctx, &cbb))
lib/libssl/tls13_handshake.c
466
if (!tls13_handshake_msg_finish(ctx->hs_msg))
lib/libssl/tls13_handshake.c
470
if ((ret = tls13_handshake_msg_send(ctx->hs_msg, ctx->rl)) <= 0)
lib/libssl/tls13_handshake.c
473
if (!tls13_handshake_msg_record(ctx))
lib/libssl/tls13_handshake.c
477
if (!tls1_transcript_hash_value(ctx->ssl,
lib/libssl/tls13_handshake.c
478
ctx->hs->tls13.transcript_hash,
lib/libssl/tls13_handshake.c
479
sizeof(ctx->hs->tls13.transcript_hash),
lib/libssl/tls13_handshake.c
48
static int tls13_handshake_recv_action(struct tls13_ctx *ctx,
lib/libssl/tls13_handshake.c
480
&ctx->hs->tls13.transcript_hash_len))
lib/libssl/tls13_handshake.c
484
if (ctx->handshake_message_sent_cb != NULL)
lib/libssl/tls13_handshake.c
485
ctx->handshake_message_sent_cb(ctx);
lib/libssl/tls13_handshake.c
487
tls13_handshake_msg_free(ctx->hs_msg);
lib/libssl/tls13_handshake.c
488
ctx->hs_msg = NULL;
lib/libssl/tls13_handshake.c
490
if (action->sent != NULL && !action->sent(ctx))
lib/libssl/tls13_handshake.c
493
if (ctx->send_dummy_ccs_after) {
lib/libssl/tls13_handshake.c
494
ctx->send_dummy_ccs = 1;
lib/libssl/tls13_handshake.c
495
if ((ret = tls13_send_dummy_ccs(ctx->rl)) != TLS13_IO_SUCCESS)
lib/libssl/tls13_handshake.c
497
ctx->send_dummy_ccs = 0;
lib/libssl/tls13_handshake.c
498
ctx->send_dummy_ccs_after = 0;
lib/libssl/tls13_handshake.c
505
tls13_handshake_recv_action(struct tls13_ctx *ctx,
lib/libssl/tls13_handshake.c
51
static int tls13_handshake_set_legacy_state(struct tls13_ctx *ctx);
lib/libssl/tls13_handshake.c
512
if (ctx->hs_msg == NULL) {
lib/libssl/tls13_handshake.c
513
if ((ctx->hs_msg = tls13_handshake_msg_new()) == NULL)
lib/libssl/tls13_handshake.c
517
if ((ret = tls13_handshake_msg_recv(ctx->hs_msg, ctx->rl)) <= 0)
lib/libssl/tls13_handshake.c
52
static int tls13_handshake_legacy_info_callback(struct tls13_ctx *ctx);
lib/libssl/tls13_handshake.c
521
if (!tls1_transcript_hash_value(ctx->ssl,
lib/libssl/tls13_handshake.c
522
ctx->hs->tls13.transcript_hash,
lib/libssl/tls13_handshake.c
523
sizeof(ctx->hs->tls13.transcript_hash),
lib/libssl/tls13_handshake.c
524
&ctx->hs->tls13.transcript_hash_len))
lib/libssl/tls13_handshake.c
528
if (!tls13_handshake_msg_record(ctx))
lib/libssl/tls13_handshake.c
531
if (ctx->handshake_message_recv_cb != NULL)
lib/libssl/tls13_handshake.c
532
ctx->handshake_message_recv_cb(ctx);
lib/libssl/tls13_handshake.c
539
msg_type = tls13_handshake_msg_type(ctx->hs_msg);
lib/libssl/tls13_handshake.c
543
return tls13_send_alert(ctx->rl, TLS13_ALERT_UNEXPECTED_MESSAGE);
lib/libssl/tls13_handshake.c
545
if (!tls13_handshake_msg_content(ctx->hs_msg, &cbs))
lib/libssl/tls13_handshake.c
549
if (!action->recv(ctx, &cbs))
lib/libssl/tls13_handshake.c
553
tls13_set_errorx(ctx, TLS13_ERR_TRAILING_DATA, 0,
lib/libssl/tls13_handshake.c
555
ctx->alert = TLS13_ALERT_DECODE_ERROR;
lib/libssl/tls13_handshake.c
560
if (ctx->ssl->method->version < TLS1_3_VERSION)
lib/libssl/tls13_handshake.c
564
tls13_handshake_msg_free(ctx->hs_msg);
lib/libssl/tls13_handshake.c
565
ctx->hs_msg = NULL;
lib/libssl/tls13_handshake.c
638
tls13_handshake_legacy_state(struct tls13_ctx *ctx, int *out_state)
lib/libssl/tls13_handshake.c
645
if (!ctx->handshake_started) {
lib/libssl/tls13_handshake.c
646
if (ctx->mode == TLS13_HS_CLIENT)
lib/libssl/tls13_handshake.c
654
if (ctx->handshake_completed) {
lib/libssl/tls13_handshake.c
659
if ((mt = tls13_handshake_active_state(ctx)) == INVALID)
lib/libssl/tls13_handshake.c
662
if ((action = tls13_handshake_active_action(ctx)) == NULL)
lib/libssl/tls13_handshake.c
665
if (action->sender == ctx->mode)
lib/libssl/tls13_handshake.c
674
tls13_handshake_info_position(struct tls13_ctx *ctx)
lib/libssl/tls13_handshake.c
676
if (!ctx->handshake_started)
lib/libssl/tls13_handshake.c
679
if (ctx->handshake_completed)
lib/libssl/tls13_handshake.c
682
if (ctx->mode == TLS13_HS_CLIENT)
lib/libssl/tls13_handshake.c
689
tls13_handshake_legacy_info_callback(struct tls13_ctx *ctx)
lib/libssl/tls13_handshake.c
693
if (!tls13_handshake_legacy_state(ctx, &state))
lib/libssl/tls13_handshake.c
700
if (ctx->info_cb != NULL) {
lib/libssl/tls13_handshake.c
701
where = tls13_handshake_info_position(ctx);
lib/libssl/tls13_handshake.c
702
ctx->info_cb(ctx, where, 1);
lib/libssl/tls13_handshake.c
709
tls13_handshake_set_legacy_state(struct tls13_ctx *ctx)
lib/libssl/tls13_handshake.c
713
if (!tls13_handshake_legacy_state(ctx, &state))
lib/libssl/tls13_handshake.c
720
ctx->hs->state = state;
lib/libssl/tls13_internal.h
312
void tls13_ctx_free(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
322
int tls13_quic_init(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
327
int tls13_use_legacy_client(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
328
int tls13_use_legacy_server(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
339
int tls13_legacy_servername_process(struct tls13_ctx *ctx, uint8_t *alert);
lib/libssl/tls13_internal.h
369
int tls13_handshake_msg_record(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
370
int tls13_handshake_perform(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
372
int tls13_client_init(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
373
int tls13_server_init(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
374
int tls13_client_connect(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
375
int tls13_server_accept(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
377
int tls13_client_hello_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
378
int tls13_client_hello_sent(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
379
int tls13_client_hello_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
380
int tls13_client_hello_retry_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
381
int tls13_client_hello_retry_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
382
int tls13_client_end_of_early_data_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
383
int tls13_client_end_of_early_data_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
384
int tls13_client_certificate_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
385
int tls13_client_certificate_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
386
int tls13_client_certificate_verify_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
387
int tls13_client_certificate_verify_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
388
int tls13_client_finished_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
389
int tls13_client_finished_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
390
int tls13_client_finished_sent(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
391
int tls13_server_hello_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
392
int tls13_server_hello_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
393
int tls13_server_hello_sent(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
394
int tls13_server_hello_retry_request_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
395
int tls13_server_hello_retry_request_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
396
int tls13_server_hello_retry_request_sent(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
397
int tls13_server_encrypted_extensions_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
398
int tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
399
int tls13_server_certificate_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
400
int tls13_server_certificate_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
401
int tls13_server_certificate_request_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
402
int tls13_server_certificate_request_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
403
int tls13_server_certificate_verify_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
404
int tls13_server_certificate_verify_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
405
int tls13_server_finished_recv(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
406
int tls13_server_finished_send(struct tls13_ctx *ctx, CBB *cbb);
lib/libssl/tls13_internal.h
407
int tls13_server_finished_sent(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
410
int tls13_cert_add(struct tls13_ctx *ctx, CBB *cbb, X509 *cert,
lib/libssl/tls13_internal.h
413
int tls13_synthetic_handshake_message(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
414
int tls13_clienthello_hash_init(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
416
int tls13_clienthello_hash_update_bytes(struct tls13_ctx *ctx, void *data,
lib/libssl/tls13_internal.h
418
int tls13_clienthello_hash_update(struct tls13_ctx *ctx, CBS *cbs);
lib/libssl/tls13_internal.h
419
int tls13_clienthello_hash_finalize(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
420
int tls13_clienthello_hash_validate(struct tls13_ctx *ctx);
lib/libssl/tls13_internal.h
427
#define tls13_set_error(ctx, code, subcode, fmt, ...) \
lib/libssl/tls13_internal.h
428
tls13_error_set(&(ctx)->error, (code), (subcode), OPENSSL_FILE, OPENSSL_LINE, \
lib/libssl/tls13_internal.h
430
#define tls13_set_errorx(ctx, code, subcode, fmt, ...) \
lib/libssl/tls13_internal.h
431
tls13_error_setx(&(ctx)->error, (code), (subcode), OPENSSL_FILE, OPENSSL_LINE, \
lib/libssl/tls13_internal.h
434
int tls13_exporter(struct tls13_ctx *ctx, const uint8_t *label, size_t label_len,
lib/libssl/tls13_key_schedule.c
391
tls13_exporter(struct tls13_ctx *ctx, const uint8_t *label, size_t label_len,
lib/libssl/tls13_key_schedule.c
396
struct tls13_secrets *secrets = ctx->hs->tls13.secrets;
lib/libssl/tls13_key_schedule.c
412
if (!ctx->handshake_completed)
lib/libssl/tls13_legacy.c
118
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_legacy.c
120
return tls13_legacy_wire_flush(ctx->ssl);
lib/libssl/tls13_legacy.c
126
struct tls13_ctx *ctx = ssl->tls13;
lib/libssl/tls13_legacy.c
133
switch (ctx->error.code) {
lib/libssl/tls13_legacy.c
158
ERR_put_error(ERR_LIB_SSL, (0xfff), reason, ctx->error.file,
lib/libssl/tls13_legacy.c
159
ctx->error.line);
lib/libssl/tls13_legacy.c
210
struct tls13_ctx *ctx = ssl->tls13;
lib/libssl/tls13_legacy.c
213
if (ctx == NULL)
lib/libssl/tls13_legacy.c
216
ret = tls13_pending_application_data(ctx->rl);
lib/libssl/tls13_legacy.c
226
struct tls13_ctx *ctx = ssl->tls13;
lib/libssl/tls13_legacy.c
229
if (ctx == NULL || !ctx->handshake_completed) {
lib/libssl/tls13_legacy.c
237
tls13_record_layer_set_retry_after_phh(ctx->rl,
lib/libssl/tls13_legacy.c
238
(ctx->ssl->mode & SSL_MODE_AUTO_RETRY) != 0);
lib/libssl/tls13_legacy.c
250
ret = tls13_peek_application_data(ctx->rl, buf, len);
lib/libssl/tls13_legacy.c
252
ret = tls13_read_application_data(ctx->rl, buf, len);
lib/libssl/tls13_legacy.c
260
struct tls13_ctx *ctx = ssl->tls13;
lib/libssl/tls13_legacy.c
265
if (ctx == NULL || !ctx->handshake_completed) {
lib/libssl/tls13_legacy.c
287
ret = tls13_write_application_data(ctx->rl, buf, len);
lib/libssl/tls13_legacy.c
306
if ((ret = tls13_write_application_data(ctx->rl,
lib/libssl/tls13_legacy.c
317
tls13_use_legacy_stack(struct tls13_ctx *ctx)
lib/libssl/tls13_legacy.c
319
SSL *s = ctx->ssl;
lib/libssl/tls13_legacy.c
333
tls13_record_layer_rcontent(ctx->rl, &cbs);
lib/libssl/tls13_legacy.c
359
tls13_handshake_msg_data(ctx->hs_msg, &cbs);
lib/libssl/tls13_legacy.c
367
s->s3->hs.tls12.message_type = tls13_handshake_msg_type(ctx->hs_msg);
lib/libssl/tls13_legacy.c
385
tls13_use_legacy_client(struct tls13_ctx *ctx)
lib/libssl/tls13_legacy.c
387
SSL *s = ctx->ssl;
lib/libssl/tls13_legacy.c
389
if (!tls13_use_legacy_stack(ctx))
lib/libssl/tls13_legacy.c
399
tls13_use_legacy_server(struct tls13_ctx *ctx)
lib/libssl/tls13_legacy.c
401
SSL *s = ctx->ssl;
lib/libssl/tls13_legacy.c
403
if (!tls13_use_legacy_stack(ctx))
lib/libssl/tls13_legacy.c
416
struct tls13_ctx *ctx = ssl->tls13;
lib/libssl/tls13_legacy.c
419
if (ctx == NULL) {
lib/libssl/tls13_legacy.c
420
if ((ctx = tls13_ctx_new(TLS13_HS_SERVER, ssl)) == NULL) {
lib/libssl/tls13_legacy.c
424
if (!tls13_server_init(ctx)) {
lib/libssl/tls13_legacy.c
433
ret = tls13_server_accept(ctx);
lib/libssl/tls13_legacy.c
439
if (ctx->info_cb != NULL)
lib/libssl/tls13_legacy.c
440
ctx->info_cb(ctx, TLS13_INFO_ACCEPT_EXIT, ret);
lib/libssl/tls13_legacy.c
448
struct tls13_ctx *ctx = ssl->tls13;
lib/libssl/tls13_legacy.c
451
if (ctx == NULL) {
lib/libssl/tls13_legacy.c
452
if ((ctx = tls13_ctx_new(TLS13_HS_CLIENT, ssl)) == NULL) {
lib/libssl/tls13_legacy.c
456
if (!tls13_client_init(ctx)) {
lib/libssl/tls13_legacy.c
465
ret = tls13_client_connect(ctx);
lib/libssl/tls13_legacy.c
471
if (ctx->info_cb != NULL)
lib/libssl/tls13_legacy.c
472
ctx->info_cb(ctx, TLS13_INFO_CONNECT_EXIT, ret);
lib/libssl/tls13_legacy.c
480
struct tls13_ctx *ctx = ssl->tls13;
lib/libssl/tls13_legacy.c
491
if (ctx == NULL || ssl->quiet_shutdown) {
lib/libssl/tls13_legacy.c
498
ret = tls13_send_alert(ctx->rl, TLS13_ALERT_CLOSE_NOTIFY);
lib/libssl/tls13_legacy.c
506
ret = tls13_record_layer_send_pending(ctx->rl);
lib/libssl/tls13_legacy.c
520
if (tls13_pending_application_data(ctx->rl) == 0) {
lib/libssl/tls13_legacy.c
521
(void)tls13_read_application_data(ctx->rl, buf, sizeof(buf));
lib/libssl/tls13_legacy.c
522
if (!ctx->close_notify_recv)
lib/libssl/tls13_legacy.c
535
tls13_legacy_servername_process(struct tls13_ctx *ctx, uint8_t *alert)
lib/libssl/tls13_legacy.c
539
SSL_CTX *ssl_ctx = ctx->ssl->ctx;
lib/libssl/tls13_legacy.c
540
SSL *s = ctx->ssl;
lib/libssl/tls13_legacy.c
57
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_legacy.c
59
return tls13_legacy_wire_read(ctx->ssl, buf, n);
lib/libssl/tls13_legacy.c
94
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_legacy.c
96
return tls13_legacy_wire_write(ctx->ssl, buf, n);
lib/libssl/tls13_lib.c
118
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_lib.c
119
SSL *s = ctx->ssl;
lib/libssl/tls13_lib.c
144
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_lib.c
146
if (ctx->alert_recv_cb != NULL)
lib/libssl/tls13_lib.c
147
ctx->alert_recv_cb(alert_level, alert_desc, arg);
lib/libssl/tls13_lib.c
150
ctx->close_notify_recv = 1;
lib/libssl/tls13_lib.c
151
ctx->ssl->shutdown |= SSL_RECEIVED_SHUTDOWN;
lib/libssl/tls13_lib.c
152
ctx->ssl->s3->warn_alert = alert_desc;
lib/libssl/tls13_lib.c
165
ctx->ssl->s3->fatal_alert = alert_desc;
lib/libssl/tls13_lib.c
167
SSLerror(ctx->ssl, SSL_AD_REASON_OFFSET + alert_desc);
lib/libssl/tls13_lib.c
170
SSL_CTX_remove_session(ctx->ssl->ctx, ctx->ssl->session);
lib/libssl/tls13_lib.c
176
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_lib.c
178
if (ctx->alert_sent_cb != NULL)
lib/libssl/tls13_lib.c
179
ctx->alert_sent_cb(alert_level, alert_desc, arg);
lib/libssl/tls13_lib.c
182
ctx->close_notify_sent = 1;
lib/libssl/tls13_lib.c
191
if (ctx->error.code == 0)
lib/libssl/tls13_lib.c
192
SSLerror(ctx->ssl, SSL_AD_REASON_OFFSET + alert_desc);
lib/libssl/tls13_lib.c
198
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_lib.c
199
SSL *s = ctx->ssl;
lib/libssl/tls13_lib.c
205
tls13_handshake_msg_data(ctx->hs_msg, &cbs);
lib/libssl/tls13_lib.c
212
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_lib.c
213
SSL *s = ctx->ssl;
lib/libssl/tls13_lib.c
219
tls13_handshake_msg_data(ctx->hs_msg, &cbs);
lib/libssl/tls13_lib.c
226
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_lib.c
227
SSL *s = ctx->ssl;
lib/libssl/tls13_lib.c
235
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_lib.c
236
SSL *s = ctx->ssl;
lib/libssl/tls13_lib.c
239
if (s->ctx->tlsext_status_cb == NULL)
lib/libssl/tls13_lib.c
242
ret = s->ctx->tlsext_status_cb(s,
lib/libssl/tls13_lib.c
243
s->ctx->tlsext_status_arg);
lib/libssl/tls13_lib.c
245
ctx->alert = TLS13_ALERT_INTERNAL_ERROR;
lib/libssl/tls13_lib.c
250
ctx->alert = TLS13_ALERT_BAD_CERTIFICATE_STATUS_RESPONSE;
lib/libssl/tls13_lib.c
259
tls13_phh_update_read_traffic_secret(struct tls13_ctx *ctx)
lib/libssl/tls13_lib.c
261
struct tls13_secrets *secrets = ctx->hs->tls13.secrets;
lib/libssl/tls13_lib.c
264
if (ctx->mode == TLS13_HS_CLIENT) {
lib/libssl/tls13_lib.c
274
return tls13_record_layer_set_read_traffic_key(ctx->rl,
lib/libssl/tls13_lib.c
279
tls13_phh_update_write_traffic_secret(struct tls13_ctx *ctx)
lib/libssl/tls13_lib.c
281
struct tls13_secrets *secrets = ctx->hs->tls13.secrets;
lib/libssl/tls13_lib.c
284
if (ctx->mode == TLS13_HS_CLIENT) {
lib/libssl/tls13_lib.c
294
return tls13_record_layer_set_write_traffic_key(ctx->rl,
lib/libssl/tls13_lib.c
304
tls13_phh_limit_check(struct tls13_ctx *ctx)
lib/libssl/tls13_lib.c
308
if (ctx->phh_last_seen > now - TLS13_PHH_LIMIT_TIME) {
lib/libssl/tls13_lib.c
309
if (ctx->phh_count > TLS13_PHH_LIMIT)
lib/libssl/tls13_lib.c
312
ctx->phh_count = 0;
lib/libssl/tls13_lib.c
313
ctx->phh_count++;
lib/libssl/tls13_lib.c
314
ctx->phh_last_seen = now;
lib/libssl/tls13_lib.c
319
tls13_key_update_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_lib.c
341
if (!tls13_phh_update_read_traffic_secret(ctx))
lib/libssl/tls13_lib.c
357
ctx->key_update_request = 1;
lib/libssl/tls13_lib.c
359
ret = tls13_record_layer_phh(ctx->rl, &cbs_hs);
lib/libssl/tls13_lib.c
369
return tls13_send_alert(ctx->rl, alert);
lib/libssl/tls13_lib.c
374
tls13_new_session_ticket_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_lib.c
376
struct tls13_secrets *secrets = ctx->hs->tls13.secrets;
lib/libssl/tls13_lib.c
386
if (ctx->mode != TLS13_HS_CLIENT) {
lib/libssl/tls13_lib.c
402
if (!tlsext_client_parse(ctx->ssl, SSL_TLSEXT_MSG_NST, cbs, &alert))
lib/libssl/tls13_lib.c
426
if ((sess = ssl_session_dup(ctx->ssl->session, 0)) == NULL)
lib/libssl/tls13_lib.c
454
SSL_SESSION_free(ctx->ssl->session);
lib/libssl/tls13_lib.c
455
ctx->ssl->session = sess;
lib/libssl/tls13_lib.c
458
ssl_update_cache(ctx->ssl, SSL_SESS_CACHE_CLIENT);
lib/libssl/tls13_lib.c
464
ret = tls13_send_alert(ctx->rl, alert);
lib/libssl/tls13_lib.c
477
struct tls13_ctx *ctx = cb_arg;
lib/libssl/tls13_lib.c
480
if (!tls13_phh_limit_check(ctx))
lib/libssl/tls13_lib.c
481
return tls13_send_alert(ctx->rl, TLS13_ALERT_UNEXPECTED_MESSAGE);
lib/libssl/tls13_lib.c
483
if ((ctx->hs_msg == NULL) &&
lib/libssl/tls13_lib.c
484
((ctx->hs_msg = tls13_handshake_msg_new()) == NULL))
lib/libssl/tls13_lib.c
487
if ((ret = tls13_handshake_msg_recv(ctx->hs_msg, ctx->rl)) !=
lib/libssl/tls13_lib.c
491
if (!tls13_handshake_msg_content(ctx->hs_msg, &cbs))
lib/libssl/tls13_lib.c
494
switch(tls13_handshake_msg_type(ctx->hs_msg)) {
lib/libssl/tls13_lib.c
496
ret = tls13_key_update_recv(ctx, &cbs);
lib/libssl/tls13_lib.c
499
ret = tls13_new_session_ticket_recv(ctx, &cbs);
lib/libssl/tls13_lib.c
509
tls13_handshake_msg_free(ctx->hs_msg);
lib/libssl/tls13_lib.c
510
ctx->hs_msg = NULL;
lib/libssl/tls13_lib.c
517
struct tls13_ctx *ctx = cb_arg;
lib/libssl/tls13_lib.c
519
if (ctx->key_update_request) {
lib/libssl/tls13_lib.c
520
tls13_phh_update_write_traffic_secret(ctx);
lib/libssl/tls13_lib.c
521
ctx->key_update_request = 0;
lib/libssl/tls13_lib.c
539
struct tls13_ctx *ctx = NULL;
lib/libssl/tls13_lib.c
541
if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
lib/libssl/tls13_lib.c
544
ctx->hs = &ssl->s3->hs;
lib/libssl/tls13_lib.c
545
ctx->mode = mode;
lib/libssl/tls13_lib.c
546
ctx->ssl = ssl;
lib/libssl/tls13_lib.c
548
if ((ctx->rl = tls13_record_layer_new(&tls13_rl_callbacks, ctx)) == NULL)
lib/libssl/tls13_lib.c
551
ctx->alert_sent_cb = tls13_legacy_alert_sent_cb;
lib/libssl/tls13_lib.c
552
ctx->alert_recv_cb = tls13_legacy_alert_recv_cb;
lib/libssl/tls13_lib.c
553
ctx->handshake_message_sent_cb = tls13_legacy_handshake_message_sent_cb;
lib/libssl/tls13_lib.c
554
ctx->handshake_message_recv_cb = tls13_legacy_handshake_message_recv_cb;
lib/libssl/tls13_lib.c
555
ctx->info_cb = tls13_legacy_info_cb;
lib/libssl/tls13_lib.c
556
ctx->ocsp_status_recv_cb = tls13_legacy_ocsp_status_recv_cb;
lib/libssl/tls13_lib.c
558
ctx->middlebox_compat = 1;
lib/libssl/tls13_lib.c
560
ssl->tls13 = ctx;
lib/libssl/tls13_lib.c
563
if (!tls13_quic_init(ctx))
lib/libssl/tls13_lib.c
567
return ctx;
lib/libssl/tls13_lib.c
570
tls13_ctx_free(ctx);
lib/libssl/tls13_lib.c
576
tls13_ctx_free(struct tls13_ctx *ctx)
lib/libssl/tls13_lib.c
578
if (ctx == NULL)
lib/libssl/tls13_lib.c
581
tls13_error_clear(&ctx->error);
lib/libssl/tls13_lib.c
582
tls13_record_layer_free(ctx->rl);
lib/libssl/tls13_lib.c
583
tls13_handshake_msg_free(ctx->hs_msg);
lib/libssl/tls13_lib.c
585
freezero(ctx, sizeof(struct tls13_ctx));
lib/libssl/tls13_lib.c
589
tls13_cert_add(struct tls13_ctx *ctx, CBB *cbb, X509 *cert,
lib/libssl/tls13_lib.c
606
if (!build_extensions(ctx->ssl, SSL_TLSEXT_MSG_CT, cbb))
lib/libssl/tls13_lib.c
619
tls13_synthetic_handshake_message(struct tls13_ctx *ctx)
lib/libssl/tls13_lib.c
626
SSL *s = ctx->ssl;
lib/libssl/tls13_lib.c
649
tls1_transcript_reset(ctx->ssl);
lib/libssl/tls13_lib.c
650
if (!tls1_transcript_record(ctx->ssl, CBS_data(&cbs), CBS_len(&cbs)))
lib/libssl/tls13_lib.c
662
tls13_clienthello_hash_init(struct tls13_ctx *ctx)
lib/libssl/tls13_lib.c
664
if (ctx->hs->tls13.clienthello_md_ctx != NULL)
lib/libssl/tls13_lib.c
666
if ((ctx->hs->tls13.clienthello_md_ctx = EVP_MD_CTX_new()) == NULL)
lib/libssl/tls13_lib.c
668
if (!EVP_DigestInit_ex(ctx->hs->tls13.clienthello_md_ctx,
lib/libssl/tls13_lib.c
672
if ((ctx->hs->tls13.clienthello_hash == NULL) &&
lib/libssl/tls13_lib.c
673
(ctx->hs->tls13.clienthello_hash = calloc(1, EVP_MAX_MD_SIZE)) ==
lib/libssl/tls13_lib.c
690
tls13_clienthello_hash_update_bytes(struct tls13_ctx *ctx, void *data,
lib/libssl/tls13_lib.c
693
return EVP_DigestUpdate(ctx->hs->tls13.clienthello_md_ctx, data, len);
lib/libssl/tls13_lib.c
697
tls13_clienthello_hash_update(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_lib.c
699
return tls13_clienthello_hash_update_bytes(ctx, (void *)CBS_data(cbs),
lib/libssl/tls13_lib.c
704
tls13_clienthello_hash_finalize(struct tls13_ctx *ctx)
lib/libssl/tls13_lib.c
706
if (!EVP_DigestFinal_ex(ctx->hs->tls13.clienthello_md_ctx,
lib/libssl/tls13_lib.c
707
ctx->hs->tls13.clienthello_hash,
lib/libssl/tls13_lib.c
708
&ctx->hs->tls13.clienthello_hash_len))
lib/libssl/tls13_lib.c
710
EVP_MD_CTX_free(ctx->hs->tls13.clienthello_md_ctx);
lib/libssl/tls13_lib.c
711
ctx->hs->tls13.clienthello_md_ctx = NULL;
lib/libssl/tls13_lib.c
716
tls13_clienthello_hash_validate(struct tls13_ctx *ctx)
lib/libssl/tls13_lib.c
721
if (ctx->hs->tls13.clienthello_hash == NULL)
lib/libssl/tls13_lib.c
724
if (!EVP_DigestFinal_ex(ctx->hs->tls13.clienthello_md_ctx,
lib/libssl/tls13_lib.c
727
EVP_MD_CTX_free(ctx->hs->tls13.clienthello_md_ctx);
lib/libssl/tls13_lib.c
728
ctx->hs->tls13.clienthello_md_ctx = NULL;
lib/libssl/tls13_lib.c
730
if (ctx->hs->tls13.clienthello_hash_len != new_ch_hash_len)
lib/libssl/tls13_lib.c
732
if (memcmp(ctx->hs->tls13.clienthello_hash, new_ch_hash,
lib/libssl/tls13_quic.c
109
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_quic.c
110
SSL *ssl = ctx->ssl;
lib/libssl/tls13_quic.c
112
ctx->hs->tls13.quic_write_level = write_level;
lib/libssl/tls13_quic.c
118
ctx->hs->tls13.quic_write_level, ctx->hs->cipher,
lib/libssl/tls13_quic.c
123
ctx->hs->tls13.quic_write_level, NULL, write_key->data,
lib/libssl/tls13_quic.c
132
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_quic.c
133
SSL *ssl = ctx->ssl;
lib/libssl/tls13_quic.c
137
if (!ssl->quic_method->send_alert(ssl, ctx->hs->tls13.quic_write_level,
lib/libssl/tls13_quic.c
149
tls13_record_layer_alert_sent(ctx->rl, alert_level, alert_desc);
lib/libssl/tls13_quic.c
172
tls13_quic_init(struct tls13_ctx *ctx)
lib/libssl/tls13_quic.c
176
tls13_record_layer_set_callbacks(ctx->rl, &quic_rl_callbacks, ctx);
lib/libssl/tls13_quic.c
178
ctx->middlebox_compat = 0;
lib/libssl/tls13_quic.c
187
SSL_set_bio(ctx->ssl, bio, bio);
lib/libssl/tls13_quic.c
24
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_quic.c
25
SSL *ssl = ctx->ssl;
lib/libssl/tls13_quic.c
34
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_quic.c
35
SSL *ssl = ctx->ssl;
lib/libssl/tls13_quic.c
44
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_quic.c
45
SSL *ssl = ctx->ssl;
lib/libssl/tls13_quic.c
58
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_quic.c
60
if (ctx->hs->tls13.quic_read_buffer == NULL)
lib/libssl/tls13_quic.c
63
return tls_buffer_read(ctx->hs->tls13.quic_read_buffer, buf, n);
lib/libssl/tls13_quic.c
69
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_quic.c
70
SSL *ssl = ctx->ssl;
lib/libssl/tls13_quic.c
73
ctx->hs->tls13.quic_write_level, buf, n)) {
lib/libssl/tls13_quic.c
85
struct tls13_ctx *ctx = arg;
lib/libssl/tls13_quic.c
86
SSL *ssl = ctx->ssl;
lib/libssl/tls13_quic.c
88
ctx->hs->tls13.quic_read_level = read_level;
lib/libssl/tls13_quic.c
94
ctx->hs->tls13.quic_read_level, ctx->hs->cipher,
lib/libssl/tls13_quic.c
99
ctx->hs->tls13.quic_read_level, read_key->data, NULL,
lib/libssl/tls13_server.c
100
tls13_client_hello_required_extensions(struct tls13_ctx *ctx)
lib/libssl/tls13_server.c
1003
if (!ret && ctx->alert == 0)
lib/libssl/tls13_server.c
1004
ctx->alert = TLS13_ALERT_DECODE_ERROR;
lib/libssl/tls13_server.c
1014
tls13_client_end_of_early_data_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_server.c
102
SSL *s = ctx->ssl;
lib/libssl/tls13_server.c
1020
tls13_client_finished_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_server.c
1022
struct tls13_secrets *secrets = ctx->hs->tls13.secrets;
lib/libssl/tls13_server.c
1036
finished_key.len = EVP_MD_size(ctx->hash);
lib/libssl/tls13_server.c
1038
if (!tls13_hkdf_expand_label(&finished_key, ctx->hash,
lib/libssl/tls13_server.c
1046
ctx->hash, NULL))
lib/libssl/tls13_server.c
1048
if (!HMAC_Update(hmac_ctx, ctx->hs->tls13.transcript_hash,
lib/libssl/tls13_server.c
1049
ctx->hs->tls13.transcript_hash_len))
lib/libssl/tls13_server.c
1060
ctx->alert = TLS13_ALERT_DECRYPT_ERROR;
lib/libssl/tls13_server.c
1064
if (!CBS_write_bytes(cbs, ctx->hs->peer_finished,
lib/libssl/tls13_server.c
1065
sizeof(ctx->hs->peer_finished),
lib/libssl/tls13_server.c
1066
&ctx->hs->peer_finished_len))
lib/libssl/tls13_server.c
1076
if (!tls13_record_layer_set_read_traffic_key(ctx->rl,
lib/libssl/tls13_server.c
1080
tls13_record_layer_allow_ccs(ctx->rl, 0);
lib/libssl/tls13_server.c
145
tls13_client_hello_process(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_server.c
152
SSL *s = ctx->ssl;
lib/libssl/tls13_server.c
169
return tls13_use_legacy_server(ctx);
lib/libssl/tls13_server.c
171
ctx->hs->negotiated_tls_version = TLS1_3_VERSION;
lib/libssl/tls13_server.c
172
ctx->hs->peer_legacy_version = legacy_version;
lib/libssl/tls13_server.c
175
tls13_record_layer_set_legacy_version(ctx->rl, TLS1_2_VERSION);
lib/libssl/tls13_server.c
181
if (!ctx->middlebox_compat && CBS_len(&session_id) != 0) {
lib/libssl/tls13_server.c
182
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_server.c
187
if (!tls13_clienthello_hash_init(ctx)) {
lib/libssl/tls13_server.c
188
ctx->alert = TLS13_ALERT_INTERNAL_ERROR;
lib/libssl/tls13_server.c
191
if (!tls13_clienthello_hash_update_bytes(ctx, (void *)&legacy_version,
lib/libssl/tls13_server.c
193
ctx->alert = TLS13_ALERT_INTERNAL_ERROR;
lib/libssl/tls13_server.c
196
if (!tls13_clienthello_hash_update(ctx, &client_random)) {
lib/libssl/tls13_server.c
197
ctx->alert = TLS13_ALERT_INTERNAL_ERROR;
lib/libssl/tls13_server.c
200
if (!tls13_clienthello_hash_update(ctx, &session_id)) {
lib/libssl/tls13_server.c
201
ctx->alert = TLS13_ALERT_INTERNAL_ERROR;
lib/libssl/tls13_server.c
204
if (!tls13_clienthello_hash_update(ctx, &cipher_suites)) {
lib/libssl/tls13_server.c
205
ctx->alert = TLS13_ALERT_INTERNAL_ERROR;
lib/libssl/tls13_server.c
208
if (!tls13_clienthello_hash_update(ctx, &compression_methods)) {
lib/libssl/tls13_server.c
209
ctx->alert = TLS13_ALERT_INTERNAL_ERROR;
lib/libssl/tls13_server.c
214
ctx->alert = alert_desc;
lib/libssl/tls13_server.c
219
if (!ctx->hs->tls13.hrr) {
lib/libssl/tls13_server.c
220
if (!tls13_clienthello_hash_finalize(ctx)) {
lib/libssl/tls13_server.c
221
ctx->alert = TLS13_ALERT_INTERNAL_ERROR;
lib/libssl/tls13_server.c
225
if (!tls13_clienthello_hash_validate(ctx)) {
lib/libssl/tls13_server.c
226
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_server.c
229
tls13_clienthello_hash_clear(&ctx->hs->tls13);
lib/libssl/tls13_server.c
232
if (!tls13_client_hello_required_extensions(ctx)) {
lib/libssl/tls13_server.c
233
ctx->alert = TLS13_ALERT_MISSING_EXTENSION;
lib/libssl/tls13_server.c
242
ctx->alert = TLS13_ALERT_PROTOCOL_VERSION;
lib/libssl/tls13_server.c
253
CBS_len(&session_id) != sizeof(ctx->hs->tls13.legacy_session_id)) {
lib/libssl/tls13_server.c
254
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_server.c
257
if (!CBS_write_bytes(&session_id, ctx->hs->tls13.legacy_session_id,
lib/libssl/tls13_server.c
258
sizeof(ctx->hs->tls13.legacy_session_id),
lib/libssl/tls13_server.c
259
&ctx->hs->tls13.legacy_session_id_len)) {
lib/libssl/tls13_server.c
260
ctx->alert = TLS13_ALERT_INTERNAL_ERROR;
lib/libssl/tls13_server.c
266
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_server.c
271
tls13_set_errorx(ctx, TLS13_ERR_NO_SHARED_CIPHER, 0,
lib/libssl/tls13_server.c
273
ctx->alert = TLS13_ALERT_HANDSHAKE_FAILURE;
lib/libssl/tls13_server.c
276
ctx->hs->cipher = cipher;
lib/libssl/tls13_server.c
28
tls13_server_init(struct tls13_ctx *ctx)
lib/libssl/tls13_server.c
285
ctx->alert = TLS13_ALERT_ILLEGAL_PARAMETER;
lib/libssl/tls13_server.c
298
tls13_client_hello_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_server.c
30
SSL *s = ctx->ssl;
lib/libssl/tls13_server.c
300
SSL *s = ctx->ssl;
lib/libssl/tls13_server.c
302
if (!tls13_client_hello_process(ctx, cbs))
lib/libssl/tls13_server.c
318
if (ctx->hs->key_share != NULL)
lib/libssl/tls13_server.c
319
ctx->handshake_stage.hs_type |= NEGOTIATED | WITHOUT_HRR;
lib/libssl/tls13_server.c
32
if (!ssl_supported_tls_version_range(s, &ctx->hs->our_min_tls_version,
lib/libssl/tls13_server.c
321
tls13_record_layer_allow_ccs(ctx->rl, 1);
lib/libssl/tls13_server.c
33
&ctx->hs->our_max_tls_version)) {
lib/libssl/tls13_server.c
330
tls13_server_hello_build(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_server.c
335
SSL *s = ctx->ssl;
lib/libssl/tls13_server.c
338
cipher = SSL_CIPHER_get_value(ctx->hs->cipher);
lib/libssl/tls13_server.c
341
if (ctx->hs->tls13.hrr) {
lib/libssl/tls13_server.c
352
if (!CBB_add_bytes(&session_id, ctx->hs->tls13.legacy_session_id,
lib/libssl/tls13_server.c
353
ctx->hs->tls13.legacy_session_id_len))
lib/libssl/tls13_server.c
37
s->version = ctx->hs->our_max_tls_version;
lib/libssl/tls13_server.c
371
tls13_server_engage_record_protection(struct tls13_ctx *ctx)
lib/libssl/tls13_server.c
379
SSL *s = ctx->ssl;
lib/libssl/tls13_server.c
382
if (!tls_key_share_derive(ctx->hs->key_share, &shared_key,
lib/libssl/tls13_server.c
386
s->session->cipher_value = ctx->hs->cipher->value;
lib/libssl/tls13_server.c
388
if ((ctx->aead = tls13_cipher_aead(ctx->hs->cipher)) == NULL)
lib/libssl/tls13_server.c
39
tls13_record_layer_set_retry_after_phh(ctx->rl,
lib/libssl/tls13_server.c
390
if ((ctx->hash = tls13_cipher_hash(ctx->hs->cipher)) == NULL)
lib/libssl/tls13_server.c
393
if ((secrets = tls13_secrets_create(ctx->hash, 0)) == NULL)
lib/libssl/tls13_server.c
395
ctx->hs->tls13.secrets = secrets;
lib/libssl/tls13_server.c
412
if (!tls13_derive_handshake_secrets(ctx->hs->tls13.secrets, shared_key,
lib/libssl/tls13_server.c
416
tls13_record_layer_set_aead(ctx->rl, ctx->aead);
lib/libssl/tls13_server.c
417
tls13_record_layer_set_hash(ctx->rl, ctx->hash);
lib/libssl/tls13_server.c
419
if (!tls13_record_layer_set_read_traffic_key(ctx->rl,
lib/libssl/tls13_server.c
422
if (!tls13_record_layer_set_write_traffic_key(ctx->rl,
lib/libssl/tls13_server.c
426
ctx->handshake_stage.hs_type |= NEGOTIATED;
lib/libssl/tls13_server.c
428
ctx->handshake_stage.hs_type |= WITHOUT_CR;
lib/libssl/tls13_server.c
438
tls13_server_hello_retry_request_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_server.c
440
ctx->hs->tls13.hrr = 1;
lib/libssl/tls13_server.c
442
if (!tls13_synthetic_handshake_message(ctx))
lib/libssl/tls13_server.c
445
if (ctx->hs->key_share != NULL)
lib/libssl/tls13_server.c
447
if (ctx->hs->tls13.server_group == 0)
lib/libssl/tls13_server.c
45
tls13_record_layer_set_legacy_version(ctx->rl, TLS1_VERSION);
lib/libssl/tls13_server.c
450
if (!tls13_server_hello_build(ctx, cbb))
lib/libssl/tls13_server.c
457
tls13_server_hello_retry_request_sent(struct tls13_ctx *ctx)
lib/libssl/tls13_server.c
464
if (ctx->hs->tls13.legacy_session_id_len > 0)
lib/libssl/tls13_server.c
465
ctx->send_dummy_ccs_after = 1;
lib/libssl/tls13_server.c
471
tls13_client_hello_retry_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_server.c
473
SSL *s = ctx->ssl;
lib/libssl/tls13_server.c
475
if (!tls13_client_hello_process(ctx, cbs))
lib/libssl/tls13_server.c
482
ctx->hs->tls13.hrr = 0;
lib/libssl/tls13_server.c
488
tls13_servername_process(struct tls13_ctx *ctx)
lib/libssl/tls13_server.c
492
if (!tls13_legacy_servername_process(ctx, &alert)) {
lib/libssl/tls13_server.c
493
ctx->alert = alert;
lib/libssl/tls13_server.c
501
tls13_server_hello_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_server.c
503
if (ctx->hs->key_share == NULL)
lib/libssl/tls13_server.c
505
if (!tls_key_share_server_generate(ctx->hs->key_share))
lib/libssl/tls13_server.c
507
if (!tls13_servername_process(ctx))
lib/libssl/tls13_server.c
510
if (!tls13_server_hello_build(ctx, cbb))
lib/libssl/tls13_server.c
517
tls13_server_hello_sent(struct tls13_ctx *ctx)
lib/libssl/tls13_server.c
524
if ((ctx->handshake_stage.hs_type & WITHOUT_HRR) &&
lib/libssl/tls13_server.c
525
ctx->hs->tls13.legacy_session_id_len > 0)
lib/libssl/tls13_server.c
526
ctx->send_dummy_ccs_after = 1;
lib/libssl/tls13_server.c
528
return tls13_server_engage_record_protection(ctx);
lib/libssl/tls13_server.c
532
tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_server.c
534
if (!tlsext_server_build(ctx->ssl, SSL_TLSEXT_MSG_EE, cbb))
lib/libssl/tls13_server.c
543
tls13_server_certificate_request_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_server.c
549
if (!tlsext_server_build(ctx->ssl, SSL_TLSEXT_MSG_CR, cbb))
lib/libssl/tls13_server.c
56
tls13_server_accept(struct tls13_ctx *ctx)
lib/libssl/tls13_server.c
561
tls13_server_check_certificate(struct tls13_ctx *ctx, SSL_CERT_PKEY *cpk,
lib/libssl/tls13_server.c
565
SSL *s = ctx->ssl;
lib/libssl/tls13_server.c
58
if (ctx->mode != TLS13_HS_SERVER)
lib/libssl/tls13_server.c
591
tls13_server_select_certificate(struct tls13_ctx *ctx, SSL_CERT_PKEY **out_cpk,
lib/libssl/tls13_server.c
594
SSL *s = ctx->ssl;
lib/libssl/tls13_server.c
603
if (!tls13_server_check_certificate(ctx, cpk, &cert_ok, &sigalg))
lib/libssl/tls13_server.c
609
if (!tls13_server_check_certificate(ctx, cpk, &cert_ok, &sigalg))
lib/libssl/tls13_server.c
61
return tls13_handshake_perform(ctx);
lib/libssl/tls13_server.c
625
tls13_server_certificate_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_server.c
627
SSL *s = ctx->ssl;
lib/libssl/tls13_server.c
636
if (!tls13_server_select_certificate(ctx, &cpk, &sigalg))
lib/libssl/tls13_server.c
641
ctx->alert = TLS13_ALERT_HANDSHAKE_FAILURE;
lib/libssl/tls13_server.c
642
tls13_set_errorx(ctx, TLS13_ERR_NO_CERTIFICATE, 0,
lib/libssl/tls13_server.c
647
ctx->hs->tls13.cpk = cpk;
lib/libssl/tls13_server.c
648
ctx->hs->our_sigalg = sigalg;
lib/libssl/tls13_server.c
651
chain = s->ctx->extra_certs;
lib/libssl/tls13_server.c
656
if (!X509_STORE_CTX_init(xsc, s->ctx->cert_store, cpk->x509, NULL))
lib/libssl/tls13_server.c
670
if (!tls13_cert_add(ctx, &cert_list, cpk->x509, tlsext_server_build))
lib/libssl/tls13_server.c
689
if (!tls13_cert_add(ctx, &cert_list, cert, NULL))
lib/libssl/tls13_server.c
705
tls13_server_certificate_verify_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_server.c
719
if ((cpk = ctx->hs->tls13.cpk) == NULL)
lib/libssl/tls13_server.c
721
if ((sigalg = ctx->hs->our_sigalg) == NULL)
lib/libssl/tls13_server.c
735
if (!CBB_add_bytes(&sig_cbb, ctx->hs->tls13.transcript_hash,
lib/libssl/tls13_server.c
736
ctx->hs->tls13.transcript_hash_len))
lib/libssl/tls13_server.c
771
if (!ret && ctx->alert == 0)
lib/libssl/tls13_server.c
772
ctx->alert = TLS13_ALERT_INTERNAL_ERROR;
lib/libssl/tls13_server.c
783
tls13_server_finished_send(struct tls13_ctx *ctx, CBB *cbb)
lib/libssl/tls13_server.c
785
struct tls13_secrets *secrets = ctx->hs->tls13.secrets;
lib/libssl/tls13_server.c
797
if (!tls13_secret_init(&finished_key, EVP_MD_size(ctx->hash)))
lib/libssl/tls13_server.c
800
if (!tls13_hkdf_expand_label(&finished_key, ctx->hash,
lib/libssl/tls13_server.c
805
if (!tls1_transcript_hash_value(ctx->ssl, transcript_hash,
lib/libssl/tls13_server.c
812
ctx->hash, NULL))
lib/libssl/tls13_server.c
826
if (!CBS_write_bytes(&cbs, ctx->hs->finished,
lib/libssl/tls13_server.c
827
sizeof(ctx->hs->finished), &ctx->hs->finished_len))
lib/libssl/tls13_server.c
840
tls13_server_finished_sent(struct tls13_ctx *ctx)
lib/libssl/tls13_server.c
842
struct tls13_secrets *secrets = ctx->hs->tls13.secrets;
lib/libssl/tls13_server.c
848
context.data = ctx->hs->tls13.transcript_hash;
lib/libssl/tls13_server.c
849
context.len = ctx->hs->tls13.transcript_hash_len;
lib/libssl/tls13_server.c
858
return tls13_record_layer_set_write_traffic_key(ctx->rl,
lib/libssl/tls13_server.c
863
tls13_client_certificate_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_server.c
867
SSL *s = ctx->ssl;
lib/libssl/tls13_server.c
881
ctx->alert = TLS13_ALERT_CERTIFICATE_REQUIRED;
lib/libssl/tls13_server.c
882
tls13_set_errorx(ctx, TLS13_ERR_NO_PEER_CERTIFICATE, 0,
lib/libssl/tls13_server.c
913
ctx->alert = ssl_verify_alarm_type(s->verify_result);
lib/libssl/tls13_server.c
914
tls13_set_errorx(ctx, TLS13_ERR_VERIFY_FAILED, 0,
lib/libssl/tls13_server.c
924
ctx->handshake_stage.hs_type |= WITH_CCV;
lib/libssl/tls13_server.c
935
tls13_client_certificate_verify_recv(struct tls13_ctx *ctx, CBS *cbs)
lib/libssl/tls13_server.c
966
if (!CBB_add_bytes(&cbb, ctx->hs->tls13.transcript_hash,
lib/libssl/tls13_server.c
967
ctx->hs->tls13.transcript_hash_len))
lib/libssl/tls13_server.c
972
if ((cert = ctx->ssl->session->peer_cert) == NULL)
lib/libssl/tls13_server.c
976
if ((sigalg = ssl_sigalg_for_peer(ctx->ssl, pkey,
lib/libssl/tls13_server.c
979
ctx->hs->peer_sigalg = sigalg;
lib/libssl/tls13_server.c
996
ctx->alert = TLS13_ALERT_DECRYPT_ERROR;
lib/libtls/tls.c
183
tls_set_error(struct tls *ctx, int code, const char *fmt, ...)
lib/libtls/tls.c
191
rv = tls_error_vset(&ctx->error, code, errno_value, fmt, ap);
lib/libtls/tls.c
198
tls_set_errorx(struct tls *ctx, int code, const char *fmt, ...)
lib/libtls/tls.c
204
rv = tls_error_vset(&ctx->error, code, -1, fmt, ap);
lib/libtls/tls.c
211
tls_set_ssl_errorx(struct tls *ctx, int code, const char *fmt, ...)
lib/libtls/tls.c
217
if (ctx->error.tls != 0)
lib/libtls/tls.c
221
rv = tls_error_vset(&ctx->error, code, -1, fmt, ap);
lib/libtls/tls.c
248
struct tls *ctx;
lib/libtls/tls.c
250
if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
lib/libtls/tls.c
253
tls_reset(ctx);
lib/libtls/tls.c
255
if (tls_configure(ctx, tls_config_default) == -1) {
lib/libtls/tls.c
256
free(ctx);
lib/libtls/tls.c
260
return (ctx);
lib/libtls/tls.c
264
tls_configure(struct tls *ctx, struct tls_config *config)
lib/libtls/tls.c
273
tls_config_free(ctx->config);
lib/libtls/tls.c
275
ctx->config = config;
lib/libtls/tls.c
276
ctx->keypair = config->keypair;
lib/libtls/tls.c
278
if ((ctx->flags & TLS_SERVER) != 0)
lib/libtls/tls.c
279
return (tls_configure_server(ctx));
lib/libtls/tls.c
340
tls_keypair_to_pkey(struct tls *ctx, struct tls_keypair *keypair, EVP_PKEY **pkey)
lib/libtls/tls.c
350
if (ctx->config->use_fake_private_key) {
lib/libtls/tls.c
362
tls_set_errorx(ctx, TLS_ERROR_INVALID_ARGUMENT,
lib/libtls/tls.c
363
ctx->config->use_fake_private_key ?
lib/libtls/tls.c
369
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "failed to create buffer");
lib/libtls/tls.c
373
if (ctx->config->use_fake_private_key) {
lib/libtls/tls.c
376
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
381
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
388
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
402
tls_keypair_setup_pkey(struct tls *ctx, struct tls_keypair *keypair, EVP_PKEY *pkey)
lib/libtls/tls.c
411
if (!ctx->config->skip_private_key_check)
lib/libtls/tls.c
415
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "public key hash not set");
lib/libtls/tls.c
423
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
427
if (ctx->config->sign_cb != NULL) {
lib/libtls/tls.c
430
RSA_set_ex_data(rsa, 1, ctx->config) == 0 ||
lib/libtls/tls.c
432
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
439
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
447
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
451
if (ctx->config->sign_cb != NULL) {
lib/libtls/tls.c
454
EC_KEY_set_ex_data(eckey, 1, ctx->config) == 0 ||
lib/libtls/tls.c
456
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
463
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
469
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "incorrect key type");
lib/libtls/tls.c
482
tls_configure_ssl_keypair(struct tls *ctx, SSL_CTX *ssl_ctx,
lib/libtls/tls.c
494
tls_set_errorx(ctx, TLS_ERROR_INVALID_ARGUMENT,
lib/libtls/tls.c
501
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
507
if (tls_keypair_to_pkey(ctx, keypair, &pkey) == -1)
lib/libtls/tls.c
510
if (tls_keypair_setup_pkey(ctx, keypair, pkey) == -1)
lib/libtls/tls.c
513
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
521
if (!ctx->config->skip_private_key_check &&
lib/libtls/tls.c
523
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
537
tls_configure_ssl(struct tls *ctx, SSL_CTX *ssl_ctx)
lib/libtls/tls.c
552
if ((ctx->config->protocols & TLS_PROTOCOL_TLSv1_2) == 0)
lib/libtls/tls.c
554
if ((ctx->config->protocols & TLS_PROTOCOL_TLSv1_3) == 0)
lib/libtls/tls.c
557
if (ctx->config->alpn != NULL) {
lib/libtls/tls.c
558
if (SSL_CTX_set_alpn_protos(ssl_ctx, ctx->config->alpn,
lib/libtls/tls.c
559
ctx->config->alpn_len) != 0) {
lib/libtls/tls.c
560
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
566
if (ctx->config->ciphers != NULL) {
lib/libtls/tls.c
568
ctx->config->ciphers) != 1) {
lib/libtls/tls.c
569
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
575
if (ctx->config->verify_time == 0) {
lib/libtls/tls.c
593
struct tls *ctx = arg;
lib/libtls/tls.c
596
if (ctx->config->verify_cert == 0)
lib/libtls/tls.c
600
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
609
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
617
tls_configure_ssl_verify(struct tls *ctx, SSL_CTX *ssl_ctx, int verify)
lib/libtls/tls.c
619
size_t ca_len = ctx->config->ca_len;
lib/libtls/tls.c
620
char *ca_mem = ctx->config->ca_mem;
lib/libtls/tls.c
621
char *crl_mem = ctx->config->crl_mem;
lib/libtls/tls.c
622
size_t crl_len = ctx->config->crl_len;
lib/libtls/tls.c
632
SSL_CTX_set_cert_verify_callback(ssl_ctx, tls_ssl_cert_verify_cb, ctx);
lib/libtls/tls.c
634
if (ctx->config->verify_depth >= 0)
lib/libtls/tls.c
635
SSL_CTX_set_verify_depth(ssl_ctx, ctx->config->verify_depth);
lib/libtls/tls.c
637
if (ctx->config->verify_cert == 0)
lib/libtls/tls.c
641
if (ctx->config->ca_mem == NULL && ctx->config->ca_path == NULL) {
lib/libtls/tls.c
642
if (tls_config_load_file(&ctx->error, "CA", tls_default_ca_cert_file(),
lib/libtls/tls.c
650
tls_set_errorx(ctx, TLS_ERROR_INVALID_ARGUMENT,
lib/libtls/tls.c
655
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
660
ctx->config->ca_path) != 1) {
lib/libtls/tls.c
661
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
668
tls_set_errorx(ctx, TLS_ERROR_INVALID_ARGUMENT,
lib/libtls/tls.c
673
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
679
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
689
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
70
tls_error(struct tls *ctx)
lib/libtls/tls.c
710
tls_free(struct tls *ctx)
lib/libtls/tls.c
712
if (ctx == NULL)
lib/libtls/tls.c
715
tls_reset(ctx);
lib/libtls/tls.c
717
free(ctx);
lib/libtls/tls.c
72
return ctx->error.msg;
lib/libtls/tls.c
721
tls_reset(struct tls *ctx)
lib/libtls/tls.c
725
tls_config_free(ctx->config);
lib/libtls/tls.c
726
ctx->config = NULL;
lib/libtls/tls.c
728
SSL_CTX_free(ctx->ssl_ctx);
lib/libtls/tls.c
729
SSL_free(ctx->ssl_conn);
lib/libtls/tls.c
730
X509_free(ctx->ssl_peer_cert);
lib/libtls/tls.c
732
ctx->ssl_conn = NULL;
lib/libtls/tls.c
733
ctx->ssl_ctx = NULL;
lib/libtls/tls.c
734
ctx->ssl_peer_cert = NULL;
lib/libtls/tls.c
736
ctx->ssl_peer_chain = NULL;
lib/libtls/tls.c
738
ctx->socket = -1;
lib/libtls/tls.c
739
ctx->state = 0;
lib/libtls/tls.c
741
free(ctx->servername);
lib/libtls/tls.c
742
ctx->servername = NULL;
lib/libtls/tls.c
744
free(ctx->error.msg);
lib/libtls/tls.c
745
ctx->error.msg = NULL;
lib/libtls/tls.c
746
ctx->error.errno_value = -1;
lib/libtls/tls.c
748
tls_conninfo_free(ctx->conninfo);
lib/libtls/tls.c
749
ctx->conninfo = NULL;
lib/libtls/tls.c
751
tls_ocsp_free(ctx->ocsp);
lib/libtls/tls.c
752
ctx->ocsp = NULL;
lib/libtls/tls.c
754
for (sni = ctx->sni_ctx; sni != NULL; sni = nsni) {
lib/libtls/tls.c
758
ctx->sni_ctx = NULL;
lib/libtls/tls.c
76
tls_error_code(struct tls *ctx)
lib/libtls/tls.c
760
ctx->read_cb = NULL;
lib/libtls/tls.c
761
ctx->write_cb = NULL;
lib/libtls/tls.c
762
ctx->cb_arg = NULL;
lib/libtls/tls.c
766
tls_ssl_error(struct tls *ctx, SSL *ssl_conn, int ssl_ret, const char *prefix)
lib/libtls/tls.c
78
return ctx->error.code;
lib/libtls/tls.c
788
if ((ctx->state & TLS_HANDSHAKE_COMPLETE) != 0) {
lib/libtls/tls.c
789
ctx->state |= TLS_EOF_NO_CLOSE_NOTIFY;
lib/libtls/tls.c
796
tls_set_ssl_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
804
tls_set_ssl_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
812
tls_set_ssl_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
819
tls_handshake(struct tls *ctx)
lib/libtls/tls.c
823
tls_error_clear(&ctx->error);
lib/libtls/tls.c
825
if ((ctx->flags & (TLS_CLIENT | TLS_SERVER_CONN)) == 0) {
lib/libtls/tls.c
826
tls_set_errorx(ctx, TLS_ERROR_INVALID_CONTEXT,
lib/libtls/tls.c
831
if ((ctx->state & TLS_HANDSHAKE_COMPLETE) != 0) {
lib/libtls/tls.c
832
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls.c
837
if ((ctx->flags & TLS_CLIENT) != 0)
lib/libtls/tls.c
838
rv = tls_handshake_client(ctx);
lib/libtls/tls.c
839
else if ((ctx->flags & TLS_SERVER_CONN) != 0)
lib/libtls/tls.c
840
rv = tls_handshake_server(ctx);
lib/libtls/tls.c
843
ctx->ssl_peer_cert = SSL_get_peer_certificate(ctx->ssl_conn);
lib/libtls/tls.c
844
ctx->ssl_peer_chain = SSL_get_peer_cert_chain(ctx->ssl_conn);
lib/libtls/tls.c
845
if (tls_conninfo_populate(ctx) == -1)
lib/libtls/tls.c
847
if (ctx->ocsp == NULL)
lib/libtls/tls.c
848
ctx->ocsp = tls_ocsp_setup_from_peer(ctx);
lib/libtls/tls.c
857
tls_read(struct tls *ctx, void *buf, size_t buflen)
lib/libtls/tls.c
862
tls_error_clear(&ctx->error);
lib/libtls/tls.c
864
if ((ctx->state & TLS_HANDSHAKE_COMPLETE) == 0) {
lib/libtls/tls.c
865
if ((rv = tls_handshake(ctx)) != 0)
lib/libtls/tls.c
870
tls_set_errorx(ctx, TLS_ERROR_INVALID_ARGUMENT,
lib/libtls/tls.c
876
if ((ssl_ret = SSL_read(ctx->ssl_conn, buf, buflen)) > 0) {
lib/libtls/tls.c
880
rv = (ssize_t)tls_ssl_error(ctx, ctx->ssl_conn, ssl_ret, "read");
lib/libtls/tls.c
889
tls_write(struct tls *ctx, const void *buf, size_t buflen)
lib/libtls/tls.c
894
tls_error_clear(&ctx->error);
lib/libtls/tls.c
896
if ((ctx->state & TLS_HANDSHAKE_COMPLETE) == 0) {
lib/libtls/tls.c
897
if ((rv = tls_handshake(ctx)) != 0)
lib/libtls/tls.c
902
tls_set_errorx(ctx, TLS_ERROR_INVALID_ARGUMENT,
lib/libtls/tls.c
908
if ((ssl_ret = SSL_write(ctx->ssl_conn, buf, buflen)) > 0) {
lib/libtls/tls.c
912
rv = (ssize_t)tls_ssl_error(ctx, ctx->ssl_conn, ssl_ret, "write");
lib/libtls/tls.c
921
tls_close(struct tls *ctx)
lib/libtls/tls.c
926
tls_error_clear(&ctx->error);
lib/libtls/tls.c
928
if ((ctx->flags & (TLS_CLIENT | TLS_SERVER_CONN)) == 0) {
lib/libtls/tls.c
929
tls_set_errorx(ctx, TLS_ERROR_INVALID_CONTEXT,
lib/libtls/tls.c
935
if (ctx->state & TLS_SSL_NEEDS_SHUTDOWN) {
lib/libtls/tls.c
937
ssl_ret = SSL_shutdown(ctx->ssl_conn);
lib/libtls/tls.c
939
rv = tls_ssl_error(ctx, ctx->ssl_conn, ssl_ret,
lib/libtls/tls.c
944
ctx->state &= ~TLS_SSL_NEEDS_SHUTDOWN;
lib/libtls/tls.c
947
if (ctx->socket != -1) {
lib/libtls/tls.c
948
if (shutdown(ctx->socket, SHUT_RDWR) != 0) {
lib/libtls/tls.c
951
tls_set_error(ctx, TLS_ERROR_UNKNOWN, "shutdown");
lib/libtls/tls.c
955
if (close(ctx->socket) != 0) {
lib/libtls/tls.c
957
tls_set_error(ctx, TLS_ERROR_UNKNOWN, "close");
lib/libtls/tls.c
961
ctx->socket = -1;
lib/libtls/tls.c
964
if ((ctx->state & TLS_EOF_NO_CLOSE_NOTIFY) != 0) {
lib/libtls/tls.c
965
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "EOF without close notify");
lib/libtls/tls_bio_cb.c
104
struct tls *ctx = BIO_get_data(bio);
lib/libtls/tls_bio_cb.c
108
rv = (ctx->write_cb)(ctx, buf, num, ctx->cb_arg);
lib/libtls/tls_bio_cb.c
122
struct tls *ctx = BIO_get_data(bio);
lib/libtls/tls_bio_cb.c
126
rv = (ctx->read_cb)(ctx, buf, size, ctx->cb_arg);
lib/libtls/tls_bio_cb.c
138
tls_set_cbs(struct tls *ctx, tls_read_cb read_cb, tls_write_cb write_cb,
lib/libtls/tls_bio_cb.c
146
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "no callbacks provided");
lib/libtls/tls_bio_cb.c
150
ctx->read_cb = read_cb;
lib/libtls/tls_bio_cb.c
151
ctx->write_cb = write_cb;
lib/libtls/tls_bio_cb.c
152
ctx->cb_arg = cb_arg;
lib/libtls/tls_bio_cb.c
155
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_bio_cb.c
160
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_bio_cb.c
164
BIO_set_data(bio, ctx);
lib/libtls/tls_bio_cb.c
167
SSL_set_bio(ctx->ssl_conn, bio, bio);
lib/libtls/tls_client.c
118
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
130
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
135
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
152
if (tls_connect_socket(ctx, s, servername) != 0) {
lib/libtls/tls_client.c
157
ctx->socket = s;
lib/libtls/tls_client.c
169
tls_client_read_session(struct tls *ctx)
lib/libtls/tls_client.c
171
int sfd = ctx->config->session_fd;
lib/libtls/tls_client.c
181
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
186
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
201
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
209
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
214
if (SSL_set_session(ctx->ssl_conn, ss) != 1) {
lib/libtls/tls_client.c
215
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
232
tls_client_write_session(struct tls *ctx)
lib/libtls/tls_client.c
234
int sfd = ctx->config->session_fd;
lib/libtls/tls_client.c
244
if ((ss = SSL_get1_session(ctx->ssl_conn)) == NULL) {
lib/libtls/tls_client.c
246
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
264
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
270
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
289
tls_connect_common(struct tls *ctx, const char *servername)
lib/libtls/tls_client.c
295
if ((ctx->flags & TLS_CLIENT) == 0) {
lib/libtls/tls_client.c
296
tls_set_errorx(ctx, TLS_ERROR_INVALID_CONTEXT,
lib/libtls/tls_client.c
302
if ((ctx->servername = strdup(servername)) == NULL) {
lib/libtls/tls_client.c
303
tls_set_errorx(ctx, TLS_ERROR_OUT_OF_MEMORY,
lib/libtls/tls_client.c
314
servername_len = strlen(ctx->servername);
lib/libtls/tls_client.c
316
ctx->servername[servername_len - 1] == '.')
lib/libtls/tls_client.c
317
ctx->servername[servername_len - 1] = '\0';
lib/libtls/tls_client.c
320
if ((ctx->ssl_ctx = SSL_CTX_new(SSLv23_client_method())) == NULL) {
lib/libtls/tls_client.c
321
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "ssl context failure");
lib/libtls/tls_client.c
325
if (tls_configure_ssl(ctx, ctx->ssl_ctx) != 0)
lib/libtls/tls_client.c
328
if (tls_configure_ssl_keypair(ctx, ctx->ssl_ctx,
lib/libtls/tls_client.c
329
ctx->config->keypair, 0) != 0)
lib/libtls/tls_client.c
332
if (ctx->config->verify_name) {
lib/libtls/tls_client.c
333
if (ctx->servername == NULL) {
lib/libtls/tls_client.c
334
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
340
if (tls_configure_ssl_verify(ctx, ctx->ssl_ctx, SSL_VERIFY_PEER) == -1)
lib/libtls/tls_client.c
343
if (ctx->config->ecdhecurves != NULL) {
lib/libtls/tls_client.c
344
if (SSL_CTX_set1_groups(ctx->ssl_ctx, ctx->config->ecdhecurves,
lib/libtls/tls_client.c
345
ctx->config->ecdhecurves_len) != 1) {
lib/libtls/tls_client.c
346
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
352
if (SSL_CTX_set_tlsext_status_cb(ctx->ssl_ctx, tls_ocsp_verify_cb) != 1) {
lib/libtls/tls_client.c
353
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
358
if ((ctx->ssl_conn = SSL_new(ctx->ssl_ctx)) == NULL) {
lib/libtls/tls_client.c
359
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "ssl connection failure");
lib/libtls/tls_client.c
363
if (SSL_set_app_data(ctx->ssl_conn, ctx) != 1) {
lib/libtls/tls_client.c
364
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
369
if (ctx->config->session_fd != -1) {
lib/libtls/tls_client.c
370
SSL_clear_options(ctx->ssl_conn, SSL_OP_NO_TICKET);
lib/libtls/tls_client.c
371
if (tls_client_read_session(ctx) == -1)
lib/libtls/tls_client.c
375
if (SSL_set_tlsext_status_type(ctx->ssl_conn, TLSEXT_STATUSTYPE_ocsp) != 1) {
lib/libtls/tls_client.c
376
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
385
if (ctx->servername != NULL &&
lib/libtls/tls_client.c
386
inet_pton(AF_INET, ctx->servername, &addrbuf) != 1 &&
lib/libtls/tls_client.c
387
inet_pton(AF_INET6, ctx->servername, &addrbuf) != 1) {
lib/libtls/tls_client.c
388
if (SSL_set_tlsext_host_name(ctx->ssl_conn,
lib/libtls/tls_client.c
389
ctx->servername) == 0) {
lib/libtls/tls_client.c
390
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
396
ctx->state |= TLS_CONNECTED;
lib/libtls/tls_client.c
40
struct tls *ctx;
lib/libtls/tls_client.c
404
tls_connect_socket(struct tls *ctx, int s, const char *servername)
lib/libtls/tls_client.c
406
return tls_connect_fds(ctx, s, s, servername);
lib/libtls/tls_client.c
410
tls_connect_fds(struct tls *ctx, int fd_read, int fd_write,
lib/libtls/tls_client.c
416
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "invalid file descriptors");
lib/libtls/tls_client.c
420
if (tls_connect_common(ctx, servername) != 0)
lib/libtls/tls_client.c
423
if (SSL_set_rfd(ctx->ssl_conn, fd_read) != 1 ||
lib/libtls/tls_client.c
424
SSL_set_wfd(ctx->ssl_conn, fd_write) != 1) {
lib/libtls/tls_client.c
425
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
436
tls_connect_cbs(struct tls *ctx, tls_read_cb read_cb,
lib/libtls/tls_client.c
441
if (tls_connect_common(ctx, servername) != 0)
lib/libtls/tls_client.c
444
if (tls_set_cbs(ctx, read_cb, write_cb, cb_arg) != 0)
lib/libtls/tls_client.c
45
if ((ctx = tls_new()) == NULL)
lib/libtls/tls_client.c
454
tls_handshake_client(struct tls *ctx)
lib/libtls/tls_client.c
460
if ((ctx->flags & TLS_CLIENT) == 0) {
lib/libtls/tls_client.c
461
tls_set_errorx(ctx, TLS_ERROR_INVALID_CONTEXT,
lib/libtls/tls_client.c
466
if ((ctx->state & TLS_CONNECTED) == 0) {
lib/libtls/tls_client.c
467
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "context not connected");
lib/libtls/tls_client.c
471
ctx->state |= TLS_SSL_NEEDS_SHUTDOWN;
lib/libtls/tls_client.c
474
if ((ssl_ret = SSL_connect(ctx->ssl_conn)) != 1) {
lib/libtls/tls_client.c
475
rv = tls_ssl_error(ctx, ctx->ssl_conn, ssl_ret, "handshake");
lib/libtls/tls_client.c
479
if (ctx->config->verify_name) {
lib/libtls/tls_client.c
48
ctx->flags |= TLS_CLIENT;
lib/libtls/tls_client.c
480
cert = SSL_get_peer_certificate(ctx->ssl_conn);
lib/libtls/tls_client.c
482
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
486
if (tls_check_name(ctx, cert, ctx->servername, &match) == -1)
lib/libtls/tls_client.c
489
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_client.c
491
ctx->servername);
lib/libtls/tls_client.c
496
ctx->state |= TLS_HANDSHAKE_COMPLETE;
lib/libtls/tls_client.c
498
if (ctx->config->session_fd != -1) {
lib/libtls/tls_client.c
499
if (tls_client_write_session(ctx) == -1)
lib/libtls/tls_client.c
50
return (ctx);
lib/libtls/tls_client.c
54
tls_connect(struct tls *ctx, const char *host, const char *port)
lib/libtls/tls_client.c
56
return tls_connect_servername(ctx, host, port, NULL);
lib/libtls/tls_client.c
60
tls_connect_servername(struct tls *ctx, const char *host, const char *port,
lib/libtls/tls_client.c
68
if ((ctx->flags & TLS_CLIENT) == 0) {
lib/libtls/tls_client.c
69
tls_set_errorx(ctx, TLS_ERROR_INVALID_CONTEXT,
lib/libtls/tls_client.c
75
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "host not specified");
lib/libtls/tls_client.c
83
tls_set_errorx(ctx, TLS_ERROR_OUT_OF_MEMORY, "out of memory");
lib/libtls/tls_client.c
87
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "no port provided");
lib/libtls/tls_conninfo.c
106
tls_get_peer_cert_subject(struct tls *ctx, char **subject)
lib/libtls/tls_conninfo.c
111
if (ctx->ssl_peer_cert == NULL)
lib/libtls/tls_conninfo.c
113
if ((name = X509_get_subject_name(ctx->ssl_peer_cert)) == NULL)
lib/libtls/tls_conninfo.c
122
tls_get_peer_cert_common_name(struct tls *ctx, char **common_name)
lib/libtls/tls_conninfo.c
124
if (ctx->ssl_peer_cert == NULL)
lib/libtls/tls_conninfo.c
126
return tls_get_common_name(ctx, ctx->ssl_peer_cert, NULL, common_name);
lib/libtls/tls_conninfo.c
130
tls_get_peer_cert_times(struct tls *ctx, time_t *notbefore,
lib/libtls/tls_conninfo.c
136
if (ctx->ssl_peer_cert == NULL)
lib/libtls/tls_conninfo.c
139
if ((before = X509_get_notBefore(ctx->ssl_peer_cert)) == NULL)
lib/libtls/tls_conninfo.c
141
if ((after = X509_get_notAfter(ctx->ssl_peer_cert)) == NULL)
lib/libtls/tls_conninfo.c
158
tls_get_peer_cert_info(struct tls *ctx)
lib/libtls/tls_conninfo.c
160
if (ctx->ssl_peer_cert == NULL)
lib/libtls/tls_conninfo.c
163
if (tls_get_peer_cert_hash(ctx, &ctx->conninfo->hash) == -1)
lib/libtls/tls_conninfo.c
165
if (tls_get_peer_cert_subject(ctx, &ctx->conninfo->subject) == -1)
lib/libtls/tls_conninfo.c
167
if (tls_get_peer_cert_issuer(ctx, &ctx->conninfo->issuer) == -1)
lib/libtls/tls_conninfo.c
169
if (tls_get_peer_cert_common_name(ctx,
lib/libtls/tls_conninfo.c
170
&ctx->conninfo->common_name) == -1)
lib/libtls/tls_conninfo.c
172
if (tls_get_peer_cert_times(ctx, &ctx->conninfo->notbefore,
lib/libtls/tls_conninfo.c
173
&ctx->conninfo->notafter) == -1)
lib/libtls/tls_conninfo.c
183
tls_conninfo_alpn_proto(struct tls *ctx)
lib/libtls/tls_conninfo.c
188
free(ctx->conninfo->alpn);
lib/libtls/tls_conninfo.c
189
ctx->conninfo->alpn = NULL;
lib/libtls/tls_conninfo.c
191
SSL_get0_alpn_selected(ctx->ssl_conn, &p, &len);
lib/libtls/tls_conninfo.c
193
if ((ctx->conninfo->alpn = malloc(len + 1)) == NULL)
lib/libtls/tls_conninfo.c
195
memcpy(ctx->conninfo->alpn, p, len);
lib/libtls/tls_conninfo.c
196
ctx->conninfo->alpn[len] = '\0';
lib/libtls/tls_conninfo.c
203
tls_conninfo_cert_pem(struct tls *ctx)
lib/libtls/tls_conninfo.c
209
if (ctx->ssl_peer_cert == NULL)
lib/libtls/tls_conninfo.c
218
if (!PEM_write_bio_X509(membio, ctx->ssl_peer_cert))
lib/libtls/tls_conninfo.c
220
for (i = 0; i < sk_X509_num(ctx->ssl_peer_chain); i++) {
lib/libtls/tls_conninfo.c
221
X509 *chaincert = sk_X509_value(ctx->ssl_peer_chain, i);
lib/libtls/tls_conninfo.c
222
if (chaincert != ctx->ssl_peer_cert &&
lib/libtls/tls_conninfo.c
228
free(ctx->conninfo->peer_cert);
lib/libtls/tls_conninfo.c
229
ctx->conninfo->peer_cert_len = 0;
lib/libtls/tls_conninfo.c
230
if ((ctx->conninfo->peer_cert = malloc(bptr->length)) == NULL)
lib/libtls/tls_conninfo.c
232
ctx->conninfo->peer_cert_len = bptr->length;
lib/libtls/tls_conninfo.c
233
memcpy(ctx->conninfo->peer_cert, bptr->data,
lib/libtls/tls_conninfo.c
234
ctx->conninfo->peer_cert_len);
lib/libtls/tls_conninfo.c
244
tls_conninfo_session(struct tls *ctx)
lib/libtls/tls_conninfo.c
246
ctx->conninfo->session_resumed = SSL_session_reused(ctx->ssl_conn);
lib/libtls/tls_conninfo.c
252
tls_conninfo_populate(struct tls *ctx)
lib/libtls/tls_conninfo.c
256
tls_conninfo_free(ctx->conninfo);
lib/libtls/tls_conninfo.c
258
if ((ctx->conninfo = calloc(1, sizeof(struct tls_conninfo))) == NULL) {
lib/libtls/tls_conninfo.c
259
tls_set_errorx(ctx, TLS_ERROR_OUT_OF_MEMORY, "out of memory");
lib/libtls/tls_conninfo.c
263
if (tls_conninfo_alpn_proto(ctx) == -1)
lib/libtls/tls_conninfo.c
266
if ((tmp = SSL_get_cipher(ctx->ssl_conn)) == NULL)
lib/libtls/tls_conninfo.c
268
if ((ctx->conninfo->cipher = strdup(tmp)) == NULL)
lib/libtls/tls_conninfo.c
270
ctx->conninfo->cipher_strength = SSL_get_cipher_bits(ctx->ssl_conn, NULL);
lib/libtls/tls_conninfo.c
272
if (ctx->servername != NULL) {
lib/libtls/tls_conninfo.c
273
if ((ctx->conninfo->servername =
lib/libtls/tls_conninfo.c
274
strdup(ctx->servername)) == NULL)
lib/libtls/tls_conninfo.c
278
if ((tmp = SSL_get_version(ctx->ssl_conn)) == NULL)
lib/libtls/tls_conninfo.c
280
if ((ctx->conninfo->version = strdup(tmp)) == NULL)
lib/libtls/tls_conninfo.c
283
if (tls_get_peer_cert_info(ctx) == -1)
lib/libtls/tls_conninfo.c
286
if (tls_conninfo_cert_pem(ctx) == -1)
lib/libtls/tls_conninfo.c
289
if (tls_conninfo_session(ctx) == -1)
lib/libtls/tls_conninfo.c
295
tls_conninfo_free(ctx->conninfo);
lib/libtls/tls_conninfo.c
296
ctx->conninfo = NULL;
lib/libtls/tls_conninfo.c
323
tls_conn_alpn_selected(struct tls *ctx)
lib/libtls/tls_conninfo.c
325
if (ctx->conninfo == NULL)
lib/libtls/tls_conninfo.c
327
return (ctx->conninfo->alpn);
lib/libtls/tls_conninfo.c
331
tls_conn_cipher(struct tls *ctx)
lib/libtls/tls_conninfo.c
333
if (ctx->conninfo == NULL)
lib/libtls/tls_conninfo.c
335
return (ctx->conninfo->cipher);
lib/libtls/tls_conninfo.c
339
tls_conn_cipher_strength(struct tls *ctx)
lib/libtls/tls_conninfo.c
341
if (ctx->conninfo == NULL)
lib/libtls/tls_conninfo.c
343
return (ctx->conninfo->cipher_strength);
lib/libtls/tls_conninfo.c
347
tls_conn_servername(struct tls *ctx)
lib/libtls/tls_conninfo.c
349
if (ctx->conninfo == NULL)
lib/libtls/tls_conninfo.c
351
return (ctx->conninfo->servername);
lib/libtls/tls_conninfo.c
355
tls_conn_session_resumed(struct tls *ctx)
lib/libtls/tls_conninfo.c
357
if (ctx->conninfo == NULL)
lib/libtls/tls_conninfo.c
359
return (ctx->conninfo->session_resumed);
lib/libtls/tls_conninfo.c
363
tls_conn_version(struct tls *ctx)
lib/libtls/tls_conninfo.c
365
if (ctx->conninfo == NULL)
lib/libtls/tls_conninfo.c
367
return (ctx->conninfo->version);
lib/libtls/tls_conninfo.c
75
tls_get_peer_cert_hash(struct tls *ctx, char **hash)
lib/libtls/tls_conninfo.c
78
if (ctx->ssl_peer_cert == NULL)
lib/libtls/tls_conninfo.c
81
if (tls_cert_hash(ctx->ssl_peer_cert, hash) == -1) {
lib/libtls/tls_conninfo.c
82
tls_set_errorx(ctx, TLS_ERROR_OUT_OF_MEMORY, "out of memory");
lib/libtls/tls_conninfo.c
90
tls_get_peer_cert_issuer(struct tls *ctx, char **issuer)
lib/libtls/tls_conninfo.c
95
if (ctx->ssl_peer_cert == NULL)
lib/libtls/tls_conninfo.c
97
if ((name = X509_get_issuer_name(ctx->ssl_peer_cert)) == NULL)
lib/libtls/tls_internal.h
240
struct tls *tls_server_conn(struct tls *ctx);
lib/libtls/tls_internal.h
244
int tls_check_name(struct tls *ctx, X509 *cert, const char *servername,
lib/libtls/tls_internal.h
246
int tls_configure_server(struct tls *ctx);
lib/libtls/tls_internal.h
248
int tls_configure_ssl(struct tls *ctx, SSL_CTX *ssl_ctx);
lib/libtls/tls_internal.h
249
int tls_configure_ssl_keypair(struct tls *ctx, SSL_CTX *ssl_ctx,
lib/libtls/tls_internal.h
251
int tls_configure_ssl_verify(struct tls *ctx, SSL_CTX *ssl_ctx, int verify);
lib/libtls/tls_internal.h
253
int tls_handshake_client(struct tls *ctx);
lib/libtls/tls_internal.h
254
int tls_handshake_server(struct tls *ctx);
lib/libtls/tls_internal.h
261
int tls_set_cbs(struct tls *ctx,
lib/libtls/tls_internal.h
277
int tls_set_error(struct tls *ctx, int code, const char *fmt, ...)
lib/libtls/tls_internal.h
280
int tls_set_errorx(struct tls *ctx, int code, const char *fmt, ...)
lib/libtls/tls_internal.h
283
int tls_set_ssl_errorx(struct tls *ctx, int code, const char *fmt, ...)
lib/libtls/tls_internal.h
287
int tls_ssl_error(struct tls *ctx, SSL *ssl_conn, int ssl_ret,
lib/libtls/tls_internal.h
290
int tls_conninfo_populate(struct tls *ctx);
lib/libtls/tls_internal.h
295
void tls_ocsp_free(struct tls_ocsp *ctx);
lib/libtls/tls_internal.h
296
struct tls_ocsp *tls_ocsp_setup_from_peer(struct tls *ctx);
lib/libtls/tls_ocsp.c
104
tls_ocsp_asn1_parse_time(ctx, revtime, &info->revocation_time) != 0) {
lib/libtls/tls_ocsp.c
105
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
110
tls_ocsp_asn1_parse_time(ctx, thisupd, &info->this_update) != 0) {
lib/libtls/tls_ocsp.c
111
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
116
tls_ocsp_asn1_parse_time(ctx, nextupd, &info->next_update) != 0) {
lib/libtls/tls_ocsp.c
117
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
121
ctx->ocsp->ocsp_result = info;
lib/libtls/tls_ocsp.c
172
tls_ocsp_setup_from_peer(struct tls *ctx)
lib/libtls/tls_ocsp.c
181
ocsp->main_cert = SSL_get_peer_certificate(ctx->ssl_conn);
lib/libtls/tls_ocsp.c
182
ocsp->extra_certs = SSL_get_peer_cert_chain(ctx->ssl_conn);
lib/libtls/tls_ocsp.c
184
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
191
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
198
tls_set_errorx(ctx, TLS_ERROR_OUT_OF_MEMORY, "out of memory");
lib/libtls/tls_ocsp.c
212
tls_ocsp_verify_response(struct tls *ctx, OCSP_RESPONSE *resp)
lib/libtls/tls_ocsp.c
223
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "cannot load ocsp reply");
lib/libtls/tls_ocsp.c
234
if (OCSP_basic_verify(br, ctx->ocsp->extra_certs,
lib/libtls/tls_ocsp.c
235
SSL_CTX_get_cert_store(ctx->ssl_ctx), flags) != 1) {
lib/libtls/tls_ocsp.c
236
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "ocsp verify failed");
lib/libtls/tls_ocsp.c
243
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
249
cid = tls_ocsp_get_certid(ctx->ocsp->main_cert,
lib/libtls/tls_ocsp.c
250
ctx->ocsp->extra_certs, ctx->ssl_ctx);
lib/libtls/tls_ocsp.c
252
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
259
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
266
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
271
if (tls_ocsp_fill_info(ctx, response_status, cert_status,
lib/libtls/tls_ocsp.c
278
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
298
tls_ocsp_process_response_internal(struct tls *ctx, const unsigned char *response,
lib/libtls/tls_ocsp.c
306
tls_ocsp_free(ctx->ocsp);
lib/libtls/tls_ocsp.c
307
ctx->ocsp = NULL;
lib/libtls/tls_ocsp.c
308
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
312
ret = tls_ocsp_verify_response(ctx, resp);
lib/libtls/tls_ocsp.c
323
struct tls *ctx;
lib/libtls/tls_ocsp.c
325
if ((ctx = SSL_get_app_data(ssl)) == NULL)
lib/libtls/tls_ocsp.c
330
if (ctx->config->ocsp_require_stapling) {
lib/libtls/tls_ocsp.c
331
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_ocsp.c
338
tls_ocsp_free(ctx->ocsp);
lib/libtls/tls_ocsp.c
339
if ((ctx->ocsp = tls_ocsp_setup_from_peer(ctx)) == NULL)
lib/libtls/tls_ocsp.c
342
if (ctx->config->verify_cert == 0 || ctx->config->verify_time == 0)
lib/libtls/tls_ocsp.c
345
res = tls_ocsp_process_response_internal(ctx, raw, size);
lib/libtls/tls_ocsp.c
357
struct tls *ctx;
lib/libtls/tls_ocsp.c
359
if ((ctx = SSL_get_app_data(ssl)) == NULL)
lib/libtls/tls_ocsp.c
362
if (ctx->keypair == NULL || ctx->keypair->ocsp_staple == NULL ||
lib/libtls/tls_ocsp.c
363
ctx->keypair->ocsp_staple_len == 0)
lib/libtls/tls_ocsp.c
366
if ((ocsp_staple = malloc(ctx->keypair->ocsp_staple_len)) == NULL)
lib/libtls/tls_ocsp.c
369
memcpy(ocsp_staple, ctx->keypair->ocsp_staple,
lib/libtls/tls_ocsp.c
370
ctx->keypair->ocsp_staple_len);
lib/libtls/tls_ocsp.c
372
if (SSL_set_tlsext_status_ocsp_resp(ctx->ssl_conn, ocsp_staple,
lib/libtls/tls_ocsp.c
373
ctx->keypair->ocsp_staple_len) != 1)
lib/libtls/tls_ocsp.c
390
tls_peer_ocsp_url(struct tls *ctx)
lib/libtls/tls_ocsp.c
392
if (ctx->ocsp == NULL)
lib/libtls/tls_ocsp.c
394
return ctx->ocsp->ocsp_url;
lib/libtls/tls_ocsp.c
398
tls_peer_ocsp_result(struct tls *ctx)
lib/libtls/tls_ocsp.c
400
if (ctx->ocsp == NULL)
lib/libtls/tls_ocsp.c
402
if (ctx->ocsp->ocsp_result == NULL)
lib/libtls/tls_ocsp.c
404
return ctx->ocsp->ocsp_result->result_msg;
lib/libtls/tls_ocsp.c
408
tls_peer_ocsp_response_status(struct tls *ctx)
lib/libtls/tls_ocsp.c
410
if (ctx->ocsp == NULL)
lib/libtls/tls_ocsp.c
412
if (ctx->ocsp->ocsp_result == NULL)
lib/libtls/tls_ocsp.c
414
return ctx->ocsp->ocsp_result->response_status;
lib/libtls/tls_ocsp.c
418
tls_peer_ocsp_cert_status(struct tls *ctx)
lib/libtls/tls_ocsp.c
420
if (ctx->ocsp == NULL)
lib/libtls/tls_ocsp.c
422
if (ctx->ocsp->ocsp_result == NULL)
lib/libtls/tls_ocsp.c
424
return ctx->ocsp->ocsp_result->cert_status;
lib/libtls/tls_ocsp.c
428
tls_peer_ocsp_crl_reason(struct tls *ctx)
lib/libtls/tls_ocsp.c
430
if (ctx->ocsp == NULL)
lib/libtls/tls_ocsp.c
432
if (ctx->ocsp->ocsp_result == NULL)
lib/libtls/tls_ocsp.c
434
return ctx->ocsp->ocsp_result->crl_reason;
lib/libtls/tls_ocsp.c
438
tls_peer_ocsp_this_update(struct tls *ctx)
lib/libtls/tls_ocsp.c
440
if (ctx->ocsp == NULL)
lib/libtls/tls_ocsp.c
442
if (ctx->ocsp->ocsp_result == NULL)
lib/libtls/tls_ocsp.c
444
return ctx->ocsp->ocsp_result->this_update;
lib/libtls/tls_ocsp.c
448
tls_peer_ocsp_next_update(struct tls *ctx)
lib/libtls/tls_ocsp.c
450
if (ctx->ocsp == NULL)
lib/libtls/tls_ocsp.c
452
if (ctx->ocsp->ocsp_result == NULL)
lib/libtls/tls_ocsp.c
454
return ctx->ocsp->ocsp_result->next_update;
lib/libtls/tls_ocsp.c
458
tls_peer_ocsp_revocation_time(struct tls *ctx)
lib/libtls/tls_ocsp.c
460
if (ctx->ocsp == NULL)
lib/libtls/tls_ocsp.c
462
if (ctx->ocsp->ocsp_result == NULL)
lib/libtls/tls_ocsp.c
464
return ctx->ocsp->ocsp_result->revocation_time;
lib/libtls/tls_ocsp.c
468
tls_ocsp_process_response(struct tls *ctx, const unsigned char *response,
lib/libtls/tls_ocsp.c
471
if ((ctx->state & TLS_HANDSHAKE_COMPLETE) == 0)
lib/libtls/tls_ocsp.c
473
return tls_ocsp_process_response_internal(ctx, response, size);
lib/libtls/tls_ocsp.c
61
tls_ocsp_asn1_parse_time(struct tls *ctx, ASN1_GENERALIZEDTIME *gt, time_t *gt_time)
lib/libtls/tls_ocsp.c
78
tls_ocsp_fill_info(struct tls *ctx, int response_status, int cert_status,
lib/libtls/tls_ocsp.c
84
free(ctx->ocsp->ocsp_result);
lib/libtls/tls_ocsp.c
85
ctx->ocsp->ocsp_result = NULL;
lib/libtls/tls_ocsp.c
88
tls_set_error(ctx, TLS_ERROR_OUT_OF_MEMORY, "out of memory");
lib/libtls/tls_peer.c
100
if (ctx->ssl_peer_cert == NULL)
lib/libtls/tls_peer.c
102
if (ctx->conninfo == NULL)
lib/libtls/tls_peer.c
104
*size = ctx->conninfo->peer_cert_len;
lib/libtls/tls_peer.c
105
return (ctx->conninfo->peer_cert);
lib/libtls/tls_peer.c
27
tls_peer_cert_common_name(struct tls *ctx)
lib/libtls/tls_peer.c
29
if (ctx->conninfo == NULL)
lib/libtls/tls_peer.c
31
return (ctx->conninfo->common_name);
lib/libtls/tls_peer.c
35
tls_peer_cert_hash(struct tls *ctx)
lib/libtls/tls_peer.c
37
if (ctx->conninfo == NULL)
lib/libtls/tls_peer.c
39
return (ctx->conninfo->hash);
lib/libtls/tls_peer.c
42
tls_peer_cert_issuer(struct tls *ctx)
lib/libtls/tls_peer.c
44
if (ctx->conninfo == NULL)
lib/libtls/tls_peer.c
46
return (ctx->conninfo->issuer);
lib/libtls/tls_peer.c
50
tls_peer_cert_subject(struct tls *ctx)
lib/libtls/tls_peer.c
52
if (ctx->conninfo == NULL)
lib/libtls/tls_peer.c
54
return (ctx->conninfo->subject);
lib/libtls/tls_peer.c
58
tls_peer_cert_provided(struct tls *ctx)
lib/libtls/tls_peer.c
60
return (ctx->ssl_peer_cert != NULL);
lib/libtls/tls_peer.c
64
tls_peer_cert_contains_name(struct tls *ctx, const char *name)
lib/libtls/tls_peer.c
68
if (ctx->ssl_peer_cert == NULL)
lib/libtls/tls_peer.c
71
if (tls_check_name(ctx, ctx->ssl_peer_cert, name, &match) == -1)
lib/libtls/tls_peer.c
78
tls_peer_cert_notbefore(struct tls *ctx)
lib/libtls/tls_peer.c
80
if (ctx->ssl_peer_cert == NULL)
lib/libtls/tls_peer.c
82
if (ctx->conninfo == NULL)
lib/libtls/tls_peer.c
84
return (ctx->conninfo->notbefore);
lib/libtls/tls_peer.c
88
tls_peer_cert_notafter(struct tls *ctx)
lib/libtls/tls_peer.c
90
if (ctx->ssl_peer_cert == NULL)
lib/libtls/tls_peer.c
92
if (ctx->conninfo == NULL)
lib/libtls/tls_peer.c
94
return (ctx->conninfo->notafter);
lib/libtls/tls_peer.c
98
tls_peer_cert_chain_pem(struct tls *ctx, size_t *size)
lib/libtls/tls_server.c
119
for (sni_ctx = ctx->sni_ctx; sni_ctx != NULL; sni_ctx = sni_ctx->next) {
lib/libtls/tls_server.c
120
if (tls_check_name(ctx, sni_ctx->ssl_cert, name,
lib/libtls/tls_server.c
172
EVP_CIPHER_CTX *ctx, HMAC_CTX *hctx, int mode)
lib/libtls/tls_server.c
191
if (!EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), NULL,
lib/libtls/tls_server.c
210
if (!EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL,
lib/libtls/tls_server.c
231
tls_configure_server_ssl(struct tls *ctx, SSL_CTX **ssl_ctx,
lib/libtls/tls_server.c
237
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "ssl context failure");
lib/libtls/tls_server.c
245
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_server.c
249
if (SSL_CTX_set_tlsext_servername_arg(*ssl_ctx, ctx) != 1) {
lib/libtls/tls_server.c
250
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_server.c
255
if (tls_configure_ssl(ctx, *ssl_ctx) != 0)
lib/libtls/tls_server.c
257
if (tls_configure_ssl_keypair(ctx, *ssl_ctx, keypair, 1) != 0)
lib/libtls/tls_server.c
259
if (ctx->config->verify_client != 0) {
lib/libtls/tls_server.c
261
if (ctx->config->verify_client == 1)
lib/libtls/tls_server.c
263
if (tls_configure_ssl_verify(ctx, *ssl_ctx, verify) == -1)
lib/libtls/tls_server.c
267
if (ctx->config->alpn != NULL)
lib/libtls/tls_server.c
269
ctx);
lib/libtls/tls_server.c
271
if (ctx->config->dheparams == -1)
lib/libtls/tls_server.c
273
else if (ctx->config->dheparams == 1024)
lib/libtls/tls_server.c
276
if (ctx->config->ecdhecurves != NULL) {
lib/libtls/tls_server.c
278
if (SSL_CTX_set1_groups(*ssl_ctx, ctx->config->ecdhecurves,
lib/libtls/tls_server.c
279
ctx->config->ecdhecurves_len) != 1) {
lib/libtls/tls_server.c
280
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_server.c
286
if (ctx->config->ciphers_server == 1)
lib/libtls/tls_server.c
290
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_server.c
295
if (ctx->config->session_lifetime > 0) {
lib/libtls/tls_server.c
297
SSL_CTX_set_timeout(*ssl_ctx, ctx->config->session_lifetime);
lib/libtls/tls_server.c
301
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_server.c
307
if (SSL_CTX_set_session_id_context(*ssl_ctx, ctx->config->session_id,
lib/libtls/tls_server.c
308
sizeof(ctx->config->session_id)) != 1) {
lib/libtls/tls_server.c
309
tls_set_error(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_server.c
324
tls_configure_server_sni(struct tls *ctx)
lib/libtls/tls_server.c
329
if (ctx->config->keypair->next == NULL)
lib/libtls/tls_server.c
333
sni_ctx = &ctx->sni_ctx;
lib/libtls/tls_server.c
334
for (kp = ctx->config->keypair->next; kp != NULL; kp = kp->next) {
lib/libtls/tls_server.c
336
tls_set_errorx(ctx, TLS_ERROR_OUT_OF_MEMORY, "out of memory");
lib/libtls/tls_server.c
34
struct tls *ctx;
lib/libtls/tls_server.c
340
if (tls_configure_server_ssl(ctx, &(*sni_ctx)->ssl_ctx, kp) == -1)
lib/libtls/tls_server.c
342
if (tls_keypair_load_cert(kp, &ctx->error,
lib/libtls/tls_server.c
355
tls_configure_server(struct tls *ctx)
lib/libtls/tls_server.c
357
if (tls_configure_server_ssl(ctx, &ctx->ssl_ctx,
lib/libtls/tls_server.c
358
ctx->config->keypair) == -1)
lib/libtls/tls_server.c
360
if (tls_configure_server_sni(ctx) == -1)
lib/libtls/tls_server.c
370
tls_accept_common(struct tls *ctx)
lib/libtls/tls_server.c
374
if ((ctx->flags & TLS_SERVER) == 0) {
lib/libtls/tls_server.c
375
tls_set_errorx(ctx, TLS_ERROR_INVALID_CONTEXT,
lib/libtls/tls_server.c
380
if ((conn_ctx = tls_server_conn(ctx)) == NULL) {
lib/libtls/tls_server.c
381
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_server.c
386
if ((conn_ctx->ssl_conn = SSL_new(ctx->ssl_ctx)) == NULL) {
lib/libtls/tls_server.c
387
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN, "ssl failure");
lib/libtls/tls_server.c
39
if ((ctx = tls_new()) == NULL)
lib/libtls/tls_server.c
392
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_server.c
406
tls_accept_socket(struct tls *ctx, struct tls **cctx, int s)
lib/libtls/tls_server.c
408
return (tls_accept_fds(ctx, cctx, s, s));
lib/libtls/tls_server.c
412
tls_accept_fds(struct tls *ctx, struct tls **cctx, int fd_read, int fd_write)
lib/libtls/tls_server.c
416
if ((conn_ctx = tls_accept_common(ctx)) == NULL)
lib/libtls/tls_server.c
42
ctx->flags |= TLS_SERVER;
lib/libtls/tls_server.c
421
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_server.c
437
tls_accept_cbs(struct tls *ctx, struct tls **cctx,
lib/libtls/tls_server.c
44
return (ctx);
lib/libtls/tls_server.c
442
if ((conn_ctx = tls_accept_common(ctx)) == NULL)
lib/libtls/tls_server.c
459
tls_handshake_server(struct tls *ctx)
lib/libtls/tls_server.c
464
if ((ctx->flags & TLS_SERVER_CONN) == 0) {
lib/libtls/tls_server.c
465
tls_set_errorx(ctx, TLS_ERROR_INVALID_CONTEXT,
lib/libtls/tls_server.c
470
ctx->state |= TLS_SSL_NEEDS_SHUTDOWN;
lib/libtls/tls_server.c
473
if ((ssl_ret = SSL_accept(ctx->ssl_conn)) != 1) {
lib/libtls/tls_server.c
474
rv = tls_ssl_error(ctx, ctx->ssl_conn, ssl_ret, "handshake");
lib/libtls/tls_server.c
478
ctx->state |= TLS_HANDSHAKE_COMPLETE;
lib/libtls/tls_server.c
48
tls_server_conn(struct tls *ctx)
lib/libtls/tls_server.c
57
pthread_mutex_lock(&ctx->config->mutex);
lib/libtls/tls_server.c
58
ctx->config->refcount++;
lib/libtls/tls_server.c
59
pthread_mutex_unlock(&ctx->config->mutex);
lib/libtls/tls_server.c
61
conn_ctx->config = ctx->config;
lib/libtls/tls_server.c
62
conn_ctx->keypair = ctx->config->keypair;
lib/libtls/tls_server.c
71
struct tls *ctx = arg;
lib/libtls/tls_server.c
74
ctx->config->alpn, ctx->config->alpn_len, in, inlen) ==
lib/libtls/tls_server.c
84
struct tls *ctx = (struct tls *)arg;
lib/libtls/tls_verify.c
105
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_verify.c
145
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_verify.c
159
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_verify.c
186
tls_set_errorx(ctx, TLS_ERROR_UNKNOWN,
lib/libtls/tls_verify.c
319
tls_get_common_name(struct tls *ctx, X509 *cert, const char *in_name,
lib/libtls/tls_verify.c
333
tls_set_errorx(ctx, errcode, "%s%s%s", name, space, errstr);
lib/libtls/tls_verify.c
341
tls_check_common_name(struct tls *ctx, X509 *cert, const char *name,
lib/libtls/tls_verify.c
348
if (tls_get_common_name(ctx, cert, name, &common_name) == -1)
lib/libtls/tls_verify.c
376
tls_check_name(struct tls *ctx, X509 *cert, const char *name, int *match)
lib/libtls/tls_verify.c
382
if (tls_check_subject_altname(ctx, cert, name, match,
lib/libtls/tls_verify.c
393
return tls_check_common_name(ctx, cert, name, match);
lib/libtls/tls_verify.c
88
tls_check_subject_altname(struct tls *ctx, X509 *cert, const char *name,
lib/libutil/bcrypt_pbkdf.c
101
SHA2_CTX ctx;
lib/libutil/bcrypt_pbkdf.c
121
SHA512Init(&ctx);
lib/libutil/bcrypt_pbkdf.c
122
SHA512Update(&ctx, pass, passlen);
lib/libutil/bcrypt_pbkdf.c
123
SHA512Final(sha2pass, &ctx);
lib/libutil/bcrypt_pbkdf.c
134
SHA512Init(&ctx);
lib/libutil/bcrypt_pbkdf.c
135
SHA512Update(&ctx, salt, saltlen);
lib/libutil/bcrypt_pbkdf.c
136
SHA512Update(&ctx, countsalt, sizeof(countsalt));
lib/libutil/bcrypt_pbkdf.c
137
SHA512Final(sha2salt, &ctx);
lib/libutil/bcrypt_pbkdf.c
143
SHA512Init(&ctx);
lib/libutil/bcrypt_pbkdf.c
144
SHA512Update(&ctx, tmpout, sizeof(tmpout));
lib/libutil/bcrypt_pbkdf.c
145
SHA512Final(sha2salt, &ctx);
lib/libutil/bcrypt_pbkdf.c
165
explicit_bzero(&ctx, sizeof(ctx));
lib/libutil/pkcs5_pbkdf2.c
37
SHA1_CTX ctx;
lib/libutil/pkcs5_pbkdf2.c
43
SHA1Init(&ctx);
lib/libutil/pkcs5_pbkdf2.c
44
SHA1Update(&ctx, key, key_len);
lib/libutil/pkcs5_pbkdf2.c
45
SHA1Final(tk, &ctx);
lib/libutil/pkcs5_pbkdf2.c
56
SHA1Init(&ctx);
lib/libutil/pkcs5_pbkdf2.c
57
SHA1Update(&ctx, k_pad, SHA1_BLOCK_LENGTH);
lib/libutil/pkcs5_pbkdf2.c
58
SHA1Update(&ctx, text, text_len);
lib/libutil/pkcs5_pbkdf2.c
59
SHA1Final(digest, &ctx);
lib/libutil/pkcs5_pbkdf2.c
66
SHA1Init(&ctx);
lib/libutil/pkcs5_pbkdf2.c
67
SHA1Update(&ctx, k_pad, SHA1_BLOCK_LENGTH);
lib/libutil/pkcs5_pbkdf2.c
68
SHA1Update(&ctx, digest, SHA1_DIGEST_LENGTH);
lib/libutil/pkcs5_pbkdf2.c
69
SHA1Final(digest, &ctx);
libexec/login_ldap/bind.c
40
bind_password(struct auth_ctx *ctx, char *binddn, char *bindpw)
libexec/login_ldap/bind.c
44
if (aldap_bind(ctx->ld, binddn, bindpw) == -1) {
libexec/login_ldap/bind.c
49
if ((m = aldap_parse(ctx->ld)) == NULL) {
libexec/login_ldap/bind.c
54
if (ctx->ld->msgid != m->msgid) {
libexec/login_ldap/bind.c
71
unbind(struct auth_ctx *ctx)
libexec/login_ldap/bind.c
73
return aldap_unbind(ctx->ld);
libexec/login_ldap/login_ldap.c
190
struct auth_ctx ctx;
libexec/login_ldap/login_ldap.c
195
memset(&ctx, 0, sizeof(struct auth_ctx));
libexec/login_ldap/login_ldap.c
196
TAILQ_INIT(&(ctx.s));
libexec/login_ldap/login_ldap.c
202
ctx.user = user;
libexec/login_ldap/login_ldap.c
204
if (!parse_conf(&ctx, cfile != NULL ? cfile : "/etc/login_ldap.conf"))
libexec/login_ldap/login_ldap.c
208
if (!conn(&ctx)) {
libexec/login_ldap/login_ldap.c
213
if (ctx.basedn == NULL) {
libexec/login_ldap/login_ldap.c
214
if (!bind_password(&ctx, ctx.binddn, pass))
libexec/login_ldap/login_ldap.c
216
ctx.userdn = ctx.binddn;
libexec/login_ldap/login_ldap.c
218
if (!bind_password(&ctx, ctx.binddn, ctx.bindpw))
libexec/login_ldap/login_ldap.c
223
ctx.userdn = search(&ctx, ctx.basedn, ctx.filter, ctx.scope);
libexec/login_ldap/login_ldap.c
224
if (ctx.userdn == NULL) {
libexec/login_ldap/login_ldap.c
230
dlog(1, "userdn %s", ctx.userdn);
libexec/login_ldap/login_ldap.c
232
if (ctx.gbasedn != NULL && ctx.gfilter != NULL) {
libexec/login_ldap/login_ldap.c
233
tmp = ctx.gfilter;
libexec/login_ldap/login_ldap.c
234
if ((ctx.gfilter = parse_filter(&ctx, ctx.gfilter)) == NULL)
libexec/login_ldap/login_ldap.c
237
tmp = ctx.gbasedn;
libexec/login_ldap/login_ldap.c
238
if ((ctx.gbasedn = parse_filter(&ctx, ctx.gbasedn)) == NULL)
libexec/login_ldap/login_ldap.c
242
if (search(&ctx, ctx.gbasedn, ctx.gfilter, ctx.gscope) == NULL) {
libexec/login_ldap/login_ldap.c
244
"%s", ctx.gfilter);
libexec/login_ldap/login_ldap.c
251
if (ctx.basedn != NULL) {
libexec/login_ldap/login_ldap.c
252
if (!bind_password(&ctx, ctx.userdn, pass)) {
libexec/login_ldap/login_ldap.c
253
dlog(0, "user bind failed, dn: %s", ctx.userdn);
libexec/login_ldap/search.c
45
search(struct auth_ctx *ctx, char *base, char *flt, enum scope scp)
libexec/login_ldap/search.c
54
if (aldap_search(ctx->ld, base, scp, flt, NULL, 0, 0, ctx->timeout,
libexec/login_ldap/search.c
56
aldap_get_errno(ctx->ld, &errstr);
libexec/login_ldap/search.c
63
while ((m = aldap_parse(ctx->ld)) != NULL) {
libexec/login_ldap/util.c
171
parse_conf(struct auth_ctx *ctx, const char *path)
libexec/login_ldap/util.c
206
ctx->gscope = ctx->scope = getscope(NULL);
libexec/login_ldap/util.c
236
TAILQ_INSERT_TAIL(&(ctx->s), url, entries);
libexec/login_ldap/util.c
238
free(ctx->basedn);
libexec/login_ldap/util.c
239
if ((ctx->basedn = strdup(value)) == NULL) {
libexec/login_ldap/util.c
244
free(ctx->binddn);
libexec/login_ldap/util.c
245
if ((ctx->binddn = parse_filter(ctx, value)) == NULL)
libexec/login_ldap/util.c
248
free(ctx->bindpw);
libexec/login_ldap/util.c
249
if ((ctx->bindpw = strdup(value)) == NULL) {
libexec/login_ldap/util.c
254
ctx->timeout = strtonum(value, 0, INT_MAX, &errstr);
libexec/login_ldap/util.c
255
if (ctx->timeout == 0 && errstr != NULL) {
libexec/login_ldap/util.c
260
free(ctx->filter);
libexec/login_ldap/util.c
261
if ((ctx->filter = parse_filter(ctx, value)) == NULL)
libexec/login_ldap/util.c
264
if ((ctx->scope = getscope(value)) == -1)
libexec/login_ldap/util.c
267
free(ctx->cacert);
libexec/login_ldap/util.c
268
if ((ctx->cacert = strdup(value)) == NULL) {
libexec/login_ldap/util.c
273
free(ctx->cacertdir);
libexec/login_ldap/util.c
274
if ((ctx->cacertdir = strdup(value)) == NULL) {
libexec/login_ldap/util.c
279
free(ctx->gbasedn);
libexec/login_ldap/util.c
280
if ((ctx->gbasedn = strdup(value)) == NULL) {
libexec/login_ldap/util.c
285
free(ctx->gfilter);
libexec/login_ldap/util.c
286
if ((ctx->gfilter = strdup(value)) == NULL) {
libexec/login_ldap/util.c
291
if ((ctx->scope = getscope(value)) == -1)
libexec/login_ldap/util.c
302
if (TAILQ_EMPTY(&(ctx->s))) {
libexec/login_ldap/util.c
306
if (ctx->basedn == NULL && ctx->binddn == NULL) {
libexec/login_ldap/util.c
314
do_conn(struct auth_ctx *ctx, struct aldap_url *url)
libexec/login_ldap/util.c
365
ctx->ld = aldap_init(fd);
libexec/login_ldap/util.c
366
if (ctx->ld == NULL) {
libexec/login_ldap/util.c
375
if (aldap_req_starttls(ctx->ld) == -1) {
libexec/login_ldap/util.c
380
if ((m = aldap_parse(ctx->ld)) == NULL) {
libexec/login_ldap/util.c
385
if (ctx->ld->msgid != m->msgid ||
libexec/login_ldap/util.c
402
if (ctx->cacert != NULL &&
libexec/login_ldap/util.c
403
tls_config_set_ca_file(tls_config, ctx->cacert) == -1) {
libexec/login_ldap/util.c
404
dlog(0, "Failed to set ca file %s", ctx->cacert);
libexec/login_ldap/util.c
407
if (ctx->cacertdir != NULL &&
libexec/login_ldap/util.c
408
tls_config_set_ca_path(tls_config, ctx->cacertdir) == -1) {
libexec/login_ldap/util.c
409
dlog(0, "Failed to set ca dir %s", ctx->cacertdir);
libexec/login_ldap/util.c
413
if (aldap_tls(ctx->ld, tls_config, url->host) < 0) {
libexec/login_ldap/util.c
414
aldap_get_errno(ctx->ld, &errstr);
libexec/login_ldap/util.c
421
aldap_close(ctx->ld);
libexec/login_ldap/util.c
426
conn(struct auth_ctx *ctx)
libexec/login_ldap/util.c
430
TAILQ_FOREACH(url, &(ctx->s), entries) {
libexec/login_ldap/util.c
431
if (do_conn(ctx, &(url->s)))
libexec/login_ldap/util.c
461
parse_filter(struct auth_ctx *ctx, const char *str)
libexec/login_ldap/util.c
489
q = tmp + strlcat(tmp, ctx->user, sizeof(tmp));
libexec/login_ldap/util.c
501
if (ctx->userdn == NULL) {
libexec/login_ldap/util.c
505
q = tmp + strlcat(tmp, ctx->userdn,
libexec/spamd/sync.c
427
HMAC_CTX *ctx;
libexec/spamd/sync.c
443
if ((ctx = HMAC_CTX_new()) == NULL)
libexec/spamd/sync.c
445
if (!HMAC_Init_ex(ctx, sync_key, strlen(sync_key), EVP_sha1(), NULL))
libexec/spamd/sync.c
458
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
libexec/spamd/sync.c
472
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
libexec/spamd/sync.c
478
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
libexec/spamd/sync.c
484
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
libexec/spamd/sync.c
490
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
libexec/spamd/sync.c
496
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
libexec/spamd/sync.c
505
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
libexec/spamd/sync.c
509
if (!HMAC_Final(ctx, hdr.sh_hmac, &hmac_len))
libexec/spamd/sync.c
516
HMAC_CTX_free(ctx);
libexec/spamd/sync.c
527
HMAC_CTX *ctx;
libexec/spamd/sync.c
537
if ((ctx = HMAC_CTX_new()) == NULL)
libexec/spamd/sync.c
539
if (!HMAC_Init_ex(ctx, sync_key, strlen(sync_key), EVP_sha1(), NULL))
libexec/spamd/sync.c
549
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
libexec/spamd/sync.c
561
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
libexec/spamd/sync.c
570
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
libexec/spamd/sync.c
574
if (!HMAC_Final(ctx, hdr.sh_hmac, &hmac_len))
libexec/spamd/sync.c
581
HMAC_CTX_free(ctx);
regress/lib/libc/hash/hash_test.c
111
md5_init(void *ctx)
regress/lib/libc/hash/hash_test.c
113
MD5Init(ctx);
regress/lib/libc/hash/hash_test.c
117
md5_update(void *ctx, const uint8_t *data, size_t len)
regress/lib/libc/hash/hash_test.c
119
MD5Update(ctx, data, len);
regress/lib/libc/hash/hash_test.c
123
md5_final(void *digest, void *ctx)
regress/lib/libc/hash/hash_test.c
125
MD5Final(digest, ctx);
regress/lib/libc/hash/hash_test.c
209
rmd160_init(void *ctx)
regress/lib/libc/hash/hash_test.c
211
RMD160Init(ctx);
regress/lib/libc/hash/hash_test.c
215
rmd160_update(void *ctx, const uint8_t *data, size_t len)
regress/lib/libc/hash/hash_test.c
217
RMD160Update(ctx, data, len);
regress/lib/libc/hash/hash_test.c
221
rmd160_final(void *digest, void *ctx)
regress/lib/libc/hash/hash_test.c
223
RMD160Final(digest, ctx);
regress/lib/libc/hash/hash_test.c
282
sha1_init(void *ctx)
regress/lib/libc/hash/hash_test.c
284
SHA1Init(ctx);
regress/lib/libc/hash/hash_test.c
288
sha1_update(void *ctx, const uint8_t *data, size_t len)
regress/lib/libc/hash/hash_test.c
290
SHA1Update(ctx, data, len);
regress/lib/libc/hash/hash_test.c
294
sha1_final(void *digest, void *ctx)
regress/lib/libc/hash/hash_test.c
296
SHA1Final(digest, ctx);
regress/lib/libc/hash/hash_test.c
367
sha224_init(void *ctx)
regress/lib/libc/hash/hash_test.c
369
SHA224Init(ctx);
regress/lib/libc/hash/hash_test.c
373
sha224_update(void *ctx, const uint8_t *data, size_t len)
regress/lib/libc/hash/hash_test.c
375
SHA224Update(ctx, data, len);
regress/lib/libc/hash/hash_test.c
379
sha224_final(void *digest, void *ctx)
regress/lib/libc/hash/hash_test.c
381
SHA224Final(digest, ctx);
regress/lib/libc/hash/hash_test.c
452
sha256_init(void *ctx)
regress/lib/libc/hash/hash_test.c
454
SHA256Init(ctx);
regress/lib/libc/hash/hash_test.c
458
sha256_update(void *ctx, const uint8_t *data, size_t len)
regress/lib/libc/hash/hash_test.c
460
SHA256Update(ctx, data, len);
regress/lib/libc/hash/hash_test.c
464
sha256_final(void *digest, void *ctx)
regress/lib/libc/hash/hash_test.c
466
SHA256Final(digest, ctx);
regress/lib/libc/hash/hash_test.c
550
sha384_init(void *ctx)
regress/lib/libc/hash/hash_test.c
552
SHA384Init(ctx);
regress/lib/libc/hash/hash_test.c
556
sha384_update(void *ctx, const uint8_t *data, size_t len)
regress/lib/libc/hash/hash_test.c
558
SHA384Update(ctx, data, len);
regress/lib/libc/hash/hash_test.c
562
sha384_final(void *digest, void *ctx)
regress/lib/libc/hash/hash_test.c
564
SHA384Final(digest, ctx);
regress/lib/libc/hash/hash_test.c
660
sha512_init(void *ctx)
regress/lib/libc/hash/hash_test.c
662
SHA512Init(ctx);
regress/lib/libc/hash/hash_test.c
666
sha512_update(void *ctx, const uint8_t *data, size_t len)
regress/lib/libc/hash/hash_test.c
668
SHA512Update(ctx, data, len);
regress/lib/libc/hash/hash_test.c
672
sha512_final(void *digest, void *ctx)
regress/lib/libc/hash/hash_test.c
674
SHA512Final(digest, ctx);
regress/lib/libc/hash/hash_test.c
737
sha512_256_init(void *ctx)
regress/lib/libc/hash/hash_test.c
739
SHA512_256Init(ctx);
regress/lib/libc/hash/hash_test.c
743
sha512_256_update(void *ctx, const uint8_t *data, size_t len)
regress/lib/libc/hash/hash_test.c
745
SHA512_256Update(ctx, data, len);
regress/lib/libc/hash/hash_test.c
749
sha512_256_final(void *digest, void *ctx)
regress/lib/libc/hash/hash_test.c
751
SHA512_256Final(digest, ctx);
regress/lib/libc/hash/hash_test.c
757
void *ctx;
regress/lib/libc/hash/hash_test.c
811
hash_test_case(struct hash_ctx *ctx, const struct hash_test_case *tc,
regress/lib/libc/hash/hash_test.c
816
ctx->init(ctx->ctx);
regress/lib/libc/hash/hash_test.c
817
ctx->update(ctx->ctx, (const uint8_t *)tc->in, in_len);
regress/lib/libc/hash/hash_test.c
818
ctx->final(ctx->digest, ctx->ctx);
regress/lib/libc/hash/hash_test.c
820
if (memcmp(tc->out, ctx->digest, ctx->digest_len) != 0) {
regress/lib/libc/hash/hash_test.c
829
hash_test(struct hash_ctx *ctx, const struct hash_tests *tests)
regress/lib/libc/hash/hash_test.c
837
failed |= hash_test_case(ctx, tc, tests->name, i);
regress/lib/libc/hash/hash_test.c
862
struct hash_ctx ctx[] = {
regress/lib/libc/hash/hash_test.c
866
.ctx = &md5_ctx,
regress/lib/libc/hash/hash_test.c
874
.ctx = &rmd160_ctx,
regress/lib/libc/hash/hash_test.c
882
.ctx = &sha1_ctx,
regress/lib/libc/hash/hash_test.c
890
.ctx = &sha224_ctx,
regress/lib/libc/hash/hash_test.c
898
.ctx = &sha256_ctx,
regress/lib/libc/hash/hash_test.c
906
.ctx = &sha384_ctx,
regress/lib/libc/hash/hash_test.c
914
.ctx = &sha512_ctx,
regress/lib/libc/hash/hash_test.c
922
.ctx = &sha512_256_ctx,
regress/lib/libc/hash/hash_test.c
932
failed |= hash_test(&ctx[i], &hash_tests[i]);
regress/lib/libcrypto/aead/aeadtest.c
126
EVP_AEAD_CTX *ctx;
regress/lib/libcrypto/aead/aeadtest.c
131
if ((ctx = EVP_AEAD_CTX_new()) == NULL) {
regress/lib/libcrypto/aead/aeadtest.c
137
if (!EVP_AEAD_CTX_init(ctx, aead, bufs[KEY], lengths[KEY],
regress/lib/libcrypto/aead/aeadtest.c
143
if (!EVP_AEAD_CTX_seal(ctx, out, &out_len, sizeof(out), bufs[NONCE],
regress/lib/libcrypto/aead/aeadtest.c
165
if (!EVP_AEAD_CTX_open(ctx, out2, &out_len2, lengths[IN], bufs[NONCE],
regress/lib/libcrypto/aead/aeadtest.c
183
if (EVP_AEAD_CTX_open(ctx, out2, &out_len2, lengths[IN], bufs[NONCE],
regress/lib/libcrypto/aead/aeadtest.c
192
EVP_AEAD_CTX_free(ctx);
regress/lib/libcrypto/aead/aeadtest.c
203
EVP_CIPHER_CTX *ctx;
regress/lib/libcrypto/aead/aeadtest.c
209
if ((ctx = EVP_CIPHER_CTX_new()) == NULL) {
regress/lib/libcrypto/aead/aeadtest.c
214
if (!EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL)) {
regress/lib/libcrypto/aead/aeadtest.c
219
if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, lengths[NONCE], NULL)) {
regress/lib/libcrypto/aead/aeadtest.c
224
ivlen = EVP_CIPHER_CTX_iv_length(ctx);
regress/lib/libcrypto/aead/aeadtest.c
231
if (!EVP_EncryptInit_ex(ctx, NULL, NULL, bufs[KEY], NULL)) {
regress/lib/libcrypto/aead/aeadtest.c
235
if (!EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, bufs[NONCE])) {
regress/lib/libcrypto/aead/aeadtest.c
240
if (!EVP_EncryptUpdate(ctx, NULL, &len, bufs[AD], lengths[AD])) {
regress/lib/libcrypto/aead/aeadtest.c
249
if (!EVP_EncryptUpdate(ctx, out, &len, bufs[IN], lengths[IN])) {
regress/lib/libcrypto/aead/aeadtest.c
254
if (!EVP_EncryptFinal_ex(ctx, out + out_len, &len)) {
regress/lib/libcrypto/aead/aeadtest.c
259
if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, lengths[TAG],
regress/lib/libcrypto/aead/aeadtest.c
285
EVP_CIPHER_CTX_free(ctx);
regress/lib/libcrypto/aead/aeadtest.c
296
EVP_CIPHER_CTX *ctx;
regress/lib/libcrypto/aead/aeadtest.c
301
if ((ctx = EVP_CIPHER_CTX_new()) == NULL) {
regress/lib/libcrypto/aead/aeadtest.c
306
if (!EVP_DecryptInit_ex(ctx, cipher, NULL, NULL, NULL)) {
regress/lib/libcrypto/aead/aeadtest.c
311
if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, lengths[NONCE],
regress/lib/libcrypto/aead/aeadtest.c
321
if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, lengths[TAG], in)) {
regress/lib/libcrypto/aead/aeadtest.c
326
if (!EVP_DecryptInit_ex(ctx, NULL, NULL, bufs[KEY], NULL)) {
regress/lib/libcrypto/aead/aeadtest.c
330
if (!EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, bufs[NONCE])) {
regress/lib/libcrypto/aead/aeadtest.c
335
if (!EVP_DecryptUpdate(ctx, NULL, &len, bufs[AD], lengths[AD])) {
regress/lib/libcrypto/aead/aeadtest.c
349
if (!EVP_DecryptUpdate(ctx, out, &len, in, lengths[CT])) {
regress/lib/libcrypto/aead/aeadtest.c
356
if (EVP_DecryptFinal_ex(ctx, out + out_len, &len)) {
regress/lib/libcrypto/aead/aeadtest.c
364
if (!EVP_DecryptFinal_ex(ctx, out + out_len, &len)) {
regress/lib/libcrypto/aead/aeadtest.c
385
EVP_CIPHER_CTX_free(ctx);
regress/lib/libcrypto/aes/aes_test.c
1002
if (!EVP_CIPHER_CTX_reset(ctx)) {
regress/lib/libcrypto/aes/aes_test.c
1025
EVP_CIPHER_CTX_free(ctx);
regress/lib/libcrypto/aes/aes_test.c
870
EVP_CIPHER_CTX *ctx;
regress/lib/libcrypto/aes/aes_test.c
876
if ((ctx = EVP_CIPHER_CTX_new()) == NULL) {
regress/lib/libcrypto/aes/aes_test.c
885
if (!EVP_EncryptInit(ctx, cipher, NULL, NULL)) {
regress/lib/libcrypto/aes/aes_test.c
891
if (!EVP_CIPHER_CTX_set_padding(ctx, at->padding)) {
regress/lib/libcrypto/aes/aes_test.c
898
if (!EVP_EncryptInit(ctx, NULL, at->key, at->iv)) {
regress/lib/libcrypto/aes/aes_test.c
910
if (EVP_CIPHER_CTX_mode(ctx) == EVP_CIPH_XTS_MODE)
regress/lib/libcrypto/aes/aes_test.c
913
if (!EVP_EncryptUpdate(ctx, out + total_len, &out_len,
regress/lib/libcrypto/aes/aes_test.c
925
if (!EVP_EncryptFinal_ex(ctx, out + total_len, &out_len)) {
regress/lib/libcrypto/aes/aes_test.c
932
if (!EVP_CIPHER_CTX_reset(ctx)) {
regress/lib/libcrypto/aes/aes_test.c
955
if (!EVP_DecryptInit(ctx, cipher, NULL, NULL)) {
regress/lib/libcrypto/aes/aes_test.c
961
if (!EVP_CIPHER_CTX_set_padding(ctx, at->padding)) {
regress/lib/libcrypto/aes/aes_test.c
968
if (!EVP_DecryptInit(ctx, NULL, at->key, at->iv)) {
regress/lib/libcrypto/aes/aes_test.c
980
if (EVP_CIPHER_CTX_mode(ctx) == EVP_CIPH_XTS_MODE)
regress/lib/libcrypto/aes/aes_test.c
983
if (!EVP_DecryptUpdate(ctx, out + total_len, &out_len,
regress/lib/libcrypto/aes/aes_test.c
995
if (!EVP_DecryptFinal_ex(ctx, out + total_len, &out_len)) {
regress/lib/libcrypto/bf/bf_test.c
1142
EVP_CIPHER_CTX *ctx;
regress/lib/libcrypto/bf/bf_test.c
1148
if ((ctx = EVP_CIPHER_CTX_new()) == NULL) {
regress/lib/libcrypto/bf/bf_test.c
1157
if (!EVP_EncryptInit(ctx, cipher, NULL, NULL)) {
regress/lib/libcrypto/bf/bf_test.c
1163
if (!EVP_CIPHER_CTX_set_key_length(ctx, bt->key_len)) {
regress/lib/libcrypto/bf/bf_test.c
1170
if (!EVP_CIPHER_CTX_set_padding(ctx, bt->padding)) {
regress/lib/libcrypto/bf/bf_test.c
1177
if (!EVP_EncryptInit(ctx, NULL, bt->key, bt->iv)) {
regress/lib/libcrypto/bf/bf_test.c
1188
if (!EVP_EncryptUpdate(ctx, out + total_len, &out_len,
regress/lib/libcrypto/bf/bf_test.c
1200
if (!EVP_EncryptFinal_ex(ctx, out + total_len, &out_len)) {
regress/lib/libcrypto/bf/bf_test.c
1207
if (!EVP_CIPHER_CTX_reset(ctx)) {
regress/lib/libcrypto/bf/bf_test.c
1230
if (!EVP_DecryptInit(ctx, cipher, NULL, NULL)) {
regress/lib/libcrypto/bf/bf_test.c
1236
if (!EVP_CIPHER_CTX_set_key_length(ctx, bt->key_len)) {
regress/lib/libcrypto/bf/bf_test.c
1243
if (!EVP_CIPHER_CTX_set_padding(ctx, bt->padding)) {
regress/lib/libcrypto/bf/bf_test.c
1250
if (!EVP_DecryptInit(ctx, NULL, bt->key, bt->iv)) {
regress/lib/libcrypto/bf/bf_test.c
1261
if (!EVP_DecryptUpdate(ctx, out + total_len, &out_len,
regress/lib/libcrypto/bf/bf_test.c
1273
if (!EVP_DecryptFinal_ex(ctx, out + total_len, &out_len)) {
regress/lib/libcrypto/bf/bf_test.c
1280
if (!EVP_CIPHER_CTX_reset(ctx)) {
regress/lib/libcrypto/bf/bf_test.c
1303
EVP_CIPHER_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_ffdh.c
402
ffdh_test_case(const struct ffdh_test *t, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_ffdh.c
407
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_ffdh.c
409
if ((pstr = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_ffdh.c
411
if ((papi = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_ffdh.c
427
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_ffdh.c
474
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_ffdh.c
478
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_ffdh.c
482
failed |= ffdh_test_case(&ffdh_tests[i], ctx);
regress/lib/libcrypto/bn/bn_ffdh.c
486
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_gcd.c
26
int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_gcd.c
27
int BN_gcd_ct(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_gcd.c
3459
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_gcd.c
3465
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_gcd.c
3468
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_gcd.c
3470
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_gcd.c
3472
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_gcd.c
3474
if ((want = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_gcd.c
3476
if ((got = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_gcd.c
3497
if (!test->fn(got, a, b, ctx)) {
regress/lib/libcrypto/bn/bn_gcd.c
3517
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_gcd.c
3518
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_gcd.c
3541
BIGNUM *b, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_gcd.c
3547
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_gcd.c
3549
if ((gcd = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_gcd.c
3561
if (!test->fn(gcd, a, b, ctx)) {
regress/lib/libcrypto/bn/bn_gcd.c
3591
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_gcd.c
3599
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_gcd.c
3605
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_gcd.c
3608
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_gcd.c
3610
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_gcd.c
3612
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_gcd.c
3634
failed |= bn_binomial_gcd_test(test, k, a, b, ctx);
regress/lib/libcrypto/bn/bn_gcd.c
3651
failed |= bn_binomial_gcd_test(test, k, a, b, ctx);
regress/lib/libcrypto/bn/bn_gcd.c
3655
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_gcd.c
3656
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_isqrt.c
168
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_isqrt.c
173
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_isqrt.c
176
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_isqrt.c
178
if ((lower = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_isqrt.c
180
if ((upper = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_isqrt.c
182
if ((n = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_isqrt.c
184
if ((n_sqr = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_isqrt.c
186
if ((isqrt = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_isqrt.c
188
if ((testcase = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_isqrt.c
201
if (!BN_sqr(n_sqr, n, ctx))
regress/lib/libcrypto/bn/bn_isqrt.c
204
if (!bn_isqrt(isqrt, &is_perfect_square, n_sqr, ctx))
regress/lib/libcrypto/bn/bn_isqrt.c
229
if (!bn_isqrt(isqrt, &is_perfect_square, upper, ctx))
regress/lib/libcrypto/bn/bn_isqrt.c
252
if (!bn_isqrt(isqrt, &is_perfect_square, testcase, ctx))
regress/lib/libcrypto/bn/bn_isqrt.c
275
if (!bn_isqrt(isqrt, &is_perfect_square, testcase, ctx))
regress/lib/libcrypto/bn/bn_isqrt.c
289
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_isqrt.c
290
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
100
bn_mod_exp_zero_test(const struct mod_exp_test *test, BN_CTX *ctx,
regress/lib/libcrypto/bn/bn_mod_exp.c
107
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
109
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
111
if ((m = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
113
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
115
if ((got = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
131
mod_exp_ret = test->mod_exp_fn(got, a, p, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
133
mod_exp_ret = test->mod_exp_mont_fn(got, a, p, m, ctx, NULL);
regress/lib/libcrypto/bn/bn_mod_exp.c
150
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
156
bn_mod_exp_zero_word_test(BN_CTX *ctx, int neg_modulus)
regress/lib/libcrypto/bn/bn_mod_exp.c
162
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
164
if ((m = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
166
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
168
if ((got = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
177
if (!BN_mod_exp_mont_word(got, 1, p, m, ctx, NULL)) {
regress/lib/libcrypto/bn/bn_mod_exp.c
191
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
199
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_mod_exp.c
203
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
211
failed |= bn_mod_exp_zero_test(&mod_exp_fn[i], ctx,
regress/lib/libcrypto/bn/bn_mod_exp.c
216
failed |= bn_mod_exp_zero_word_test(ctx, 0);
regress/lib/libcrypto/bn/bn_mod_exp.c
217
failed |= bn_mod_exp_zero_word_test(ctx, 1);
regress/lib/libcrypto/bn/bn_mod_exp.c
219
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
242
BIGNUM *m, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_mod_exp.c
265
if (!BN_mod(a, a, m, ctx))
regress/lib/libcrypto/bn/bn_mod_exp.c
271
return BN_mod(b, b, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
278
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
280
if ((mmodified = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
304
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
310
generate_test_triple(int reduce, BIGNUM *a, BIGNUM *p, BIGNUM *m, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_mod_exp.c
312
return generate_test_quintuple(reduce, a, p, NULL, NULL, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
339
const BIGNUM *m, BN_CTX *ctx, const struct mod_exp_test *test)
regress/lib/libcrypto/bn/bn_mod_exp.c
345
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
347
if ((got = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
351
mod_exp_ret = test->mod_exp_fn(got, a, p, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
353
mod_exp_ret = test->mod_exp_mont_fn(got, a, p, m, ctx, NULL);
regress/lib/libcrypto/bn/bn_mod_exp.c
36
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *mctx)
regress/lib/libcrypto/bn/bn_mod_exp.c
366
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
373
BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_mod_exp.c
378
if (!generate_test_triple(reduce, a, p, m, ctx))
regress/lib/libcrypto/bn/bn_mod_exp.c
386
if ((BN_mod_exp_simple(want, a, p, m, ctx)) <= 0)
regress/lib/libcrypto/bn/bn_mod_exp.c
392
if (!test_mod_exp(want, a, p, m, ctx, test))
regress/lib/libcrypto/bn/bn_mod_exp.c
40
return BN_mod_exp2_mont(r, a, p, one, one, m, ctx, mctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
404
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_mod_exp.c
409
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
412
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
414
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
416
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
418
if ((m = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
420
if ((want = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
425
failed |= bn_mod_exp_test(reduce, want, a, p, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
429
failed |= bn_mod_exp_test(reduce, want, a, p, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
431
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
432
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
439
const BIGNUM *b, const BIGNUM *q, const BIGNUM *m, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_mod_exp.c
444
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
446
if ((fact1 = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
448
if ((fact2 = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
45
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *mctx)
regress/lib/libcrypto/bn/bn_mod_exp.c
451
if (!BN_mod_exp_simple(fact1, a, p, m, ctx))
regress/lib/libcrypto/bn/bn_mod_exp.c
453
if (!BN_mod_exp_simple(fact2, b, q, m, ctx))
regress/lib/libcrypto/bn/bn_mod_exp.c
455
if (!BN_mod_mul(out, fact1, fact2, m, ctx))
regress/lib/libcrypto/bn/bn_mod_exp.c
460
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
467
BIGNUM *b, BIGNUM *q, BIGNUM *m, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_mod_exp.c
472
if (!generate_test_quintuple(reduce, a, p, b, q, m, ctx))
regress/lib/libcrypto/bn/bn_mod_exp.c
482
if (!bn_mod_exp2_simple(want, a, p, b, q, m, ctx))
regress/lib/libcrypto/bn/bn_mod_exp.c
485
if (!BN_mod_exp2_mont(got, a, p, b, q, m, ctx, NULL))
regress/lib/libcrypto/bn/bn_mod_exp.c
49
return BN_mod_exp2_mont(r, one, one, a, p, m, ctx, mctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
501
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_mod_exp.c
506
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
509
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
511
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
513
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
515
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
517
if ((q = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
519
if ((m = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
521
if ((want = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
523
if ((got = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
528
failed |= bn_mod_exp2_test(reduce, want, got, a, p, b, q, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
532
failed |= bn_mod_exp2_test(reduce, want, got, a, p, b, q, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
534
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
535
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
596
BN_CTX *ctx, const struct aliasing_test_case *tc)
regress/lib/libcrypto/bn/bn_mod_exp.c
605
if (!BN_mod_exp_simple(want, a, p, m, ctx))
regress/lib/libcrypto/bn/bn_mod_exp.c
612
BN_CTX *ctx, const struct mod_exp_test *test)
regress/lib/libcrypto/bn/bn_mod_exp.c
617
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
620
mod_exp_ret = test->mod_exp_fn(got, a, p, m, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
622
mod_exp_ret = test->mod_exp_mont_fn(got, a, p, m, ctx, NULL);
regress/lib/libcrypto/bn/bn_mod_exp.c
641
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
648
BIGNUM *a, BIGNUM *p, BIGNUM *m, BIGNUM *want, BIGNUM *got, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_mod_exp.c
657
test_bn_mod_exp_aliasing_setup(want, a, p, m, ctx, tc);
regress/lib/libcrypto/bn/bn_mod_exp.c
658
if (!test_mod_exp_aliased("nothing", 1, got, want, a, p, m, ctx,
regress/lib/libcrypto/bn/bn_mod_exp.c
661
test_bn_mod_exp_aliasing_setup(want, a, p, m, ctx, tc);
regress/lib/libcrypto/bn/bn_mod_exp.c
662
if (!test_mod_exp_aliased("a", 1, a, want, a, p, m, ctx, test))
regress/lib/libcrypto/bn/bn_mod_exp.c
664
test_bn_mod_exp_aliasing_setup(want, a, p, m, ctx, tc);
regress/lib/libcrypto/bn/bn_mod_exp.c
665
if (!test_mod_exp_aliased("p", 1, p, want, a, p, m, ctx, test))
regress/lib/libcrypto/bn/bn_mod_exp.c
667
test_bn_mod_exp_aliasing_setup(want, a, p, m, ctx, tc);
regress/lib/libcrypto/bn/bn_mod_exp.c
669
a, p, m, ctx, test))
regress/lib/libcrypto/bn/bn_mod_exp.c
679
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_mod_exp.c
684
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
687
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
689
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
691
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
693
if ((m = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
695
if ((want = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
697
if ((got = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_exp.c
703
want, got, ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
706
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_exp.c
707
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_mod_inverse.c
277
bn_mod_inverse_test(const struct mod_inv_test *test, BN_CTX *ctx, int flags)
regress/lib/libcrypto/bn/bn_mod_inverse.c
283
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_inverse.c
285
if ((i = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_inverse.c
287
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_inverse.c
289
if ((m = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_inverse.c
291
if ((inv = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_inverse.c
293
if ((elt = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_inverse.c
295
if ((mod = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_inverse.c
317
if (BN_mod_inverse(inv, elt, mod, ctx) == NULL)
regress/lib/libcrypto/bn/bn_mod_inverse.c
331
if (BN_mod_inverse(inv, elt, inv, ctx) == NULL)
regress/lib/libcrypto/bn/bn_mod_inverse.c
344
if (BN_mod_inverse(inv, inv, mod, ctx) == NULL)
regress/lib/libcrypto/bn/bn_mod_inverse.c
352
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_inverse.c
360
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_mod_inverse.c
364
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_mod_inverse.c
368
failed |= bn_mod_inverse_test(&mod_inv_tests[i], ctx, 0);
regress/lib/libcrypto/bn/bn_mod_inverse.c
371
failed |= bn_mod_inverse_test(&mod_inv_tests[i], ctx,
regress/lib/libcrypto/bn/bn_mod_inverse.c
374
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2834
mod_sqrt_test(struct mod_sqrt_test *test, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2839
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2841
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2843
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2845
if ((want = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2847
if ((got = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2849
if ((diff = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2857
if (BN_mod_sqrt(got, a, p, ctx) == NULL) {
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2867
if (!BN_mod_sub(diff, want, got, p, ctx))
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2884
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2892
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2896
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2900
failed |= mod_sqrt_test(&mod_sqrt_test_data[i], ctx);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
2902
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4435
BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4442
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4444
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4446
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4448
if ((want = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4450
if ((got = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4452
if ((diff = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4462
if (BN_mod_sqrt(got, a, p, ctx) == NULL) {
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4482
if (!BN_mod_sub(diff, want, got, p, ctx))
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4498
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4506
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4510
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4516
failed |= bn_mod_sqrt_p_is_1_mod_8_test(test, ctx);
regress/lib/libcrypto/bn/bn_mod_sqrt.c
4519
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_test.c
100
int test_mod(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
1002
test_mod_exp(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
1008
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
101
int test_mod_mul(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
1010
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1012
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1014
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1016
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1018
if ((e = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
102
int test_mod_exp(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
1024
if (BN_mod_exp(d, a, b, c, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
1029
if (BN_mod_exp_ct(d, a, b, c, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
103
int test_mod_exp_mont_consttime(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
1034
if (BN_mod_exp_nonct(d, a, b, c, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
104
int test_mod_exp_mont5(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
1045
if (!BN_mod_exp(d, a, b, c, ctx))
regress/lib/libcrypto/bn/bn_test.c
105
int test_mod_exp_sizes(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
106
int test_exp(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
1060
CHECK_GOTO(BN_exp(e, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
1062
CHECK_GOTO(BN_div(a, b, e, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
107
int test_kron(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
1074
if (!BN_mod_exp_ct(d, a, b, c, ctx))
regress/lib/libcrypto/bn/bn_test.c
108
int test_sqrt(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
1089
CHECK_GOTO(BN_exp(e, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
1091
CHECK_GOTO(BN_div(a, b, e, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
1103
if (!BN_mod_exp_nonct(d, a, b, c, ctx))
regress/lib/libcrypto/bn/bn_test.c
1118
CHECK_GOTO(BN_exp(e, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
1120
CHECK_GOTO(BN_div(a, b, e, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
1129
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
1135
test_mod_exp_mont_consttime(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
1141
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
1143
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1145
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1147
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1149
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1151
if ((e = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1157
if (BN_mod_exp_mont_consttime(d, a, b, c, ctx, NULL)) {
regress/lib/libcrypto/bn/bn_test.c
1165
if (BN_mod_exp_mont_consttime(d, a, b, c, ctx, NULL)) {
regress/lib/libcrypto/bn/bn_test.c
1177
if (!BN_mod_exp_mont_consttime(d, a, b, c, ctx, NULL))
regress/lib/libcrypto/bn/bn_test.c
1192
CHECK_GOTO(BN_exp(e, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
1194
CHECK_GOTO(BN_div(a, b, e, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
1203
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
1213
test_mod_exp_mont5(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
1221
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
1223
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1225
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1227
if ((m = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1229
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1231
if ((e = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1233
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1235
if ((n = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1237
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1246
if (!BN_mod_exp_mont_consttime(d, a, p, m, ctx, NULL))
regress/lib/libcrypto/bn/bn_test.c
1271
CHECK_GOTO(BN_MONT_CTX_set(mont, n, ctx));
regress/lib/libcrypto/bn/bn_test.c
1272
CHECK_GOTO(BN_mod_mul_montgomery(c, a, b, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
1273
CHECK_GOTO(BN_mod_mul_montgomery(d, b, a, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
1317
CHECK_GOTO(BN_MONT_CTX_set(mont, n, ctx));
regress/lib/libcrypto/bn/bn_test.c
1318
CHECK_GOTO(BN_mod_mul_montgomery(c, a, a, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
1319
CHECK_GOTO(BN_mod_mul_montgomery(d, a, b, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
1328
if (!BN_mod_exp_mont_consttime(d, a, p, m, ctx, NULL))
regress/lib/libcrypto/bn/bn_test.c
1340
CHECK_GOTO(BN_MONT_CTX_set(mont, m, ctx));
regress/lib/libcrypto/bn/bn_test.c
1341
if (!BN_from_montgomery(e, a, mont, ctx))
regress/lib/libcrypto/bn/bn_test.c
1343
if (!BN_mod_exp_mont_consttime(d, e, p, m, ctx, NULL))
regress/lib/libcrypto/bn/bn_test.c
1345
if (!BN_mod_exp_simple(a, e, p, m, ctx))
regress/lib/libcrypto/bn/bn_test.c
1353
if (!BN_mod_exp_mont_consttime(d, e, p, m, ctx, NULL))
regress/lib/libcrypto/bn/bn_test.c
1355
if (!BN_mod_exp_simple(a, e, p, m, ctx))
regress/lib/libcrypto/bn/bn_test.c
1364
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
137
BN_CTX *ctx;
regress/lib/libcrypto/bn/bn_test.c
1371
test_exp(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
1377
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
1379
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1381
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1383
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1385
if ((e = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1392
if (BN_exp(d, a, b, ctx) <= 0)
regress/lib/libcrypto/bn/bn_test.c
1407
CHECK_GOTO(BN_mul(e, e, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
1417
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
1440
test_kron(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
1448
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
1450
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1452
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1454
if ((r = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1456
if ((t = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1495
if (!BN_mod_exp_reciprocal(r, a, t, b, ctx))
regress/lib/libcrypto/bn/bn_test.c
1513
kronecker = BN_kronecker(a, b, ctx);
regress/lib/libcrypto/bn/bn_test.c
1537
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
1543
test_sqrt(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
1550
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
1552
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1554
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1556
if ((r = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
157
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1589
if (!BN_nnmod(r, r, p, ctx))
regress/lib/libcrypto/bn/bn_test.c
1591
if (!BN_mod_sqr(r, r, p, ctx))
regress/lib/libcrypto/bn/bn_test.c
1595
if (!BN_nnmod(a, a, p, ctx))
regress/lib/libcrypto/bn/bn_test.c
1597
if (!BN_mod_sqr(a, a, p, ctx))
regress/lib/libcrypto/bn/bn_test.c
1599
if (!BN_mul(a, a, r, ctx))
regress/lib/libcrypto/bn/bn_test.c
1605
if (!BN_mod_sqrt(r, a, p, ctx))
regress/lib/libcrypto/bn/bn_test.c
1607
if (!BN_mod_sqr(r, r, p, ctx))
regress/lib/libcrypto/bn/bn_test.c
1610
if (!BN_nnmod(a, a, p, ctx))
regress/lib/libcrypto/bn/bn_test.c
1633
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
1639
test_lshift(BIO *bp, BN_CTX *ctx, int use_lst)
regress/lib/libcrypto/bn/bn_test.c
1645
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
1647
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1649
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1651
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1653
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1678
CHECK_GOTO(BN_mul(d, a, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
1697
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
1703
test_lshift1(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
1709
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
1711
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1713
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1715
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1743
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
1749
test_rshift(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
175
if (!test_add(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
1755
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
1757
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1759
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1761
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1763
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1765
if ((e = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1784
CHECK_GOTO(BN_div(d, e, a, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
1794
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
180
if (!test_sub(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
1800
test_rshift1(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
1806
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
1808
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1810
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1812
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
1839
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
185
if (!test_lshift1(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
1854
test_mod_exp_sizes(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
1861
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
1862
CHECK_GOTO(p = BN_CTX_get(ctx));
regress/lib/libcrypto/bn/bn_test.c
1863
CHECK_GOTO(x = BN_CTX_get(ctx));
regress/lib/libcrypto/bn/bn_test.c
1864
CHECK_GOTO(y = BN_CTX_get(ctx));
regress/lib/libcrypto/bn/bn_test.c
1865
CHECK_GOTO(r = BN_CTX_get(ctx));
regress/lib/libcrypto/bn/bn_test.c
1866
CHECK_GOTO(r2 = BN_CTX_get(ctx));
regress/lib/libcrypto/bn/bn_test.c
1873
!BN_MONT_CTX_set(mont_ctx, p, ctx))
regress/lib/libcrypto/bn/bn_test.c
1879
!BN_mod_exp_mont_consttime(r, x, y, p, ctx, mont_ctx) ||
regress/lib/libcrypto/bn/bn_test.c
1880
!BN_mod_exp(r2, x, y, p, ctx))
regress/lib/libcrypto/bn/bn_test.c
1899
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
190
if (!test_lshift(out, ctx, 0))
regress/lib/libcrypto/bn/bn_test.c
195
if (!test_lshift(out, ctx, 1))
regress/lib/libcrypto/bn/bn_test.c
200
if (!test_rshift1(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
205
if (!test_rshift(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
210
if (!test_sqr(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
215
if (!test_mul(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
220
if (!test_div(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
225
if (!test_div_word(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
230
if (!test_div_reciprocal(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
235
if (!test_mod(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
240
if (!test_mod_mul(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
245
if (!test_mont(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
250
if (!test_mod_exp(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
255
if (!test_mod_exp_mont_consttime(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
260
if (!test_mod_exp_mont5(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
265
if (!test_exp(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
270
if (!test_kron(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
275
if (!test_sqrt(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
280
if (!test_mod_exp_sizes(out, ctx))
regress/lib/libcrypto/bn/bn_test.c
284
BN_CTX_free(ctx);
regress/lib/libcrypto/bn/bn_test.c
299
test_add(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
305
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
307
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
309
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
311
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
342
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
348
test_sub(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
354
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
356
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
358
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
360
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
396
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
402
test_div(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
408
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
410
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
412
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
414
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
416
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
418
if ((e = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
424
if (BN_div(d, c, a, b, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
440
CHECK_GOTO(BN_div(d, c, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
460
CHECK_GOTO(BN_mul(e, d, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
471
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
483
test_div_word(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
490
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
492
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
494
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
549
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
555
test_div_reciprocal(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
562
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
564
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
566
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
568
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
570
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
572
if ((e = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
585
CHECK_GOTO(BN_div_reciprocal(d, c, a, recp, ctx));
regress/lib/libcrypto/bn/bn_test.c
605
CHECK_GOTO(BN_mul(e, d, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
621
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
628
test_mul(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
634
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
636
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
638
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
640
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
642
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
644
if ((e = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
655
CHECK_GOTO(BN_mul(c, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
666
CHECK_GOTO(BN_div(d, e, c, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
676
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
682
test_sqr(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
688
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
690
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
692
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
694
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
696
if ((e = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
702
CHECK_GOTO(BN_sqr(c, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
713
CHECK_GOTO(BN_div(d, e, c, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
727
CHECK_GOTO(BN_sqr(c, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
738
CHECK_GOTO(BN_mul(d, a, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
752
CHECK_GOTO(BN_sqr(c, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
763
CHECK_GOTO(BN_mul(d, a, a, ctx));
regress/lib/libcrypto/bn/bn_test.c
772
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
778
test_mont(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
785
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
787
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
789
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
791
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
793
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
795
if ((A = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
797
if ((B = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
799
if ((n = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
806
if (BN_MONT_CTX_set(mont, n, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
813
if (BN_MONT_CTX_set(mont, n, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
827
CHECK_GOTO(BN_MONT_CTX_set(mont, n, ctx));
regress/lib/libcrypto/bn/bn_test.c
829
CHECK_GOTO(BN_nnmod(a, a, n, ctx));
regress/lib/libcrypto/bn/bn_test.c
830
CHECK_GOTO(BN_nnmod(b, b, n, ctx));
regress/lib/libcrypto/bn/bn_test.c
832
CHECK_GOTO(BN_to_montgomery(A, a, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
833
CHECK_GOTO(BN_to_montgomery(B, b, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
835
CHECK_GOTO(BN_mod_mul_montgomery(c, A, B, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
836
CHECK_GOTO(BN_from_montgomery(A, c, mont, ctx));
regress/lib/libcrypto/bn/bn_test.c
850
CHECK_GOTO(BN_mod_mul(d, a, b, n, ctx));
regress/lib/libcrypto/bn/bn_test.c
860
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
867
test_mod(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
873
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
875
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
877
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
879
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
88
int test_add(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
881
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
883
if ((e = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
89
int test_sub(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
891
CHECK_GOTO(BN_mod(c, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
90
int test_lshift1(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
902
CHECK_GOTO(BN_div(d, e, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
91
int test_lshift(BIO *bp, BN_CTX *ctx, int use_lst);
regress/lib/libcrypto/bn/bn_test.c
912
BN_CTX_end(ctx);
regress/lib/libcrypto/bn/bn_test.c
918
test_mod_mul(BIO *bp, BN_CTX *ctx)
regress/lib/libcrypto/bn/bn_test.c
92
int test_rshift1(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
924
BN_CTX_start(ctx);
regress/lib/libcrypto/bn/bn_test.c
926
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
928
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
93
int test_rshift(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
930
if ((c = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
932
if ((d = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
934
if ((e = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/bn/bn_test.c
94
int test_div(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
940
if (BN_mod_mul(e, a, b, c, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
95
int test_div_word(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
953
if (!BN_mod_mul(e, a, b, c, ctx)) {
regress/lib/libcrypto/bn/bn_test.c
96
int test_div_reciprocal(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
97
int test_mul(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
98
int test_sqr(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
983
CHECK_GOTO(BN_mul(d, a, b, ctx));
regress/lib/libcrypto/bn/bn_test.c
985
CHECK_GOTO(BN_div(a, b, d, c, ctx));
regress/lib/libcrypto/bn/bn_test.c
99
int test_mont(BIO *bp, BN_CTX *ctx);
regress/lib/libcrypto/bn/bn_test.c
996
BN_CTX_end(ctx);
regress/lib/libcrypto/chacha/chachatest.c
239
ChaCha_ctx ctx;
regress/lib/libcrypto/chacha/chachatest.c
241
ChaCha_set_key(&ctx, tv->key, 256);
regress/lib/libcrypto/chacha/chachatest.c
242
ChaCha_set_iv(&ctx, tv->iv, NULL);
regress/lib/libcrypto/chacha/chachatest.c
243
ChaCha(&ctx, out, in, tv->len);
regress/lib/libcrypto/chacha/chachatest.c
251
ChaCha_ctx ctx;
regress/lib/libcrypto/chacha/chachatest.c
254
ChaCha_set_key(&ctx, tv->key, 256);
regress/lib/libcrypto/chacha/chachatest.c
255
ChaCha_set_iv(&ctx, tv->iv, NULL);
regress/lib/libcrypto/chacha/chachatest.c
259
ChaCha(&ctx, out, in, size);
regress/lib/libcrypto/chacha/chachatest.c
264
ChaCha(&ctx, out, in, len + 1);
regress/lib/libcrypto/chacha/chachatest.c
272
ChaCha_ctx ctx;
regress/lib/libcrypto/chacha/chachatest.c
275
ChaCha_set_key(&ctx, tv->key, 256);
regress/lib/libcrypto/chacha/chachatest.c
276
ChaCha_set_iv(&ctx, tv->iv, NULL);
regress/lib/libcrypto/chacha/chachatest.c
278
ChaCha(&ctx, out + i, in + i, 1);
regress/lib/libcrypto/ec/ec_arithmetic.c
127
BN_CTX *ctx = NULL;
regress/lib/libcrypto/ec/ec_arithmetic.c
132
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/ec/ec_arithmetic.c
139
if (!EC_GROUP_get_order(group, order, ctx))
regress/lib/libcrypto/ec/ec_arithmetic.c
156
if (!EC_POINT_mul(group, a, scalar, NULL, NULL, ctx))
regress/lib/libcrypto/ec/ec_arithmetic.c
158
if (!EC_POINT_mul(group, b, scalar, NULL, NULL, ctx))
regress/lib/libcrypto/ec/ec_arithmetic.c
169
bm->func(group, result, scalar, a, b, ctx);
regress/lib/libcrypto/ec/ec_arithmetic.c
183
BN_CTX_free(ctx);
regress/lib/libcrypto/ec/ec_arithmetic.c
33
const BIGNUM *scalar, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
regress/lib/libcrypto/ec/ec_arithmetic.c
35
if (!EC_POINT_add(group, result, a, b, ctx))
regress/lib/libcrypto/ec/ec_arithmetic.c
41
const BIGNUM *scalar, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
regress/lib/libcrypto/ec/ec_arithmetic.c
43
if (!EC_POINT_dbl(group, result, a, ctx))
regress/lib/libcrypto/ec/ec_arithmetic.c
49
const BIGNUM *scalar, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
regress/lib/libcrypto/ec/ec_arithmetic.c
51
if (!EC_POINT_mul(group, result, scalar, NULL, NULL, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
1068
BN_CTX_end(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1081
BN_CTX *ctx;
regress/lib/libcrypto/ec/ec_asn1_test.c
1084
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
1087
failed |= ec_group_non_builtin_curve(&wei25519, EC_GFp_mont_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1088
failed |= ec_group_non_builtin_curve(&wei25519, EC_GFp_simple_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1090
failed |= ec_group_non_builtin_curve(&wei25519_2, EC_GFp_mont_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1091
failed |= ec_group_non_builtin_curve(&wei25519_2, EC_GFp_simple_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1093
failed |= ec_group_non_builtin_curve(&wei25519_3, EC_GFp_mont_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1094
failed |= ec_group_non_builtin_curve(&wei25519_3, EC_GFp_simple_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1097
failed |= ec_group_non_builtin_curve(&wei25519_3_neg, EC_GFp_mont_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1098
failed |= ec_group_non_builtin_curve(&wei25519_3_neg, EC_GFp_simple_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1101
failed |= ec_group_non_builtin_curve(&secp256k1_m, EC_GFp_mont_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1102
failed |= ec_group_non_builtin_curve(&secp256k1_m, EC_GFp_simple_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1104
failed |= ec_group_non_builtin_curve(&bls12_377, EC_GFp_mont_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1105
failed |= ec_group_non_builtin_curve(&bls12_377, EC_GFp_simple_method(), ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1107
BN_CTX_free(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1113
ec_group_check_prime_order(EC_builtin_curve *curve, BN_CTX *ctx)
regress/lib/libcrypto/ec/ec_asn1_test.c
1123
BN_CTX_start(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1125
if ((order = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
1128
if (!EC_GROUP_get_order(group, order, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
1131
if ((rv = BN_is_prime_ex(order, 0, ctx, NULL)) != 1) {
regress/lib/libcrypto/ec/ec_asn1_test.c
1137
BN_CTX_end(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1146
BN_CTX *ctx = NULL;
regress/lib/libcrypto/ec/ec_asn1_test.c
1151
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
1160
failed |= ec_group_check_prime_order(&all_curves[curve_id], ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
1163
BN_CTX_free(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
2515
ec_group_check_seed(const EC_builtin_curve *curve, BN_CTX *ctx)
regress/lib/libcrypto/ec/ec_asn1_test.c
2527
BN_CTX_start(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
2529
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
2531
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
2533
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
2535
if ((r = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
2537
if ((pow2 = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
2539
if ((seed_bn = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
2541
if ((w = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
255
ec_group_simple_from_builtin(const EC_GROUP *group, int nid, BN_CTX *ctx)
regress/lib/libcrypto/ec/ec_asn1_test.c
2573
if (!EC_GROUP_get_curve(group, p, a, b, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
2588
if (!BN_mod(r, r, pow2, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
2606
if (!BN_mod_add(seed_bn, seed_bn, BN_value_one(), pow2, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
262
BN_CTX_start(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
2622
if (!BN_mod_sqr(b, b, p, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
2624
if (!BN_mod_mul(r, r, b, p, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
2628
if (!BN_mod_sqr(b, a, p, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
2630
if (!BN_mod_mul(a, a, b, p, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
264
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
2651
BN_CTX_end(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
266
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
2660
BN_CTX *ctx = NULL;
regress/lib/libcrypto/ec/ec_asn1_test.c
2665
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
2674
failed |= ec_group_check_seed(&all_curves[curve_id], ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
2677
BN_CTX_free(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
268
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
271
if ((x = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
273
if ((y = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
276
if ((order = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
278
if ((cofactor = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
281
if (!EC_GROUP_get_curve(group, p, a, b, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
283
if (!EC_GROUP_get_order(group, order, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
285
if (!EC_GROUP_get_cofactor(group, cofactor, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
289
if (!EC_POINT_get_affine_coordinates(group, generator, x, y, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
294
if (!EC_GROUP_set_curve(simple_group, p, a, b, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
301
x, BN_is_odd(y), ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
307
BN_CTX_end(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
398
ec_group_roundtrip_builtin_curve(const EC_builtin_curve *curve, BN_CTX *ctx)
regress/lib/libcrypto/ec/ec_asn1_test.c
412
ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
433
BN_CTX *ctx = NULL;
regress/lib/libcrypto/ec/ec_asn1_test.c
438
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
447
failed |= ec_group_roundtrip_builtin_curve(&all_curves[curve_id], ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
450
BN_CTX_free(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
816
BN_CTX *ctx)
regress/lib/libcrypto/ec/ec_asn1_test.c
823
BN_CTX_start(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
825
if ((p = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
827
if ((a = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
829
if ((b = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
832
if ((order = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
834
if ((x = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
836
if ((y = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
849
if (!EC_GROUP_set_curve(group, p, a, b, ctx))
regress/lib/libcrypto/ec/ec_asn1_test.c
862
if (!EC_POINT_set_affine_coordinates(group, generator, x, y, ctx)) {
regress/lib/libcrypto/ec/ec_asn1_test.c
881
BN_CTX_end(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
886
BN_CTX_end(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
895
ec_group_new(const struct curve *curve, const EC_METHOD *method, BN_CTX *ctx)
regress/lib/libcrypto/ec/ec_asn1_test.c
901
BN_CTX_start(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
910
if ((cofactor = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
912
if ((guessed_cofactor = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ec_asn1_test.c
918
if ((group = ec_group_from_curve_method(curve, method, ctx)) == NULL) {
regress/lib/libcrypto/ec/ec_asn1_test.c
924
if (!EC_GROUP_get_cofactor(group, guessed_cofactor, ctx)) {
regress/lib/libcrypto/ec/ec_asn1_test.c
939
if (!EC_GROUP_check(group, ctx)) {
regress/lib/libcrypto/ec/ec_asn1_test.c
947
BN_CTX_end(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
952
BN_CTX_end(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
961
BN_CTX *ctx)
regress/lib/libcrypto/ec/ec_asn1_test.c
973
BN_CTX_start(ctx);
regress/lib/libcrypto/ec/ec_asn1_test.c
975
if ((group = ec_group_new(curve, method, ctx)) == NULL)
regress/lib/libcrypto/ec/ectest.c
101
if ((n1 = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ectest.c
103
if ((n2 = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ectest.c
105
if ((order = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ec/ectest.c
109
if (!EC_GROUP_get_order(group, order, ctx))
regress/lib/libcrypto/ec/ectest.c
111
if (!EC_POINT_mul(group, Q, order, NULL, NULL, ctx))
regress/lib/libcrypto/ec/ectest.c
117
if (!EC_POINT_mul(group, Q, order, NULL, NULL, ctx))
regress/lib/libcrypto/ec/ectest.c
128
if (!EC_POINT_mul(group, Q, NULL, P, n1, ctx))
regress/lib/libcrypto/ec/ectest.c
130
if (0 != EC_POINT_cmp(group, Q, P, ctx))
regress/lib/libcrypto/ec/ectest.c
135
if (!EC_POINT_mul(group, Q, NULL, P, n2, ctx))
regress/lib/libcrypto/ec/ectest.c
137
if (0 != EC_POINT_cmp(group, Q, P, ctx))
regress/lib/libcrypto/ec/ectest.c
140
if (!BN_mul(n2, n1, n2, ctx))
regress/lib/libcrypto/ec/ectest.c
142
if (!EC_POINT_mul(group, Q, NULL, P, n2, ctx))
regress/lib/libcrypto/ec/ectest.c
144
if (0 != EC_POINT_cmp(group, Q, P, ctx))
regress/lib/libcrypto/ec/ectest.c
149
BN_CTX_end(ctx);
regress/lib/libcrypto/ec/ectest.c
155
BN_CTX *ctx = NULL;
regress/lib/libcrypto/ec/ectest.c
165
ctx = BN_CTX_new();
regress/lib/libcrypto/ec/ectest.c
166
if (!ctx)
regress/lib/libcrypto/ec/ectest.c
182
if ((group = EC_GROUP_new_curve_GFp(p, a, b, ctx)) == NULL)
regress/lib/libcrypto/ec/ectest.c
194
if (!EC_GROUP_get_curve(group, p, a, b, ctx))
regress/lib/libcrypto/ec/ectest.c
217
if (!EC_POINT_oct2point(group, Q, buf, 1, ctx))
regress/lib/libcrypto/ec/ectest.c
220
if (!EC_POINT_add(group, P, P, Q, ctx))
regress/lib/libcrypto/ec/ectest.c
233
if (!EC_POINT_set_compressed_coordinates(group, Q, x, 1, ctx))
regress/lib/libcrypto/ec/ectest.c
235
if (EC_POINT_is_on_curve(group, Q, ctx) <= 0) {
regress/lib/libcrypto/ec/ectest.c
236
if (!EC_POINT_get_affine_coordinates(group, Q, x, y, ctx))
regress/lib/libcrypto/ec/ectest.c
253
if (!EC_POINT_get_affine_coordinates(group, P, x, y, ctx))
regress/lib/libcrypto/ec/ectest.c
265
if (!EC_POINT_add(group, P, P, Q, ctx))
regress/lib/libcrypto/ec/ectest.c
276
if (!EC_POINT_add(group, P, Q, R, ctx))
regress/lib/libcrypto/ec/ectest.c
281
len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_COMPRESSED, buf, sizeof buf, ctx);
regress/lib/libcrypto/ec/ectest.c
284
if (!EC_POINT_oct2point(group, P, buf, len, ctx))
regress/lib/libcrypto/ec/ectest.c
286
if (0 != EC_POINT_cmp(group, P, Q, ctx))
regress/lib/libcrypto/ec/ectest.c
292
len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_UNCOMPRESSED, buf, sizeof buf, ctx);
regress/lib/libcrypto/ec/ectest.c
295
if (!EC_POINT_oct2point(group, P, buf, len, ctx))
regress/lib/libcrypto/ec/ectest.c
297
if (0 != EC_POINT_cmp(group, P, Q, ctx))
regress/lib/libcrypto/ec/ectest.c
303
len = EC_POINT_point2oct(group, Q, POINT_CONVERSION_HYBRID, buf, sizeof buf, ctx);
regress/lib/libcrypto/ec/ectest.c
306
if (!EC_POINT_oct2point(group, P, buf, len, ctx))
regress/lib/libcrypto/ec/ectest.c
308
if (0 != EC_POINT_cmp(group, P, Q, ctx))
regress/lib/libcrypto/ec/ectest.c
313
if (!EC_POINT_get_affine_coordinates(group, R, x, y, ctx))
regress/lib/libcrypto/ec/ectest.c
321
if (!EC_POINT_invert(group, P, ctx))
regress/lib/libcrypto/ec/ectest.c
323
if (0 != EC_POINT_cmp(group, P, R, ctx))
regress/lib/libcrypto/ec/ectest.c
332
if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL))
regress/lib/libcrypto/ec/ectest.c
338
if (!EC_GROUP_set_curve(group, p, a, b, ctx))
regress/lib/libcrypto/ec/ectest.c
345
if (!EC_POINT_set_affine_coordinates(group, P, x, y, ctx))
regress/lib/libcrypto/ec/ectest.c
347
if (EC_POINT_is_on_curve(group, P, ctx) <= 0)
regress/lib/libcrypto/ec/ectest.c
354
if (!EC_POINT_get_affine_coordinates(group, P, x, y, ctx))
regress/lib/libcrypto/ec/ectest.c
372
group_order_tests(group, ctx);
regress/lib/libcrypto/ec/ectest.c
381
if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL))
regress/lib/libcrypto/ec/ectest.c
387
if (!EC_GROUP_set_curve(group, p, a, b, ctx))
regress/lib/libcrypto/ec/ectest.c
392
if (!EC_POINT_set_compressed_coordinates(group, P, x, 1, ctx))
regress/lib/libcrypto/ec/ectest.c
394
if (EC_POINT_is_on_curve(group, P, ctx) <= 0)
regress/lib/libcrypto/ec/ectest.c
401
if (!EC_POINT_get_affine_coordinates(group, P, x, y, ctx))
regress/lib/libcrypto/ec/ectest.c
419
group_order_tests(group, ctx);
regress/lib/libcrypto/ec/ectest.c
428
if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL))
regress/lib/libcrypto/ec/ectest.c
434
if (!EC_GROUP_set_curve(group, p, a, b, ctx))
regress/lib/libcrypto/ec/ectest.c
439
if (!EC_POINT_set_compressed_coordinates(group, P, x, 0, ctx))
regress/lib/libcrypto/ec/ectest.c
441
if (EC_POINT_is_on_curve(group, P, ctx) <= 0)
regress/lib/libcrypto/ec/ectest.c
448
if (!EC_POINT_get_affine_coordinates(group, P, x, y, ctx))
regress/lib/libcrypto/ec/ectest.c
466
group_order_tests(group, ctx);
regress/lib/libcrypto/ec/ectest.c
475
if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL))
regress/lib/libcrypto/ec/ectest.c
481
if (!EC_GROUP_set_curve(group, p, a, b, ctx))
regress/lib/libcrypto/ec/ectest.c
486
if (!EC_POINT_set_compressed_coordinates(group, P, x, 1, ctx))
regress/lib/libcrypto/ec/ectest.c
488
if (EC_POINT_is_on_curve(group, P, ctx) <= 0)
regress/lib/libcrypto/ec/ectest.c
495
if (!EC_POINT_get_affine_coordinates(group, P, x, y, ctx))
regress/lib/libcrypto/ec/ectest.c
513
group_order_tests(group, ctx);
regress/lib/libcrypto/ec/ectest.c
522
if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL))
regress/lib/libcrypto/ec/ectest.c
528
if (!EC_GROUP_set_curve(group, p, a, b, ctx))
regress/lib/libcrypto/ec/ectest.c
533
if (!EC_POINT_set_compressed_coordinates(group, P, x, 1, ctx))
regress/lib/libcrypto/ec/ectest.c
535
if (EC_POINT_is_on_curve(group, P, ctx) <= 0)
regress/lib/libcrypto/ec/ectest.c
542
if (!EC_POINT_get_affine_coordinates(group, P, x, y, ctx))
regress/lib/libcrypto/ec/ectest.c
560
group_order_tests(group, ctx);
regress/lib/libcrypto/ec/ectest.c
570
if (1 != BN_is_prime_ex(p, BN_prime_checks, ctx, NULL))
regress/lib/libcrypto/ec/ectest.c
578
if (!EC_GROUP_set_curve(group, p, a, b, ctx))
regress/lib/libcrypto/ec/ectest.c
584
if (!EC_POINT_set_compressed_coordinates(group, P, x, 0, ctx))
regress/lib/libcrypto/ec/ectest.c
586
if (EC_POINT_is_on_curve(group, P, ctx) <= 0)
regress/lib/libcrypto/ec/ectest.c
594
if (!EC_POINT_get_affine_coordinates(group, P, x, y, ctx))
regress/lib/libcrypto/ec/ectest.c
613
group_order_tests(group, ctx);
regress/lib/libcrypto/ec/ectest.c
626
if (!EC_POINT_dbl(group, P, P, ctx))
regress/lib/libcrypto/ec/ectest.c
628
if (EC_POINT_is_on_curve(group, P, ctx) <= 0)
regress/lib/libcrypto/ec/ectest.c
631
if (!EC_POINT_invert(group, Q, ctx))
regress/lib/libcrypto/ec/ectest.c
634
if (!EC_POINT_add(group, R, P, Q, ctx))
regress/lib/libcrypto/ec/ectest.c
637
if (!EC_POINT_add(group, R, R, Q, ctx))
regress/lib/libcrypto/ec/ectest.c
643
if (ctx)
regress/lib/libcrypto/ec/ectest.c
644
BN_CTX_free(ctx);
regress/lib/libcrypto/ec/ectest.c
90
group_order_tests(EC_GROUP *group, BN_CTX *ctx)
regress/lib/libcrypto/ec/ectest.c
99
BN_CTX_start(ctx);
regress/lib/libcrypto/ecdh/ecc_cdh.c
2170
BN_CTX *ctx = NULL;
regress/lib/libcrypto/ecdh/ecc_cdh.c
2181
if ((ctx = BN_CTX_new()) == NULL)
regress/lib/libcrypto/ecdh/ecc_cdh.c
2184
BN_CTX_start(ctx);
regress/lib/libcrypto/ecdh/ecc_cdh.c
2186
if ((peer_x = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ecdh/ecc_cdh.c
2188
if ((peer_y = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ecdh/ecc_cdh.c
2190
if ((priv = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ecdh/ecc_cdh.c
2192
if ((pub_x = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ecdh/ecc_cdh.c
2194
if ((pub_y = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ecdh/ecc_cdh.c
2196
if ((shared = BN_CTX_get(ctx)) == NULL)
regress/lib/libcrypto/ecdh/ecc_cdh.c
2213
if (!EC_POINT_set_affine_coordinates(group, peer_pub, peer_x, peer_y, ctx))
regress/lib/libcrypto/ecdh/ecc_cdh.c
2262
BN_CTX_end(ctx);
regress/lib/libcrypto/ecdh/ecc_cdh.c
2263
BN_CTX_free(ctx);
regress/lib/libcrypto/evp/evp_test.c
471
EVP_CIPHER_CTX *ctx;
regress/lib/libcrypto/evp/evp_test.c
479
if ((ctx = EVP_CIPHER_CTX_new()) == NULL) {
regress/lib/libcrypto/evp/evp_test.c
484
if ((ret = EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL)) <= 0) {
regress/lib/libcrypto/evp/evp_test.c
489
if ((ret = EVP_CIPHER_CTX_iv_length(ctx)) != test->iv_len) {
regress/lib/libcrypto/evp/evp_test.c
494
if ((ret = EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN,
regress/lib/libcrypto/evp/evp_test.c
502
if ((ret = EVP_CIPHER_CTX_iv_length(ctx)) != test->setlen) {
regress/lib/libcrypto/evp/evp_test.c
512
EVP_CIPHER_CTX_free(ctx);
regress/lib/libcrypto/evp/evptest.c
138
EVP_CIPHER_CTX *ctx;
regress/lib/libcrypto/evp/evptest.c
158
if ((ctx = EVP_CIPHER_CTX_new()) == NULL) {
regress/lib/libcrypto/evp/evptest.c
163
EVP_CIPHER_CTX_set_flags(ctx, EVP_CIPHER_CTX_FLAG_WRAP_ALLOW);
regress/lib/libcrypto/evp/evptest.c
168
if (!EVP_EncryptInit_ex(ctx, c, NULL, key, eiv)) {
regress/lib/libcrypto/evp/evptest.c
173
EVP_CIPHER_CTX_set_padding(ctx, 0);
regress/lib/libcrypto/evp/evptest.c
175
if (!EVP_EncryptUpdate(ctx, out, &outl, plaintext, pn)) {
regress/lib/libcrypto/evp/evptest.c
180
if (!EVP_EncryptFinal_ex(ctx, out + outl, &outl2)) {
regress/lib/libcrypto/evp/evptest.c
204
if (!EVP_DecryptInit_ex(ctx, c,NULL, key, eiv)) {
regress/lib/libcrypto/evp/evptest.c
209
EVP_CIPHER_CTX_set_padding(ctx, 0);
regress/lib/libcrypto/evp/evptest.c
211
if (!EVP_DecryptUpdate(ctx, out, &outl, ciphertext, cn)) {
regress/lib/libcrypto/evp/evptest.c
216
if (!EVP_DecryptFinal_ex(ctx, out + outl, &outl2)) {
regress/lib/libcrypto/evp/evptest.c
236
EVP_CIPHER_CTX_free(ctx);
regress/lib/libcrypto/evp/evptest.c
263
EVP_MD_CTX *ctx;
regress/lib/libcrypto/evp/evptest.c
277
if ((ctx = EVP_MD_CTX_new()) == NULL) {
regress/lib/libcrypto/evp/evptest.c
282
if (!EVP_DigestInit_ex(ctx, d, NULL)) {
regress/lib/libcrypto/evp/evptest.c
287
if (!EVP_DigestUpdate(ctx, plaintext, pn)) {
regress/lib/libcrypto/evp/evptest.c
292
if (!EVP_DigestFinal_ex(ctx, md, &mdn)) {
regress/lib/libcrypto/evp/evptest.c
297
EVP_MD_CTX_free(ctx);
regress/lib/libcrypto/evp/evptest.c
298
ctx = NULL;
regress/lib/libcrypto/gcm128/gcm128test.c
854
GCM128_CONTEXT *ctx;
regress/lib/libcrypto/gcm128/gcm128test.c
872
if ((ctx = CRYPTO_gcm128_new(&key, (block128_f)AES_encrypt)) == NULL)
regress/lib/libcrypto/gcm128/gcm128test.c
875
CRYPTO_gcm128_setiv(ctx, tv->IV, tv->IV_len);
regress/lib/libcrypto/gcm128/gcm128test.c
877
CRYPTO_gcm128_aad(ctx, tv->A, tv->A_len);
regress/lib/libcrypto/gcm128/gcm128test.c
879
CRYPTO_gcm128_encrypt(ctx, tv->P, out, out_len);
regress/lib/libcrypto/gcm128/gcm128test.c
880
if (CRYPTO_gcm128_finish(ctx, tv->T, 16)) {
regress/lib/libcrypto/gcm128/gcm128test.c
892
CRYPTO_gcm128_setiv(ctx, tv->IV, tv->IV_len);
regress/lib/libcrypto/gcm128/gcm128test.c
894
CRYPTO_gcm128_aad(ctx, tv->A, tv->A_len);
regress/lib/libcrypto/gcm128/gcm128test.c
896
CRYPTO_gcm128_decrypt(ctx, tv->C, out, out_len);
regress/lib/libcrypto/gcm128/gcm128test.c
897
if (CRYPTO_gcm128_finish(ctx, tv->T, 16)) {
regress/lib/libcrypto/gcm128/gcm128test.c
910
CRYPTO_gcm128_release(ctx);
regress/lib/libcrypto/hmac/hmactest.c
145
HMAC_CTX *ctx = NULL, *ctx2 = NULL;
regress/lib/libcrypto/hmac/hmactest.c
169
if ((ctx = HMAC_CTX_new()) == NULL) {
regress/lib/libcrypto/hmac/hmactest.c
173
if (HMAC_Init_ex(ctx, NULL, 0, NULL, NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
178
if (HMAC_Update(ctx, test[4].data, test[4].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
183
if (HMAC_Init_ex(ctx, NULL, 0, EVP_sha1(), NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
188
if (HMAC_Update(ctx, test[4].data, test[4].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
195
HMAC_CTX_reset(ctx);
regress/lib/libcrypto/hmac/hmactest.c
196
if (HMAC_Init_ex(ctx, test[4].key, test[4].key_len, NULL, NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
201
if (HMAC_Update(ctx, test[4].data, test[4].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
206
if (HMAC_Init_ex(ctx, test[4].key, -1, EVP_sha1(), NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
211
if (!HMAC_Init_ex(ctx, test[4].key, test[4].key_len, EVP_sha1(), NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
216
if (!HMAC_Update(ctx, test[4].data, test[4].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
221
if (!HMAC_Final(ctx, buf, &len)) {
regress/lib/libcrypto/hmac/hmactest.c
233
if (HMAC_Init_ex(ctx, NULL, 0, EVP_sha256(), NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
238
if (!HMAC_Init_ex(ctx, test[4].key, test[4].key_len, EVP_sha256(), NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
243
if (!HMAC_Update(ctx, test[5].data, test[5].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
248
if (!HMAC_Final(ctx, buf, &len)) {
regress/lib/libcrypto/hmac/hmactest.c
260
if (!HMAC_Init_ex(ctx, test[6].key, test[6].key_len, NULL, NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
265
if (!HMAC_Update(ctx, test[6].data, test[6].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
270
if (!HMAC_Final(ctx, buf, &len)) {
regress/lib/libcrypto/hmac/hmactest.c
284
HMAC_CTX_reset(ctx);
regress/lib/libcrypto/hmac/hmactest.c
285
if (!HMAC_Init_ex(ctx, test[7].key, test[7].key_len, EVP_sha1(), NULL)) {
regress/lib/libcrypto/hmac/hmactest.c
290
if (!HMAC_Update(ctx, test[7].data, test[7].data_len)) {
regress/lib/libcrypto/hmac/hmactest.c
299
if (!HMAC_CTX_copy(ctx2, ctx)) {
regress/lib/libcrypto/hmac/hmactest.c
318
HMAC_CTX_free(ctx);
regress/lib/libcrypto/md/md_test.c
297
MD5_CTX ctx;
regress/lib/libcrypto/md/md_test.c
314
MD5_Init(&ctx);
regress/lib/libcrypto/md/md_test.c
317
if (!MD5_Update(&ctx, in, in_len)) {
regress/lib/libcrypto/md/md_test.c
322
if (!MD5_Final(out, &ctx)) {
regress/lib/libcrypto/md/md_test.c
331
if (ctx.Nh != 0x1 || ctx.Nl != 0x2000)
regress/lib/libcrypto/mlkem/mlkem_tests.c
152
decap_run_test_case(void *ctx)
regress/lib/libcrypto/mlkem/mlkem_tests.c
154
return MlkemDecapFileTest(ctx);
regress/lib/libcrypto/mlkem/mlkem_tests.c
253
nist_decap_run_test_case(void *ctx)
regress/lib/libcrypto/mlkem/mlkem_tests.c
255
return MlkemNistDecapFileTest(ctx);
regress/lib/libcrypto/mlkem/mlkem_tests.c
336
encap_init(void *ctx, void *parse_ctx)
regress/lib/libcrypto/mlkem/mlkem_tests.c
338
struct encap_ctx *encap = ctx;
regress/lib/libcrypto/mlkem/mlkem_tests.c
346
encap_finish(void *ctx)
regress/lib/libcrypto/mlkem/mlkem_tests.c
348
(void)ctx;
regress/lib/libcrypto/mlkem/mlkem_tests.c
414
encap_run_test_case(void *ctx)
regress/lib/libcrypto/mlkem/mlkem_tests.c
416
return MlkemEncapFileTest(ctx);
regress/lib/libcrypto/mlkem/mlkem_tests.c
474
keygen_init(void *ctx, void *parse_ctx)
regress/lib/libcrypto/mlkem/mlkem_tests.c
476
struct keygen_ctx *keygen = ctx;
regress/lib/libcrypto/mlkem/mlkem_tests.c
484
keygen_finish(void *ctx)
regress/lib/libcrypto/mlkem/mlkem_tests.c
486
(void)ctx;
regress/lib/libcrypto/mlkem/mlkem_tests.c
544
keygen_run_test_case(void *ctx)
regress/lib/libcrypto/mlkem/mlkem_tests.c
546
return MlkemKeygenFileTest(ctx);
regress/lib/libcrypto/mlkem/mlkem_tests.c
655
nist_keygen_run_test_case(void *ctx)
regress/lib/libcrypto/mlkem/mlkem_tests.c
657
return MlkemNistKeygenFileTest(ctx);
regress/lib/libcrypto/mlkem/mlkem_tests.c
81
decap_init(void *ctx, void *parse_ctx)
regress/lib/libcrypto/mlkem/mlkem_tests.c
83
struct decap_ctx *decap = ctx;
regress/lib/libcrypto/mlkem/mlkem_tests.c
91
decap_finish(void *ctx)
regress/lib/libcrypto/mlkem/mlkem_tests.c
93
(void)ctx;
regress/lib/libcrypto/mlkem/parse_test_file.c
181
void *ctx;
regress/lib/libcrypto/mlkem/parse_test_file.c
638
return tctx->run_test_case(p->ctx);
regress/lib/libcrypto/mlkem/parse_test_file.c
648
tctx->finish(p->ctx);
regress/lib/libcrypto/mlkem/parse_test_file.c
649
if (!tctx->init(p->ctx, p))
regress/lib/libcrypto/mlkem/parse_test_file.c
693
void *ctx)
regress/lib/libcrypto/mlkem/parse_test_file.c
711
p->ctx = ctx;
regress/lib/libcrypto/mlkem/parse_test_file.c
712
if (!tctx->init(p->ctx, p))
regress/lib/libcrypto/mlkem/parse_test_file.c
742
tctx->finish(p->ctx);
regress/lib/libcrypto/mlkem/parse_test_file.c
752
parse_test_file(const char *fn, const struct test_parse *tctx, void *ctx)
regress/lib/libcrypto/mlkem/parse_test_file.c
757
parse_init(&p, fn, tctx, ctx);
regress/lib/libcrypto/mlkem/parse_test_file.h
53
int (*init)(void *ctx, void *parse_ctx);
regress/lib/libcrypto/mlkem/parse_test_file.h
54
void (*finish)(void *ctx);
regress/lib/libcrypto/mlkem/parse_test_file.h
56
int (*run_test_case)(void *ctx);
regress/lib/libcrypto/mlkem/parse_test_file.h
59
int parse_test_file(const char *fn, const struct test_parse *lctx, void *ctx);
regress/lib/libcrypto/mlkem/parse_test_file.h
71
void parse_info(struct parse *ctx, const char *fmt, ...)
regress/lib/libcrypto/mlkem/parse_test_file.h
74
void parse_errx(struct parse *ctx, const char *fmt, ...)
regress/lib/libcrypto/ocsp/ocsp_test.c
104
ssl = SSL_new(ctx);
regress/lib/libcrypto/ocsp/ocsp_test.c
149
st = SSL_CTX_get_cert_store(ctx);
regress/lib/libcrypto/ocsp/ocsp_test.c
83
SSL_CTX *ctx;
regress/lib/libcrypto/ocsp/ocsp_test.c
88
ctx = SSL_CTX_new(SSLv23_client_method());
regress/lib/libcrypto/ocsp/ocsp_test.c
90
if (!SSL_CTX_load_verify_locations(ctx, cafile, NULL)) {
regress/lib/libcrypto/pkcs7/pkcs7test.c
96
x509_store_callback(int ok, X509_STORE_CTX *ctx)
regress/lib/libcrypto/poly1305/poly1305test.c
109
poly1305_context ctx;
regress/lib/libcrypto/poly1305/poly1305test.c
124
CRYPTO_poly1305_init(&ctx, nacl_key);
regress/lib/libcrypto/poly1305/poly1305test.c
125
CRYPTO_poly1305_update(&ctx, nacl_msg + 0, 32);
regress/lib/libcrypto/poly1305/poly1305test.c
126
CRYPTO_poly1305_update(&ctx, nacl_msg + 32, 64);
regress/lib/libcrypto/poly1305/poly1305test.c
127
CRYPTO_poly1305_update(&ctx, nacl_msg + 96, 16);
regress/lib/libcrypto/poly1305/poly1305test.c
128
CRYPTO_poly1305_update(&ctx, nacl_msg + 112, 8);
regress/lib/libcrypto/poly1305/poly1305test.c
129
CRYPTO_poly1305_update(&ctx, nacl_msg + 120, 4);
regress/lib/libcrypto/poly1305/poly1305test.c
130
CRYPTO_poly1305_update(&ctx, nacl_msg + 124, 2);
regress/lib/libcrypto/poly1305/poly1305test.c
131
CRYPTO_poly1305_update(&ctx, nacl_msg + 126, 1);
regress/lib/libcrypto/poly1305/poly1305test.c
132
CRYPTO_poly1305_update(&ctx, nacl_msg + 127, 1);
regress/lib/libcrypto/poly1305/poly1305test.c
133
CRYPTO_poly1305_update(&ctx, nacl_msg + 128, 1);
regress/lib/libcrypto/poly1305/poly1305test.c
134
CRYPTO_poly1305_update(&ctx, nacl_msg + 129, 1);
regress/lib/libcrypto/poly1305/poly1305test.c
135
CRYPTO_poly1305_update(&ctx, nacl_msg + 130, 1);
regress/lib/libcrypto/poly1305/poly1305test.c
136
CRYPTO_poly1305_finish(&ctx, mac);
regress/lib/libcrypto/poly1305/poly1305test.c
21
poly1305_context ctx;
regress/lib/libcrypto/poly1305/poly1305test.c
22
CRYPTO_poly1305_init(&ctx, key);
regress/lib/libcrypto/poly1305/poly1305test.c
23
CRYPTO_poly1305_update(&ctx, m, bytes);
regress/lib/libcrypto/poly1305/poly1305test.c
24
CRYPTO_poly1305_finish(&ctx, mac);
regress/lib/libcrypto/rc2/rc2_test.c
678
EVP_CIPHER_CTX *ctx;
regress/lib/libcrypto/rc2/rc2_test.c
684
if ((ctx = EVP_CIPHER_CTX_new()) == NULL) {
regress/lib/libcrypto/rc2/rc2_test.c
693
if (!EVP_EncryptInit(ctx, cipher, NULL, NULL)) {
regress/lib/libcrypto/rc2/rc2_test.c
699
if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_SET_RC2_KEY_BITS,
regress/lib/libcrypto/rc2/rc2_test.c
706
if (!EVP_CIPHER_CTX_set_key_length(ctx, rt->key_len)) {
regress/lib/libcrypto/rc2/rc2_test.c
713
if (!EVP_CIPHER_CTX_set_padding(ctx, rt->padding)) {
regress/lib/libcrypto/rc2/rc2_test.c
720
if (!EVP_EncryptInit(ctx, NULL, rt->key, rt->iv)) {
regress/lib/libcrypto/rc2/rc2_test.c
731
if (!EVP_EncryptUpdate(ctx, out + total_len, &out_len,
regress/lib/libcrypto/rc2/rc2_test.c
743
if (!EVP_EncryptFinal_ex(ctx, out + out_len, &out_len)) {
regress/lib/libcrypto/rc2/rc2_test.c
750
if (!EVP_CIPHER_CTX_reset(ctx)) {
regress/lib/libcrypto/rc2/rc2_test.c
773
if (!EVP_DecryptInit(ctx, cipher, NULL, NULL)) {
regress/lib/libcrypto/rc2/rc2_test.c
779
if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_SET_RC2_KEY_BITS,
regress/lib/libcrypto/rc2/rc2_test.c
786
if (!EVP_CIPHER_CTX_set_key_length(ctx, rt->key_len)) {
regress/lib/libcrypto/rc2/rc2_test.c
793
if (!EVP_CIPHER_CTX_set_padding(ctx, rt->padding)) {
regress/lib/libcrypto/rc2/rc2_test.c
800
if (!EVP_DecryptInit(ctx, NULL, rt->key, rt->iv)) {
regress/lib/libcrypto/rc2/rc2_test.c
811
if (!EVP_DecryptUpdate(ctx, out + total_len, &out_len,
regress/lib/libcrypto/rc2/rc2_test.c
823
if (!EVP_DecryptFinal_ex(ctx, out + total_len, &out_len)) {
regress/lib/libcrypto/rc2/rc2_test.c
830
if (!EVP_CIPHER_CTX_reset(ctx)) {
regress/lib/libcrypto/rc2/rc2_test.c
853
EVP_CIPHER_CTX_free(ctx);
regress/lib/libcrypto/rc4/rc4_test.c
323
EVP_CIPHER_CTX *ctx = NULL;
regress/lib/libcrypto/rc4/rc4_test.c
331
if ((ctx = EVP_CIPHER_CTX_new()) == NULL) {
regress/lib/libcrypto/rc4/rc4_test.c
374
if (!EVP_EncryptInit(ctx, cipher, rt->key, NULL)) {
regress/lib/libcrypto/rc4/rc4_test.c
384
if (!EVP_EncryptUpdate(ctx, out + total_len, &out_len,
regress/lib/libcrypto/rc4/rc4_test.c
395
if (!EVP_EncryptFinal_ex(ctx, out + total_len, &out_len)) {
regress/lib/libcrypto/rc4/rc4_test.c
401
if (!EVP_CIPHER_CTX_reset(ctx)) {
regress/lib/libcrypto/rc4/rc4_test.c
420
if (!EVP_DecryptInit(ctx, cipher, rt->key, NULL)) {
regress/lib/libcrypto/rc4/rc4_test.c
430
if (!EVP_DecryptUpdate(ctx, out + total_len, &out_len,
regress/lib/libcrypto/rc4/rc4_test.c
441
if (!EVP_DecryptFinal_ex(ctx, out + total_len, &out_len)) {
regress/lib/libcrypto/rc4/rc4_test.c
447
if (!EVP_CIPHER_CTX_reset(ctx)) {
regress/lib/libcrypto/rc4/rc4_test.c
467
EVP_CIPHER_CTX_free(ctx);
regress/lib/libcrypto/sm3/sm3test.c
69
EVP_MD_CTX *ctx;
regress/lib/libcrypto/sm3/sm3test.c
74
if ((ctx = EVP_MD_CTX_new()) == NULL)
regress/lib/libcrypto/sm3/sm3test.c
78
if (!EVP_DigestInit(ctx, EVP_sm3()))
regress/lib/libcrypto/sm3/sm3test.c
80
if (!EVP_DigestUpdate(ctx, sm3_input[i], strlen(sm3_input[i])))
regress/lib/libcrypto/sm3/sm3test.c
82
if (!EVP_DigestFinal(ctx, digest, NULL))
regress/lib/libcrypto/sm3/sm3test.c
96
EVP_MD_CTX_free(ctx);
regress/lib/libcrypto/x509/verify.c
184
struct x509_verify_ctx *ctx;
regress/lib/libcrypto/x509/verify.c
205
if ((ctx = x509_verify_ctx_new(roots)) == NULL)
regress/lib/libcrypto/x509/verify.c
207
if (!x509_verify_ctx_set_intermediates(ctx, bundle))
regress/lib/libcrypto/x509/verify.c
210
if ((*chains = x509_verify(ctx, leaf, NULL)) == 0) {
regress/lib/libcrypto/x509/verify.c
212
x509_verify_ctx_error_depth(ctx),
regress/lib/libcrypto/x509/verify.c
213
x509_verify_ctx_error_string(ctx));
regress/lib/libcrypto/x509/verify.c
222
chain = x509_verify_ctx_chain(ctx, c);
regress/lib/libcrypto/x509/verify.c
236
x509_verify_ctx_free(ctx);
regress/lib/libradius/test10.c
13
MD5_CTX ctx;
regress/lib/libradius/test10.c
27
MD5_Init(&ctx);
regress/lib/libradius/test10.c
28
MD5_Update(&ctx, responsedata, 4);
regress/lib/libradius/test10.c
29
MD5_Update(&ctx, radius_get_authenticator_retval(request), 16);
regress/lib/libradius/test10.c
30
MD5_Update(&ctx, responsedata + 20, sizeof(responsedata) - 20);
regress/lib/libradius/test10.c
31
MD5_Update(&ctx, "sharedsecret", 12);
regress/lib/libradius/test10.c
32
MD5_Final(responsedata + 4, &ctx);
regress/lib/libradius/test11.c
12
MD5_CTX ctx;
regress/lib/libradius/test11.c
25
MD5_Init(&ctx);
regress/lib/libradius/test11.c
26
MD5_Update(&ctx, packetdata, sizeof(packetdata));
regress/lib/libradius/test11.c
27
MD5_Update(&ctx, "sharedsecret", 12);
regress/lib/libradius/test11.c
28
MD5_Final(packetdata + 4, &ctx);
regress/lib/libradius/test23.c
13
HMAC_CTX *ctx;
regress/lib/libradius/test23.c
45
ctx = HMAC_CTX_new();
regress/lib/libradius/test23.c
46
HMAC_Init_ex(ctx, "sharedsecret", 12, EVP_md5(), NULL);
regress/lib/libradius/test23.c
47
HMAC_Update(ctx, responsedata, 4);
regress/lib/libradius/test23.c
48
HMAC_Update(ctx, packetdata + 4, 16);
regress/lib/libradius/test23.c
49
HMAC_Update(ctx, responsedata + 20, sizeof(responsedata) - 20);
regress/lib/libradius/test23.c
50
HMAC_Final(ctx, responsedata + 22, NULL);
regress/lib/libradius/test23.c
51
HMAC_CTX_free(ctx);
regress/lib/libssl/ciphers/cipherstest.c
1124
SSL_CTX *ctx = NULL;
regress/lib/libssl/ciphers/cipherstest.c
1138
if ((ctx = SSL_CTX_new(TLS_method())) == NULL)
regress/lib/libssl/ciphers/cipherstest.c
1142
if (!SSL_CTX_set_ciphersuites(ctx, cst->ctx_ciphersuites))
regress/lib/libssl/ciphers/cipherstest.c
1146
if (!SSL_CTX_set_cipher_list(ctx, cst->ctx_rulestr))
regress/lib/libssl/ciphers/cipherstest.c
1150
if (!SSL_CTX_set_ciphersuites(ctx, cst->ctx_ciphersuites))
regress/lib/libssl/ciphers/cipherstest.c
1156
if ((ssl = SSL_new(ctx)) == NULL)
regress/lib/libssl/ciphers/cipherstest.c
1189
SSL_CTX_free(ctx);
regress/lib/libssl/dtls/dtlstest.c
105
struct bio_packet_monkey_ctx *ctx = bio->ptr;
regress/lib/libssl/dtls/dtlstest.c
107
if (ctx->delayed_msg == NULL)
regress/lib/libssl/dtls/dtlstest.c
113
hexdump(ctx->delayed_msg, ctx->delayed_msg_len);
regress/lib/libssl/dtls/dtlstest.c
115
BIO_write(bio->next_bio, ctx->delayed_msg, ctx->delayed_msg_len);
regress/lib/libssl/dtls/dtlstest.c
117
free(ctx->delayed_msg);
regress/lib/libssl/dtls/dtlstest.c
118
ctx->delayed_msg = NULL;
regress/lib/libssl/dtls/dtlstest.c
126
struct bio_packet_monkey_ctx *ctx;
regress/lib/libssl/dtls/dtlstest.c
128
ctx = bio->ptr;
regress/lib/libssl/dtls/dtlstest.c
134
ctx->delay_count = num;
regress/lib/libssl/dtls/dtlstest.c
143
ctx->delay_mask |= 1 << ((unsigned int)num - 1);
regress/lib/libssl/dtls/dtlstest.c
149
ctx->drop_mask |= 1 << ((unsigned int)num - 1);
regress/lib/libssl/dtls/dtlstest.c
155
ctx->drop_rand = (unsigned int)num;
regress/lib/libssl/dtls/dtlstest.c
168
struct bio_packet_monkey_ctx *ctx = bio->ptr;
regress/lib/libssl/dtls/dtlstest.c
171
if (ctx == NULL || bio->next_bio == NULL)
regress/lib/libssl/dtls/dtlstest.c
193
struct bio_packet_monkey_ctx *ctx = bio->ptr;
regress/lib/libssl/dtls/dtlstest.c
198
if (ctx == NULL || bio->next_bio == NULL)
regress/lib/libssl/dtls/dtlstest.c
201
if (ctx->delayed_msg != NULL && ctx->delay_count > 0)
regress/lib/libssl/dtls/dtlstest.c
202
ctx->delay_count--;
regress/lib/libssl/dtls/dtlstest.c
204
if (ctx->delayed_msg != NULL && ctx->delay_count == 0) {
regress/lib/libssl/dtls/dtlstest.c
208
hexdump(ctx->delayed_msg, ctx->delayed_msg_len);
regress/lib/libssl/dtls/dtlstest.c
210
ret = BIO_write(bio->next_bio, ctx->delayed_msg,
regress/lib/libssl/dtls/dtlstest.c
211
ctx->delayed_msg_len);
regress/lib/libssl/dtls/dtlstest.c
219
free(ctx->delayed_msg);
regress/lib/libssl/dtls/dtlstest.c
220
ctx->delayed_msg = NULL;
regress/lib/libssl/dtls/dtlstest.c
223
if (ctx->delay_mask > 0) {
regress/lib/libssl/dtls/dtlstest.c
224
delay = ctx->delay_mask & 1;
regress/lib/libssl/dtls/dtlstest.c
225
ctx->delay_mask >>= 1;
regress/lib/libssl/dtls/dtlstest.c
227
if (ctx->drop_rand > 0) {
regress/lib/libssl/dtls/dtlstest.c
228
drop = arc4random_uniform(ctx->drop_rand) == 0;
regress/lib/libssl/dtls/dtlstest.c
229
} else if (ctx->drop_mask > 0) {
regress/lib/libssl/dtls/dtlstest.c
230
drop = ctx->drop_mask & 1;
regress/lib/libssl/dtls/dtlstest.c
231
ctx->drop_mask >>= 1;
regress/lib/libssl/dtls/dtlstest.c
247
if (ctx->delayed_msg != NULL)
regress/lib/libssl/dtls/dtlstest.c
249
if ((ctx->delayed_msg = calloc(1, in_len)) == NULL)
regress/lib/libssl/dtls/dtlstest.c
251
memcpy(ctx->delayed_msg, in, in_len);
regress/lib/libssl/dtls/dtlstest.c
252
ctx->delayed_msg_len = in_len;
regress/lib/libssl/dtls/dtlstest.c
74
struct bio_packet_monkey_ctx *ctx;
regress/lib/libssl/dtls/dtlstest.c
76
if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
regress/lib/libssl/dtls/dtlstest.c
82
bio->ptr = ctx;
regress/lib/libssl/dtls/dtlstest.c
90
struct bio_packet_monkey_ctx *ctx;
regress/lib/libssl/dtls/dtlstest.c
95
ctx = bio->ptr;
regress/lib/libssl/dtls/dtlstest.c
96
free(ctx->delayed_msg);
regress/lib/libssl/dtls/dtlstest.c
97
free(ctx);
regress/lib/libssl/interop/client.c
144
ctx = SSL_CTX_new(method);
regress/lib/libssl/interop/client.c
145
if (ctx == NULL)
regress/lib/libssl/interop/client.c
150
if (SSL_CTX_set_min_proto_version(ctx, version) != 1)
regress/lib/libssl/interop/client.c
152
if (SSL_CTX_set_max_proto_version(ctx, version) != 1)
regress/lib/libssl/interop/client.c
159
if (SSL_CTX_use_certificate_file(ctx, crt,
regress/lib/libssl/interop/client.c
162
if (SSL_CTX_use_PrivateKey_file(ctx, key,
regress/lib/libssl/interop/client.c
165
if (SSL_CTX_check_private_key(ctx) <= 0)
regress/lib/libssl/interop/client.c
171
if (SSL_CTX_load_verify_locations(ctx, ca, NULL) <= 0)
regress/lib/libssl/interop/client.c
174
SSL_CTX_set_verify(ctx, verify ? SSL_VERIFY_PEER : SSL_VERIFY_NONE,
regress/lib/libssl/interop/client.c
178
SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_CLIENT);
regress/lib/libssl/interop/client.c
182
if (SSL_CTX_set_cipher_list(ctx, ciphers) <= 0)
regress/lib/libssl/interop/client.c
192
ssl = SSL_new(ctx);
regress/lib/libssl/interop/client.c
221
ssl = SSL_new(ctx);
regress/lib/libssl/interop/client.c
280
SSL_CTX_free(ctx);
regress/lib/libssl/interop/client.c
46
SSL_CTX *ctx;
regress/lib/libssl/interop/server.c
151
ctx = SSL_CTX_new(method);
regress/lib/libssl/interop/server.c
152
if (ctx == NULL)
regress/lib/libssl/interop/server.c
157
if (SSL_CTX_set_min_proto_version(ctx, version) != 1)
regress/lib/libssl/interop/server.c
159
if (SSL_CTX_set_max_proto_version(ctx, version) != 1)
regress/lib/libssl/interop/server.c
166
if (SSL_CTX_set_dh_auto(ctx, 1) <= 0)
regress/lib/libssl/interop/server.c
180
if (SSL_CTX_set_tmp_dh(ctx, dh) <= 0)
regress/lib/libssl/interop/server.c
186
if (SSL_CTX_use_certificate_file(ctx, crt, SSL_FILETYPE_PEM) <= 0)
regress/lib/libssl/interop/server.c
188
if (SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM) <= 0)
regress/lib/libssl/interop/server.c
190
if (SSL_CTX_check_private_key(ctx) <= 0)
regress/lib/libssl/interop/server.c
200
SSL_CTX_set_client_CA_list(ctx, x509stack);
regress/lib/libssl/interop/server.c
201
if (SSL_CTX_load_verify_locations(ctx, ca, NULL) <= 0)
regress/lib/libssl/interop/server.c
204
SSL_CTX_set_verify(ctx,
regress/lib/libssl/interop/server.c
213
SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_SERVER);
regress/lib/libssl/interop/server.c
215
if (SSL_CTX_set_session_id_context(ctx,
regress/lib/libssl/interop/server.c
221
if (SSL_CTX_set_cipher_list(ctx, ciphers) <= 0)
regress/lib/libssl/interop/server.c
228
ssl = SSL_new(ctx);
regress/lib/libssl/interop/server.c
267
ssl = SSL_new(ctx);
regress/lib/libssl/interop/server.c
316
SSL_CTX_free(ctx);
regress/lib/libssl/interop/server.c
47
SSL_CTX *ctx;
regress/lib/libssl/ssl/ssltest.c
1373
verify_callback(int ok, X509_STORE_CTX *ctx)
regress/lib/libssl/ssl/ssltest.c
1379
xs = X509_STORE_CTX_get_current_cert(ctx);
regress/lib/libssl/ssl/ssltest.c
1381
error = X509_STORE_CTX_get_error(ctx);
regress/lib/libssl/ssl/ssltest.c
1382
error_depth = X509_STORE_CTX_get_error_depth(ctx);
regress/lib/libssl/ssl/ssltest.c
1408
app_verify_callback(X509_STORE_CTX *ctx, void *arg)
regress/lib/libssl/ssl/ssltest.c
1414
xs = X509_STORE_CTX_get0_cert(ctx);
regress/lib/libssl/ssl/ssltest.c
1418
(void *)ctx, (void *)xs);
regress/lib/libssl/ssl/ssltest.c
1423
X509_STORE_CTX_get_error_depth(ctx), buf);
regress/lib/libssl/ssl/ssltest.c
182
static int verify_callback(int ok, X509_STORE_CTX *ctx);
regress/lib/libssl/ssl/ssltest.c
183
static int app_verify_callback(X509_STORE_CTX *ctx, void *arg);
regress/lib/libssl/unit/cipher_list.c
185
SSL_CTX *ctx = NULL;
regress/lib/libssl/unit/cipher_list.c
192
CHECK_GOTO((ctx = SSL_CTX_new(TLSv1_2_client_method())) != NULL);
regress/lib/libssl/unit/cipher_list.c
193
CHECK_GOTO((s = SSL_new(ctx)) != NULL);
regress/lib/libssl/unit/cipher_list.c
224
SSL_CTX_free(ctx);
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
207
SSL_CTX *ctx;
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
209
if ((ctx = SSL_CTX_new(TLS_method())) == NULL) {
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
213
if (!SSL_CTX_set_max_proto_version(ctx, config->max_version)) {
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
217
if (!SSL_CTX_set_min_proto_version(ctx, config->min_version)) {
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
221
if (!SSL_CTX_set_cipher_list(ctx, config->ciphers)) {
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
227
if (!SSL_CTX_use_certificate_file(ctx, server_cert,
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
233
if (!SSL_CTX_use_PrivateKey_file(ctx, server_key,
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
241
return ctx;
regress/lib/libssl/unit/ssl_get_shared_ciphers.c
244
SSL_CTX_free(ctx);
regress/lib/libssl/unit/ssl_set_alpn_protos.c
116
SSL_CTX *ctx;
regress/lib/libssl/unit/ssl_set_alpn_protos.c
121
if ((ctx = SSL_CTX_new(TLS_client_method())) == NULL)
regress/lib/libssl/unit/ssl_set_alpn_protos.c
124
ret = SSL_CTX_set_alpn_protos(ctx, tc->protocols, tc->protocols_len);
regress/lib/libssl/unit/ssl_set_alpn_protos.c
131
if ((ssl = SSL_new(ctx)) == NULL)
regress/lib/libssl/unit/ssl_set_alpn_protos.c
141
SSL_CTX_free(ctx);
regress/lib/libssl/unit/ssl_set_alpn_protos.c
150
SSL_CTX *ctx;
regress/lib/libssl/unit/ssl_set_alpn_protos.c
158
if ((ctx = SSL_CTX_new(TLS_client_method())) == NULL)
regress/lib/libssl/unit/ssl_set_alpn_protos.c
161
if (SSL_CTX_set_alpn_protos(ctx, valid, sizeof(valid)) != 0) {
regress/lib/libssl/unit/ssl_set_alpn_protos.c
165
if (SSL_CTX_set_alpn_protos(ctx, NULL, 0) != 0) {
regress/lib/libssl/unit/ssl_set_alpn_protos.c
169
if (SSL_CTX_set_alpn_protos(ctx, valid, 0) != 0) {
regress/lib/libssl/unit/ssl_set_alpn_protos.c
173
if (SSL_CTX_set_alpn_protos(ctx, NULL, 43) != 0) {
regress/lib/libssl/unit/ssl_set_alpn_protos.c
178
if ((ssl = SSL_new(ctx)) == NULL)
regress/lib/libssl/unit/ssl_set_alpn_protos.c
198
SSL_CTX_free(ctx);
regress/lib/libssl/unit/tls_ext_alpn.c
344
SSL_CTX_set_alpn_select_cb(s->ctx, dummy_alpn_cb, NULL);
regress/lib/libssl/unit/tls_ext_alpn.c
348
CHECK(s->ctx->alpn_select_cb != NULL);
regress/lib/libssl/unit/tls_ext_alpn.c
376
SSL_CTX_set_alpn_select_cb(s->ctx, dummy_alpn_cb, NULL);
regress/lib/libssl/unit/tls_ext_alpn.c
380
CHECK(s->ctx->alpn_select_cb != NULL);
regress/lib/libssl/unit/tls_ext_alpn.c
419
SSL_CTX *ctx = NULL;
regress/lib/libssl/unit/tls_ext_alpn.c
425
CHECK_GOTO((ctx = SSL_CTX_new(TLSv1_2_client_method())) != NULL);
regress/lib/libssl/unit/tls_ext_alpn.c
426
CHECK_GOTO((s = SSL_new(ctx)) != NULL);
regress/lib/libssl/unit/tls_ext_alpn.c
436
SSL_CTX_free(ctx);
regress/lib/libssl/verify/verify.c
142
SSL_CTX *ctx;
regress/lib/libssl/verify/verify.c
144
if ((ctx = SSL_CTX_new(TLS_method())) == NULL) {
regress/lib/libssl/verify/verify.c
150
if (!SSL_CTX_use_certificate_file(ctx, config->cert,
regress/lib/libssl/verify/verify.c
156
if (config->key != NULL && !SSL_CTX_use_PrivateKey_file(ctx,
regress/lib/libssl/verify/verify.c
165
if (!SSL_CTX_load_verify_locations(ctx, config->ca_file, NULL)) {
regress/lib/libssl/verify/verify.c
172
return ctx;
regress/lib/libssl/verify/verify.c
175
SSL_CTX_free(ctx);
regress/lib/libtls/signer/signertest.c
282
do_tls_handshake(char *name, struct tls *ctx)
regress/lib/libtls/signer/signertest.c
286
rv = tls_handshake(ctx);
regress/lib/libtls/signer/signertest.c
292
errx(1, "%s handshake failed: %s", name, tls_error(ctx));
regress/lib/libtls/tls/tlstest.c
105
client_write(struct tls *ctx, const void *buf, size_t buflen, void *cb_arg)
regress/lib/libtls/tls/tlstest.c
112
server_read(struct tls *ctx, void *buf, size_t buflen, void *cb_arg)
regress/lib/libtls/tls/tlstest.c
119
server_write(struct tls *ctx, const void *buf, size_t buflen, void *cb_arg)
regress/lib/libtls/tls/tlstest.c
126
do_tls_handshake(char *name, struct tls *ctx)
regress/lib/libtls/tls/tlstest.c
130
rv = tls_handshake(ctx);
regress/lib/libtls/tls/tlstest.c
136
errx(1, "%s handshake failed: %s", name, tls_error(ctx));
regress/lib/libtls/tls/tlstest.c
140
do_tls_close(char *name, struct tls *ctx)
regress/lib/libtls/tls/tlstest.c
144
rv = tls_close(ctx);
regress/lib/libtls/tls/tlstest.c
150
errx(1, "%s close failed: %s", name, tls_error(ctx));
regress/lib/libtls/tls/tlstest.c
98
client_read(struct tls *ctx, void *buf, size_t buflen, void *cb_arg)
regress/lib/libtls/verify/verifytest.c
25
extern int tls_check_name(struct tls *ctx, X509 *cert, const char *name,
regress/sbin/iked/test_helper/test_helper.c
174
set_onerror_func(test_onerror_func_t *f, void *ctx)
regress/sbin/iked/test_helper/test_helper.c
177
onerror_ctx = ctx;
regress/sbin/iked/test_helper/test_helper.h
41
void set_onerror_func(test_onerror_func_t *f, void *ctx);
regress/sbin/isakmpd/hmac/hmactest.c
75
hash->Update(hash->ctx, data, dlen);
regress/sys/arch/amd64/ddb/disasm.c
14
struct db_disasm_context *ctx = NULL;
regress/sys/arch/amd64/ddb/disasm.c
25
ctx = &c;
regress/sys/arch/amd64/ddb/disasm.c
27
ctx->raw.buf = instr;
regress/sys/arch/amd64/ddb/disasm.c
28
ctx->raw.len = ninstr;
regress/sys/arch/amd64/ddb/disasm.c
29
ctx->act.len = 0;
regress/sys/arch/amd64/ddb/disasm.c
30
ctx->act.siz = sizeof(ctx->act.buf);
regress/sys/arch/amd64/ddb/disasm.c
34
act = ctx->act.buf;
regress/sys/arch/amd64/ddb/disasm.c
35
actlen = ctx->act.len;
regress/sys/arch/amd64/ddb/disasm.c
47
if (ctx->raw.len > 0) {
regress/sys/arch/amd64/ddb/disasm.c
49
ctx->raw.len);
regress/sys/arch/amd64/ddb/disasm.h
22
extern struct db_disasm_context *ctx;
regress/sys/arch/amd64/ddb/stubs.c
63
if (ctx->raw.len == 0)
regress/sys/arch/amd64/ddb/stubs.c
66
c = ctx->raw.buf[0];
regress/sys/arch/amd64/ddb/stubs.c
67
ctx->raw.buf++;
regress/sys/arch/amd64/ddb/stubs.c
68
ctx->raw.len--;
regress/sys/arch/amd64/ddb/stubs.c
80
n = snprintf(&ctx->act.buf[ctx->act.len], ctx->act.siz, " ");
regress/sys/arch/amd64/ddb/stubs.c
85
n = vsnprintf(&ctx->act.buf[ctx->act.len], ctx->act.siz, fmt,
regress/sys/arch/amd64/ddb/stubs.c
89
if (n < 0 || (size_t)n >= ctx->act.siz)
regress/sys/arch/amd64/ddb/stubs.c
91
ctx->act.len += n;
regress/sys/arch/amd64/ddb/stubs.c
92
ctx->act.siz -= n;
regress/sys/arch/amd64/seves_mmio/seves_mmio.c
32
handler(int sig, siginfo_t *sip, void *ctx)
regress/sys/arch/amd64/vmcall/vmcall.c
25
handler(int sig, siginfo_t *sip, void *ctx)
regress/sys/arch/amd64/vmmcall/vmmcall.c
25
handler(int sig, siginfo_t *sip, void *ctx)
regress/sys/arch/i386/f00f/f00f.c
28
handler(int sig, siginfo_t *sip, void *ctx)
regress/sys/crypto/aes/aestest.c
46
AES_CTX ctx;
regress/sys/crypto/aes/aestest.c
49
memset(&ctx, 0, sizeof(ctx));
regress/sys/crypto/aes/aestest.c
50
error = AES_Setkey(&ctx, key, klen);
regress/sys/crypto/aes/aestest.c
54
AES_Encrypt(&ctx, in, out);
regress/sys/crypto/aes/aestest.c
56
AES_Decrypt(&ctx, in, out);
regress/sys/crypto/aesctr/aesctr.c
168
struct aes_ctr_ctx ctx;
regress/sys/crypto/aesctr/aesctr.c
172
error = aes_ctr_setkey(&ctx, (u_int8_t *)key, klen);
regress/sys/crypto/aesctr/aesctr.c
175
aes_ctr_reinit((caddr_t)&ctx, (u_int8_t *)iv);
regress/sys/crypto/aesctr/aesctr.c
179
aes_ctr_crypt(&ctx, block);
regress/sys/crypto/aesxts/aes_xts.c
1753
struct aes_xts_ctx ctx;
regress/sys/crypto/aesxts/aes_xts.c
1756
if (aes_xts_setkey(&ctx, key, klen) < 0)
regress/sys/crypto/aesxts/aes_xts.c
1759
aes_xts_reinit((caddr_t)&ctx, (u_int8_t *)&seqno);
regress/sys/crypto/aesxts/aes_xts.c
1765
aes_xts_encrypt((caddr_t)&ctx, block);
regress/sys/crypto/aesxts/aes_xts.c
1767
aes_xts_decrypt((caddr_t)&ctx, block);
regress/sys/crypto/chachapoly/chachapoly_test.c
289
struct chacha20_ctx ctx;
regress/sys/crypto/chachapoly/chachapoly_test.c
293
memset(&ctx, 0, sizeof ctx);
regress/sys/crypto/chachapoly/chachapoly_test.c
295
if (chacha20_setkey(&ctx, key, CHACHA20_KEYSIZE + CHACHA20_SALT))
regress/sys/crypto/chachapoly/chachapoly_test.c
297
chacha20_reinit((caddr_t)&ctx, iv);
regress/sys/crypto/chachapoly/chachapoly_test.c
300
chacha20_crypt((caddr_t)&ctx, plain);
regress/sys/crypto/chachapoly/chachapoly_test.c
309
chacha20_crypt((caddr_t)&ctx, blk);
regress/sys/crypto/chachapoly/chachapoly_test.c
320
CHACHA20_POLY1305_CTX ctx;
regress/sys/crypto/chachapoly/chachapoly_test.c
325
Chacha20_Poly1305_Init(&ctx);
regress/sys/crypto/chachapoly/chachapoly_test.c
327
Chacha20_Poly1305_Setkey(&ctx, key, klen);
regress/sys/crypto/chachapoly/chachapoly_test.c
329
Chacha20_Poly1305_Reinit(&ctx, iv, ivlen);
regress/sys/crypto/chachapoly/chachapoly_test.c
334
Chacha20_Poly1305_Update(&ctx, blk, POLY1305_BLOCK_LEN);
regress/sys/crypto/chachapoly/chachapoly_test.c
339
Chacha20_Poly1305_Update(&ctx, in + i, dlen);
regress/sys/crypto/chachapoly/chachapoly_test.c
347
Chacha20_Poly1305_Update(&ctx, blk, POLY1305_BLOCK_LEN);
regress/sys/crypto/chachapoly/chachapoly_test.c
349
Chacha20_Poly1305_Final(out, &ctx);
regress/sys/crypto/cmac/cmac_test.c
100
AES_CMAC_Update(&ctx, M, 64);
regress/sys/crypto/cmac/cmac_test.c
101
AES_CMAC_Final(T, &ctx);
regress/sys/crypto/cmac/cmac_test.c
106
AES_CMAC_SetKey(&ctx, key);
regress/sys/crypto/cmac/cmac_test.c
107
AES_CMAC_Init(&ctx);
regress/sys/crypto/cmac/cmac_test.c
108
AES_CMAC_Update(&ctx, M, 40);
regress/sys/crypto/cmac/cmac_test.c
109
AES_CMAC_Update(&ctx, M + 40, 24);
regress/sys/crypto/cmac/cmac_test.c
110
AES_CMAC_Final(T, &ctx);
regress/sys/crypto/cmac/cmac_test.c
115
AES_CMAC_SetKey(&ctx, key);
regress/sys/crypto/cmac/cmac_test.c
116
AES_CMAC_Init(&ctx);
regress/sys/crypto/cmac/cmac_test.c
117
AES_CMAC_Update(&ctx, M, 16);
regress/sys/crypto/cmac/cmac_test.c
118
AES_CMAC_Update(&ctx, M + 16, 16);
regress/sys/crypto/cmac/cmac_test.c
119
AES_CMAC_Update(&ctx, M + 32, 10);
regress/sys/crypto/cmac/cmac_test.c
120
AES_CMAC_Update(&ctx, M + 42, 0);
regress/sys/crypto/cmac/cmac_test.c
121
AES_CMAC_Update(&ctx, M + 42, 14);
regress/sys/crypto/cmac/cmac_test.c
122
AES_CMAC_Update(&ctx, M + 56, 8);
regress/sys/crypto/cmac/cmac_test.c
123
AES_CMAC_Final(T, &ctx);
regress/sys/crypto/cmac/cmac_test.c
65
AES_CMAC_CTX ctx;
regress/sys/crypto/cmac/cmac_test.c
73
AES_CMAC_SetKey(&ctx, key);
regress/sys/crypto/cmac/cmac_test.c
74
AES_CMAC_Init(&ctx);
regress/sys/crypto/cmac/cmac_test.c
75
AES_CMAC_Update(&ctx, M, 0);
regress/sys/crypto/cmac/cmac_test.c
76
AES_CMAC_Final(T, &ctx);
regress/sys/crypto/cmac/cmac_test.c
82
AES_CMAC_SetKey(&ctx, key);
regress/sys/crypto/cmac/cmac_test.c
83
AES_CMAC_Init(&ctx);
regress/sys/crypto/cmac/cmac_test.c
84
AES_CMAC_Update(&ctx, M, 16);
regress/sys/crypto/cmac/cmac_test.c
85
AES_CMAC_Final(T, &ctx);
regress/sys/crypto/cmac/cmac_test.c
90
AES_CMAC_SetKey(&ctx, key);
regress/sys/crypto/cmac/cmac_test.c
91
AES_CMAC_Init(&ctx);
regress/sys/crypto/cmac/cmac_test.c
92
AES_CMAC_Update(&ctx, M, 40);
regress/sys/crypto/cmac/cmac_test.c
93
AES_CMAC_Final(T, &ctx);
regress/sys/crypto/cmac/cmac_test.c
98
AES_CMAC_SetKey(&ctx, key);
regress/sys/crypto/cmac/cmac_test.c
99
AES_CMAC_Init(&ctx);
regress/sys/crypto/enc/des3.c
61
u_int8_t ctx[384];
regress/sys/crypto/enc/des3.c
65
memset(ctx, 0, sizeof(ctx));
regress/sys/crypto/enc/des3.c
66
error = des3_setkey(ctx, key, klen);
regress/sys/crypto/enc/des3.c
75
des3_encrypt(ctx, block);
regress/sys/crypto/enc/des3.c
80
des3_decrypt(ctx, block);
regress/sys/crypto/gmac/gmac_test.c
642
AES_GMAC_CTX ctx;
regress/sys/crypto/gmac/gmac_test.c
647
AES_GMAC_Init(&ctx);
regress/sys/crypto/gmac/gmac_test.c
649
AES_GMAC_Setkey(&ctx, key, klen);
regress/sys/crypto/gmac/gmac_test.c
651
AES_GMAC_Reinit(&ctx, iv, ivlen);
regress/sys/crypto/gmac/gmac_test.c
656
AES_GMAC_Update(&ctx, blk, GMAC_BLOCK_LEN);
regress/sys/crypto/gmac/gmac_test.c
661
AES_GMAC_Update(&ctx, in + i, dlen);
regress/sys/crypto/gmac/gmac_test.c
669
AES_GMAC_Update(&ctx, blk, 16);
regress/sys/crypto/gmac/gmac_test.c
671
AES_GMAC_Final(out, &ctx);
regress/sys/crypto/key_wrap/key_wrap_test.c
39
aes_key_wrap_ctx ctx;
regress/sys/crypto/key_wrap/key_wrap_test.c
53
aes_key_wrap_set_key(&ctx, kek, kek_len);
regress/sys/crypto/key_wrap/key_wrap_test.c
54
aes_key_wrap(&ctx, data, data_len / 8, output);
regress/sys/crypto/key_wrap/key_wrap_test.c
56
aes_key_unwrap(&ctx, output, output, data_len / 8);
regress/sys/dev/kcov/kcov.c
106
else if (frac > ctx.c_bufsize)
regress/sys/dev/kcov/kcov.c
108
ctx.c_bufsize /= frac;
regress/sys/dev/kcov/kcov.c
115
ctx.c_mode = KCOV_MODE_TRACE_PC;
regress/sys/dev/kcov/kcov.c
117
ctx.c_mode = KCOV_MODE_TRACE_CMP;
regress/sys/dev/kcov/kcov.c
134
ctx.c_fd = kcov_open();
regress/sys/dev/kcov/kcov.c
135
close(ctx.c_fd);
regress/sys/dev/kcov/kcov.c
144
if (ctx.c_mode == 0 || argc != 1)
regress/sys/dev/kcov/kcov.c
152
ctx.c_fd = kcov_open();
regress/sys/dev/kcov/kcov.c
153
if (ioctl(ctx.c_fd, KIOSETBUFSIZE, &ctx.c_bufsize) == -1)
regress/sys/dev/kcov/kcov.c
155
cover = mmap(NULL, ctx.c_bufsize * sizeof(unsigned long),
regress/sys/dev/kcov/kcov.c
156
PROT_READ | PROT_WRITE, MAP_SHARED, ctx.c_fd, 0);
regress/sys/dev/kcov/kcov.c
161
error = tests[i].fn(&ctx);
regress/sys/dev/kcov/kcov.c
163
dump(cover, ctx.c_mode);
regress/sys/dev/kcov/kcov.c
164
if (check_coverage(cover, ctx.c_mode, ctx.c_bufsize, tests[i].coverage))
regress/sys/dev/kcov/kcov.c
167
if (munmap(cover, ctx.c_bufsize * sizeof(unsigned long)) == -1)
regress/sys/dev/kcov/kcov.c
169
if (ctx.c_fd != -1) {
regress/sys/dev/kcov/kcov.c
170
if (close(ctx.c_fd) == -1)
regress/sys/dev/kcov/kcov.c
280
test_close(struct context *ctx)
regress/sys/dev/kcov/kcov.c
293
test_coverage(struct context *ctx)
regress/sys/dev/kcov/kcov.c
295
kcov_enable(ctx->c_fd, ctx->c_mode);
regress/sys/dev/kcov/kcov.c
297
kcov_disable(ctx->c_fd);
regress/sys/dev/kcov/kcov.c
304
struct context *ctx = arg;
regress/sys/dev/kcov/kcov.c
306
close(ctx->c_fd);
regress/sys/dev/kcov/kcov.c
314
test_dying(struct context *ctx)
regress/sys/dev/kcov/kcov.c
319
kcov_enable(ctx->c_fd, ctx->c_mode);
regress/sys/dev/kcov/kcov.c
321
if ((error = pthread_create(&th, NULL, closer, (void *)ctx)))
regress/sys/dev/kcov/kcov.c
327
if (close(ctx->c_fd) == -1) {
regress/sys/dev/kcov/kcov.c
334
ctx->c_fd = -1;
regress/sys/dev/kcov/kcov.c
343
test_exec(struct context *ctx)
regress/sys/dev/kcov/kcov.c
352
kcov_enable(ctx->c_fd, ctx->c_mode);
regress/sys/dev/kcov/kcov.c
368
kcov_enable(ctx->c_fd, ctx->c_mode);
regress/sys/dev/kcov/kcov.c
369
kcov_disable(ctx->c_fd);
regress/sys/dev/kcov/kcov.c
379
test_fdsend(struct context *ctx)
regress/sys/dev/kcov/kcov.c
399
*(int *)CMSG_DATA(cmsg) = ctx->c_fd;
regress/sys/dev/kcov/kcov.c
412
test_fork(struct context *ctx)
regress/sys/dev/kcov/kcov.c
421
kcov_enable(ctx->c_fd, ctx->c_mode);
regress/sys/dev/kcov/kcov.c
437
kcov_enable(ctx->c_fd, ctx->c_mode);
regress/sys/dev/kcov/kcov.c
438
kcov_disable(ctx->c_fd);
regress/sys/dev/kcov/kcov.c
447
test_open(struct context *ctx)
regress/sys/dev/kcov/kcov.c
454
if (ioctl(fd, KIOSETBUFSIZE, &ctx->c_bufsize) == -1)
regress/sys/dev/kcov/kcov.c
456
cover = mmap(NULL, ctx->c_bufsize * sizeof(unsigned long),
regress/sys/dev/kcov/kcov.c
461
kcov_enable(fd, ctx->c_mode);
regress/sys/dev/kcov/kcov.c
465
error = check_coverage(cover, ctx->c_mode, ctx->c_bufsize, 1);
regress/sys/dev/kcov/kcov.c
467
if (munmap(cover, ctx->c_bufsize * sizeof(unsigned long)))
regress/sys/dev/kcov/kcov.c
479
test_remote(struct context *ctx)
regress/sys/dev/kcov/kcov.c
489
if (ioctl(ctx->c_fd, KIOREMOTEATTACH, &remote) == -1)
regress/sys/dev/kcov/kcov.c
491
kcov_enable(ctx->c_fd, ctx->c_mode);
regress/sys/dev/kcov/kcov.c
514
kcov_disable(ctx->c_fd);
regress/sys/dev/kcov/kcov.c
523
test_remote_close(struct context *ctx)
regress/sys/dev/kcov/kcov.c
530
if (ioctl(ctx->c_fd, KIOREMOTEATTACH, &remote) == -1)
regress/sys/dev/kcov/kcov.c
532
kcov_enable(ctx->c_fd, ctx->c_mode);
regress/sys/dev/kcov/kcov.c
533
if (close(ctx->c_fd) == -1)
regress/sys/dev/kcov/kcov.c
535
ctx->c_fd = kcov_open();
regress/sys/dev/kcov/kcov.c
547
test_remote_interrupt(struct context *ctx)
regress/sys/dev/kcov/kcov.c
555
if (ioctl(ctx->c_fd, KIOREMOTEATTACH, &remote) == -1)
regress/sys/dev/kcov/kcov.c
557
kcov_enable(ctx->c_fd, ctx->c_mode);
regress/sys/dev/kcov/kcov.c
562
kcov_disable(ctx->c_fd);
regress/sys/dev/kcov/kcov.c
571
test_state(struct context *ctx)
regress/sys/dev/kcov/kcov.c
573
if (ioctl(ctx->c_fd, KIOENABLE, &ctx->c_mode) == -1) {
regress/sys/dev/kcov/kcov.c
577
if (ioctl(ctx->c_fd, KIODISABLE) == -1) {
regress/sys/dev/kcov/kcov.c
581
if (ioctl(ctx->c_fd, KIOSETBUFSIZE, 0) != -1) {
regress/sys/dev/kcov/kcov.c
585
if (ioctl(ctx->c_fd, KIODISABLE) != -1) {
regress/sys/dev/kcov/kcov.c
590
kcov_enable(ctx->c_fd, ctx->c_mode);
regress/sys/dev/kcov/kcov.c
591
if (ioctl(ctx->c_fd, KIOENABLE, &ctx->c_mode) != -1) {
regress/sys/dev/kcov/kcov.c
595
if (ioctl(ctx->c_fd, KIOSETBUFSIZE, 0) != -1) {
regress/sys/dev/kcov/kcov.c
599
kcov_disable(ctx->c_fd);
regress/sys/dev/kcov/kcov.c
86
struct context ctx;
regress/sys/dev/kcov/kcov.c
97
memset(&ctx, 0, sizeof(ctx));
regress/sys/dev/kcov/kcov.c
98
ctx.c_bufsize = 256 << 10;
regress/sys/kern/noexec/noexec.c
191
struct context *ctx = arg;
regress/sys/kern/noexec/noexec.c
210
while ((ch = getopt(ctx->argc, ctx->argv, "TDBMHSmps:")) != -1) {
regress/sys/kern/noexec/noexec.c
320
ctx->argc -= optind;
regress/sys/kern/noexec/noexec.c
321
ctx->argv += optind;
regress/sys/kern/noexec/noexec.c
323
if (ctx->argc > 0)
regress/sys/kern/noexec/noexec.c
347
struct context ctx = {.argc = argc, .argv = argv};
regress/sys/kern/noexec/noexec.c
351
if ((error = pthread_create(&th, NULL, worker, (void *)&ctx)))
regress/sys/kern/pipe/test-close.c
89
const struct context *ctx = arg;
regress/sys/kern/pipe/test-close.c
91
while (*ctx->c_alive)
regress/sys/kern/pipe/test-close.c
92
close(ctx->c_fd);
regress/sys/kern/pipe/test-kqueue.c
101
ctx_setup(&ctx, KQUEUE_READ_EOF, 0);
regress/sys/kern/pipe/test-kqueue.c
102
ctx_thread_start(&ctx);
regress/sys/kern/pipe/test-kqueue.c
104
while (ctx_thread_alive(&ctx)) {
regress/sys/kern/pipe/test-kqueue.c
105
if (ctx.c_pipe[1] == -1)
regress/sys/kern/pipe/test-kqueue.c
108
close(ctx.c_pipe[1]);
regress/sys/kern/pipe/test-kqueue.c
109
ctx.c_pipe[1] = -1;
regress/sys/kern/pipe/test-kqueue.c
112
ctx_teardown(&ctx);
regress/sys/kern/pipe/test-kqueue.c
123
struct context ctx;
regress/sys/kern/pipe/test-kqueue.c
126
ctx_setup(&ctx, KQUEUE_WRITE, 0);
regress/sys/kern/pipe/test-kqueue.c
128
n = write(ctx.c_pipe[1], ctx.c_buf, ctx.c_bufsiz);
regress/sys/kern/pipe/test-kqueue.c
131
if ((size_t)n != ctx.c_bufsiz)
regress/sys/kern/pipe/test-kqueue.c
132
errx(1, "write: %ld != %zu", n, ctx.c_bufsiz);
regress/sys/kern/pipe/test-kqueue.c
134
ctx_thread_start(&ctx);
regress/sys/kern/pipe/test-kqueue.c
136
while (ctx_thread_alive(&ctx)) {
regress/sys/kern/pipe/test-kqueue.c
139
n = read(ctx.c_pipe[0], &c, 1);
regress/sys/kern/pipe/test-kqueue.c
148
ctx_teardown(&ctx);
regress/sys/kern/pipe/test-kqueue.c
164
ctx_setup(struct context *ctx, enum kqueue_mode mode, int flags)
regress/sys/kern/pipe/test-kqueue.c
168
ctx->c_mode = mode;
regress/sys/kern/pipe/test-kqueue.c
169
ctx->c_alive = 1;
regress/sys/kern/pipe/test-kqueue.c
172
if (pipe2(ctx->c_pipe, flags) == -1)
regress/sys/kern/pipe/test-kqueue.c
175
if (pipe(ctx->c_pipe) == -1)
regress/sys/kern/pipe/test-kqueue.c
179
ctx->c_kq = kqueue();
regress/sys/kern/pipe/test-kqueue.c
180
if (ctx->c_kq == -1)
regress/sys/kern/pipe/test-kqueue.c
183
ctx->c_bufsiz = PIPE_SIZE;
regress/sys/kern/pipe/test-kqueue.c
184
ctx->c_buf = malloc(ctx->c_bufsiz);
regress/sys/kern/pipe/test-kqueue.c
185
if (ctx->c_buf == NULL)
regress/sys/kern/pipe/test-kqueue.c
188
error = pthread_mutex_init(&ctx->c_mtx, NULL);
regress/sys/kern/pipe/test-kqueue.c
194
ctx_teardown(struct context *ctx)
regress/sys/kern/pipe/test-kqueue.c
198
error = pthread_join(ctx->c_th, NULL);
regress/sys/kern/pipe/test-kqueue.c
202
error = pthread_mutex_destroy(&ctx->c_mtx);
regress/sys/kern/pipe/test-kqueue.c
206
free(ctx->c_buf);
regress/sys/kern/pipe/test-kqueue.c
208
close(ctx->c_pipe[0]);
regress/sys/kern/pipe/test-kqueue.c
209
close(ctx->c_pipe[1]);
regress/sys/kern/pipe/test-kqueue.c
210
close(ctx->c_kq);
regress/sys/kern/pipe/test-kqueue.c
214
ctx_thread_alive(struct context *ctx)
regress/sys/kern/pipe/test-kqueue.c
218
ctx_lock(ctx);
regress/sys/kern/pipe/test-kqueue.c
219
alive = ctx->c_alive;
regress/sys/kern/pipe/test-kqueue.c
220
ctx_unlock(ctx);
regress/sys/kern/pipe/test-kqueue.c
225
ctx_thread_start(struct context *ctx)
regress/sys/kern/pipe/test-kqueue.c
229
error = pthread_create(&ctx->c_th, NULL, kqueue_thread, ctx);
regress/sys/kern/pipe/test-kqueue.c
235
ctx_lock(struct context *ctx)
regress/sys/kern/pipe/test-kqueue.c
239
error = pthread_mutex_lock(&ctx->c_mtx);
regress/sys/kern/pipe/test-kqueue.c
245
ctx_unlock(struct context *ctx)
regress/sys/kern/pipe/test-kqueue.c
249
error = pthread_mutex_unlock(&ctx->c_mtx);
regress/sys/kern/pipe/test-kqueue.c
257
struct context *ctx = arg;
regress/sys/kern/pipe/test-kqueue.c
261
switch (ctx->c_mode) {
regress/sys/kern/pipe/test-kqueue.c
264
fd = ctx->c_pipe[0];
regress/sys/kern/pipe/test-kqueue.c
269
fd = ctx->c_pipe[1];
regress/sys/kern/pipe/test-kqueue.c
275
nevents = kevent(ctx->c_kq, &kev, 1, NULL, 0, NULL);
regress/sys/kern/pipe/test-kqueue.c
278
nevents = kevent(ctx->c_kq, NULL, 0, &kev, 1, NULL);
regress/sys/kern/pipe/test-kqueue.c
289
switch (ctx->c_mode) {
regress/sys/kern/pipe/test-kqueue.c
299
ctx_lock(ctx);
regress/sys/kern/pipe/test-kqueue.c
300
ctx->c_alive = 0;
regress/sys/kern/pipe/test-kqueue.c
301
ctx_unlock(ctx);
regress/sys/kern/pipe/test-kqueue.c
68
struct context ctx;
regress/sys/kern/pipe/test-kqueue.c
70
ctx_setup(&ctx, KQUEUE_READ, O_NONBLOCK);
regress/sys/kern/pipe/test-kqueue.c
71
ctx_thread_start(&ctx);
regress/sys/kern/pipe/test-kqueue.c
73
while (ctx_thread_alive(&ctx)) {
regress/sys/kern/pipe/test-kqueue.c
76
n = write(ctx.c_pipe[1], &ctx.c_buf[0], 1);
regress/sys/kern/pipe/test-kqueue.c
88
ctx_teardown(&ctx);
regress/sys/kern/pipe/test-kqueue.c
99
struct context ctx;
regress/sys/kern/pipe/test-run-down.c
103
ctx_teardown(struct context *ctx)
regress/sys/kern/pipe/test-run-down.c
107
if (ctx->c_pipe[0] != -1)
regress/sys/kern/pipe/test-run-down.c
108
close(ctx->c_pipe[0]);
regress/sys/kern/pipe/test-run-down.c
109
ctx->c_pipe[0] = -1;
regress/sys/kern/pipe/test-run-down.c
110
if (ctx->c_pipe[1] != -1)
regress/sys/kern/pipe/test-run-down.c
111
close(ctx->c_pipe[1]);
regress/sys/kern/pipe/test-run-down.c
112
ctx->c_pipe[1] = -1;
regress/sys/kern/pipe/test-run-down.c
114
free(ctx->c_buf);
regress/sys/kern/pipe/test-run-down.c
116
error = pthread_cond_destroy(&ctx->c_cv);
regress/sys/kern/pipe/test-run-down.c
120
error = pthread_mutex_destroy(&ctx->c_mtx);
regress/sys/kern/pipe/test-run-down.c
126
ctx_lock(struct context *ctx)
regress/sys/kern/pipe/test-run-down.c
130
error = pthread_mutex_lock(&ctx->c_mtx);
regress/sys/kern/pipe/test-run-down.c
136
ctx_unlock(struct context *ctx)
regress/sys/kern/pipe/test-run-down.c
140
error = pthread_mutex_unlock(&ctx->c_mtx);
regress/sys/kern/pipe/test-run-down.c
148
struct context ctx;
regress/sys/kern/pipe/test-run-down.c
152
ctx_setup(&ctx, bufsiz);
regress/sys/kern/pipe/test-run-down.c
154
error = pthread_create(&th, NULL, write_thread, &ctx);
regress/sys/kern/pipe/test-run-down.c
158
ctx_lock(&ctx);
regress/sys/kern/pipe/test-run-down.c
160
if (ctx.c_nsyscalls > 0)
regress/sys/kern/pipe/test-run-down.c
163
error = pthread_cond_wait(&ctx.c_cv, &ctx.c_mtx);
regress/sys/kern/pipe/test-run-down.c
167
ctx_unlock(&ctx);
regress/sys/kern/pipe/test-run-down.c
170
close(ctx.c_pipe[0]);
regress/sys/kern/pipe/test-run-down.c
171
ctx.c_pipe[0] = -1;
regress/sys/kern/pipe/test-run-down.c
180
ctx_teardown(&ctx);
regress/sys/kern/pipe/test-run-down.c
188
struct context *ctx = arg;
regress/sys/kern/pipe/test-run-down.c
194
n = write(ctx->c_pipe[1], ctx->c_buf, ctx->c_bufsiz);
regress/sys/kern/pipe/test-run-down.c
201
ctx_lock(ctx);
regress/sys/kern/pipe/test-run-down.c
202
ctx->c_nsyscalls++;
regress/sys/kern/pipe/test-run-down.c
203
ctx_unlock(ctx);
regress/sys/kern/pipe/test-run-down.c
205
error = pthread_cond_signal(&ctx->c_cv);
regress/sys/kern/pipe/test-run-down.c
80
ctx_setup(struct context *ctx, size_t bufsiz)
regress/sys/kern/pipe/test-run-down.c
84
if (pipe(ctx->c_pipe) == -1)
regress/sys/kern/pipe/test-run-down.c
87
ctx->c_buf = malloc(bufsiz);
regress/sys/kern/pipe/test-run-down.c
88
if (ctx->c_buf == NULL)
regress/sys/kern/pipe/test-run-down.c
90
ctx->c_bufsiz = bufsiz;
regress/sys/kern/pipe/test-run-down.c
91
ctx->c_nsyscalls = 0;
regress/sys/kern/pipe/test-run-down.c
93
error = pthread_cond_init(&ctx->c_cv, NULL);
regress/sys/kern/pipe/test-run-down.c
97
error = pthread_mutex_init(&ctx->c_mtx, NULL);
regress/sys/kern/pipe/test-thundering-herd.c
100
ctx.c_bufsiz = ctx.c_read ? 1 : BIG_PIPE_SIZE;
regress/sys/kern/pipe/test-thundering-herd.c
101
ctx.c_buf = malloc(ctx.c_bufsiz);
regress/sys/kern/pipe/test-thundering-herd.c
102
if (ctx.c_buf == NULL)
regress/sys/kern/pipe/test-thundering-herd.c
106
ctx.c_id = i + 1;
regress/sys/kern/pipe/test-thundering-herd.c
107
pids[i] = block_proc(&ctx);
regress/sys/kern/pipe/test-thundering-herd.c
114
if (ctx.c_read)
regress/sys/kern/pipe/test-thundering-herd.c
115
n = write(ctx.c_pipe[1], &c, 1);
regress/sys/kern/pipe/test-thundering-herd.c
117
n = read(ctx.c_pipe[0], &c, 1);
regress/sys/kern/pipe/test-thundering-herd.c
119
err(1, "%s", ctx.c_ident);
regress/sys/kern/pipe/test-thundering-herd.c
121
errx(1, "%s: %ld != 1", ctx.c_ident, n);
regress/sys/kern/pipe/test-thundering-herd.c
124
(void)read(ctx.c_cv[0], &c, 1);
regress/sys/kern/pipe/test-thundering-herd.c
136
if (ctx.c_read)
regress/sys/kern/pipe/test-thundering-herd.c
137
close(ctx.c_pipe[1]);
regress/sys/kern/pipe/test-thundering-herd.c
139
close(ctx.c_pipe[0]);
regress/sys/kern/pipe/test-thundering-herd.c
157
block_proc(const struct context *ctx)
regress/sys/kern/pipe/test-thundering-herd.c
165
int rp = ctx->c_pipe[0];
regress/sys/kern/pipe/test-thundering-herd.c
166
int wp = ctx->c_pipe[1];
regress/sys/kern/pipe/test-thundering-herd.c
168
if (ctx->c_read)
regress/sys/kern/pipe/test-thundering-herd.c
177
if (ctx->c_read)
regress/sys/kern/pipe/test-thundering-herd.c
178
n = read(rp, ctx->c_buf, ctx->c_bufsiz);
regress/sys/kern/pipe/test-thundering-herd.c
180
n = write(wp, ctx->c_buf, ctx->c_bufsiz);
regress/sys/kern/pipe/test-thundering-herd.c
183
ctx->c_id, ctx->c_ident, n);
regress/sys/kern/pipe/test-thundering-herd.c
187
err(1, "[%d] %s", ctx->c_id, ctx->c_ident);
regress/sys/kern/pipe/test-thundering-herd.c
193
(void)write(ctx->c_cv[1], &c, 1);
regress/sys/kern/pipe/test-thundering-herd.c
88
struct context ctx;
regress/sys/kern/pipe/test-thundering-herd.c
93
ctx.c_ident = doread ? "read" : "write";
regress/sys/kern/pipe/test-thundering-herd.c
94
ctx.c_read = doread;
regress/sys/kern/pipe/test-thundering-herd.c
95
if (pipe(ctx.c_pipe) == -1)
regress/sys/kern/pipe/test-thundering-herd.c
97
if (pipe(ctx.c_cv) == -1)
regress/sys/kern/signal/siginfo-fault/siginfo-fault.c
51
sigsegv(int signo, siginfo_t *si, void *ctx)
regress/sys/uvm/vnode/test-deadlock.c
45
test_deadlock(struct context *ctx)
regress/sys/uvm/vnode/test-deadlock.c
59
writer(ctx->c_path, killpip[0]);
regress/sys/uvm/vnode/test-deadlock.c
67
if (ctx_abort(ctx))
regress/sys/uvm/vnode/test-deadlock.c
69
growshrink(ctx->c_path);
regress/sys/uvm/vnode/vnode.c
48
struct context ctx;
regress/sys/uvm/vnode/vnode.c
51
memset(&ctx, 0, sizeof(ctx));
regress/sys/uvm/vnode/vnode.c
52
ctx.c_iterations = 100;
regress/sys/uvm/vnode/vnode.c
57
ctx.c_iterations = -1;
regress/sys/uvm/vnode/vnode.c
60
ctx.c_path = optarg;
regress/sys/uvm/vnode/vnode.c
71
if (argc != 1 || ctx.c_path == NULL)
regress/sys/uvm/vnode/vnode.c
84
return tests[i].t_func(&ctx);
regress/sys/uvm/vnode/vnode.c
91
ctx_abort(struct context *ctx)
regress/sys/uvm/vnode/vnode.c
95
if (ctx->c_iterations > 0 && --ctx->c_iterations == 0)
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
301
SHA2_CTX ctx;
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
331
SHA256Init(&ctx);
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
332
SHA256Update(&ctx, (const u_char *)application, strlen(application));
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
333
SHA256Final(apphash, &ctx);
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
341
SHA256Init(&ctx);
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
342
SHA256Update(&ctx, apphash, sizeof(apphash));
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
343
SHA256Update(&ctx, &flags, sizeof(flags));
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
344
SHA256Update(&ctx, countbuf, sizeof(countbuf));
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
345
SHA256Update(&ctx, message, message_len);
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
346
SHA256Final(sighash, &ctx);
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
365
explicit_bzero(&ctx, sizeof(ctx));
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
389
SHA2_CTX ctx;
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
407
SHA256Init(&ctx);
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
408
SHA256Update(&ctx, (const u_char *)application, strlen(application));
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
409
SHA256Final(apphash, &ctx);
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
448
explicit_bzero(&ctx, sizeof(ctx));
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
467
SHA2_CTX ctx;
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
481
SHA256Init(&ctx);
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
482
SHA256Update(&ctx, data, datalen);
regress/usr.bin/ssh/misc/sk-dummy/sk-dummy.c
483
SHA256Final(message, &ctx);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
50
struct cbctx *ctx = (struct cbctx *)_ctx;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
52
int parse_key = (ctx->flags & HKF_WANT_PARSE_KEY) != 0;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
53
const int matching = (ctx->flags & HKF_WANT_MATCH) != 0;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
58
ctx->i + 1, ctx->nexpected, l->linenum);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
61
ASSERT_SIZE_T_LT(ctx->i, ctx->nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
62
expected = ctx->expected + ctx->i++;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
66
if (ctx->match_host_p && expected->match_host_p)
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
68
if (ctx->match_host_s && expected->match_host_s)
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
70
if (ctx->match_ipv4 && expected->match_ipv4)
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
72
if (ctx->match_ipv6 && expected->match_ipv6)
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
754
struct cbctx ctx;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
757
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
758
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
759
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
760
ctx.flags = HKF_WANT_PARSE_KEY;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
761
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
763
check, &ctx, NULL, NULL, ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
764
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
768
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
769
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
770
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
771
ctx.flags = 0;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
772
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
774
check, &ctx, NULL, NULL, ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
775
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
779
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
780
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
781
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
782
ctx.flags = 0;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
783
ctx.match_host_p = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
784
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
786
check, &ctx, "prometheus.example.com", NULL, ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
787
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
79
if (ctx->x && expected->x) { \
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
791
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
792
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
793
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
794
ctx.flags = 0;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
795
ctx.match_host_s = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
796
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
798
check, &ctx, "sisyphus.example.com", NULL, ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
799
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
803
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
804
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
805
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
806
ctx.flags = HKF_WANT_MATCH;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
807
ctx.match_host_p = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
808
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
810
check, &ctx, "prometheus.example.com", NULL, ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
811
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
815
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
816
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
817
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
818
ctx.flags = HKF_WANT_MATCH;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
819
ctx.match_host_s = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
820
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
822
check, &ctx, "sisyphus.example.com", NULL, ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
823
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
827
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
828
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
829
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
830
ctx.flags = 0;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
831
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
833
check, &ctx, "actaeon.example.org", NULL, ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
834
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
838
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
839
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
840
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
841
ctx.flags = HKF_WANT_MATCH;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
842
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
844
check, &ctx, "actaeon.example.org", NULL, ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
845
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
849
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
850
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
851
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
852
ctx.flags = 0;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
853
ctx.match_ipv4 = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
854
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
856
check, &ctx, "tiresias.example.org", "192.0.2.1", ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
857
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
861
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
862
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
863
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
864
ctx.flags = 0;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
865
ctx.match_ipv6 = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
866
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
868
check, &ctx, "tiresias.example.org", "2001:db8::1",
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
869
ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
870
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
874
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
875
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
876
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
877
ctx.flags = HKF_WANT_MATCH;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
878
ctx.match_ipv4 = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
879
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
881
check, &ctx, "tiresias.example.org", "192.0.2.1", ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
882
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
886
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
887
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
888
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
889
ctx.flags = HKF_WANT_MATCH;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
890
ctx.match_ipv6 = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
891
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
893
check, &ctx, "tiresias.example.org", "2001:db8::1",
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
894
ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
895
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
899
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
900
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
901
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
902
ctx.flags = 0;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
903
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
905
check, &ctx, "tiresias.example.org", "192.168.0.1",
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
906
ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
907
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
911
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
912
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
913
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
914
ctx.flags = HKF_WANT_MATCH;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
915
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
917
check, &ctx, "tiresias.example.org", "::1", ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
918
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
922
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
923
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
924
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
925
ctx.flags = 0;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
926
ctx.match_host_s = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
927
ctx.match_ipv4 = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
928
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
930
check, &ctx, "sisyphus.example.com", "192.0.2.1", ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
931
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
935
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
936
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
937
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
938
ctx.flags = HKF_WANT_MATCH;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
939
ctx.match_host_p = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
940
ctx.match_ipv6 = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
941
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
943
check, &ctx, "prometheus.example.com",
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
944
"2001:db8::1", ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
945
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
949
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
950
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
951
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
952
ctx.flags = HKF_WANT_PARSE_KEY;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
953
ctx.match_host_s = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
954
ctx.match_ipv4 = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
955
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
957
check, &ctx, "sisyphus.example.com", "192.0.2.1", ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
958
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
962
memset(&ctx, 0, sizeof(ctx));
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
963
ctx.expected = expected_full;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
964
ctx.nexpected = sizeof(expected_full)/sizeof(*expected_full);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
965
ctx.flags = HKF_WANT_MATCH|HKF_WANT_PARSE_KEY;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
966
ctx.match_host_p = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
967
ctx.match_ipv6 = 1;
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
968
prepare_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
970
check, &ctx, "prometheus.example.com",
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
971
"2001:db8::1", ctx.flags, 0), 0);
regress/usr.bin/ssh/unittests/hostkeys/test_iterate.c
972
cleanup_expected(expected_full, ctx.nexpected);
regress/usr.bin/ssh/unittests/test_helper/test_helper.c
266
set_onerror_func(test_onerror_func_t *f, void *ctx)
regress/usr.bin/ssh/unittests/test_helper/test_helper.c
269
onerror_ctx = ctx;
regress/usr.bin/ssh/unittests/test_helper/test_helper.h
41
void set_onerror_func(test_onerror_func_t *f, void *ctx);
regress/usr.sbin/rpki-client/test-rrdp.c
248
SHA256_Final(h, &s->ctx);
regress/usr.sbin/rpki-client/test-rrdp.c
262
SHA256_Update(&s->ctx, buf, len);
regress/usr.sbin/rpki-client/test-rrdp.c
293
SHA256_Init(&s->ctx);
regress/usr.sbin/rpki-client/test-rrdp.c
325
SHA256_Init(&s->ctx);
regress/usr.sbin/rpki-client/test-rrdp.c
72
SHA256_CTX ctx;
sbin/iked/ca.c
1179
ca_by_subjectpubkey(X509_STORE *ctx, uint8_t *sig, size_t siglen)
sbin/iked/ca.c
1188
h = X509_STORE_get0_objects(ctx);
sbin/iked/ca.c
1207
ca_by_issuer(X509_STORE *ctx, X509_NAME *subject, struct iked_static_id *id)
sbin/iked/ca.c
1218
h = X509_STORE_get0_objects(ctx);
sbin/iked/ca.c
1245
ca_by_subjectaltname(X509_STORE *ctx, struct iked_static_id *id)
sbin/iked/ca.c
1252
h = X509_STORE_get0_objects(ctx);
sbin/iked/ca.c
1275
ca_store_certs_info(const char *msg, X509_STORE *ctx)
sbin/iked/ca.c
1282
h = X509_STORE_get0_objects(ctx);
sbin/iked/ca.c
1382
ca_store_info(struct iked *env, struct imsg *imsg, const char *msg, X509_STORE *ctx)
sbin/iked/ca.c
1393
h = X509_STORE_get0_objects(ctx);
sbin/iked/chap_ms.c
140
EVP_MD_CTX *ctx;
sbin/iked/chap_ms.c
143
ctx = EVP_MD_CTX_new();
sbin/iked/chap_ms.c
144
if (ctx == NULL)
sbin/iked/chap_ms.c
146
EVP_DigestInit(ctx, EVP_md4());
sbin/iked/chap_ms.c
147
EVP_DigestUpdate(ctx, in, inlen);
sbin/iked/chap_ms.c
148
EVP_DigestFinal(ctx, hash, &mdlen);
sbin/iked/chap_ms.c
149
EVP_MD_CTX_free(ctx);
sbin/iked/chap_ms.c
156
EVP_MD_CTX *ctx;
sbin/iked/chap_ms.c
166
ctx = EVP_MD_CTX_new();
sbin/iked/chap_ms.c
167
if (ctx == NULL)
sbin/iked/chap_ms.c
169
EVP_DigestInit(ctx, EVP_sha1());
sbin/iked/chap_ms.c
170
EVP_DigestUpdate(ctx, peer_challenge, MSCHAPV2_CHALLENGE_SZ);
sbin/iked/chap_ms.c
171
EVP_DigestUpdate(ctx, auth_challenge, MSCHAPV2_CHALLENGE_SZ);
sbin/iked/chap_ms.c
172
EVP_DigestUpdate(ctx, name, strlen(name));
sbin/iked/chap_ms.c
173
EVP_DigestFinal(ctx, md, &mdlen);
sbin/iked/chap_ms.c
174
EVP_MD_CTX_free(ctx);
sbin/iked/chap_ms.c
199
EVP_MD_CTX *ctx;
sbin/iked/chap_ms.c
221
ctx = EVP_MD_CTX_new();
sbin/iked/chap_ms.c
222
if (ctx == NULL)
sbin/iked/chap_ms.c
227
EVP_DigestInit(ctx, EVP_sha1());
sbin/iked/chap_ms.c
228
EVP_DigestUpdate(ctx, password_hash2, sizeof(password_hash2));
sbin/iked/chap_ms.c
229
EVP_DigestUpdate(ctx, ntresponse, 24);
sbin/iked/chap_ms.c
230
EVP_DigestUpdate(ctx, magic1, 39);
sbin/iked/chap_ms.c
231
EVP_DigestFinal(ctx, md, &mdlen);
sbin/iked/chap_ms.c
236
EVP_DigestInit(ctx, EVP_sha1());
sbin/iked/chap_ms.c
237
EVP_DigestUpdate(ctx, md, sizeof(md));
sbin/iked/chap_ms.c
238
EVP_DigestUpdate(ctx, challenge, sizeof(challenge));
sbin/iked/chap_ms.c
239
EVP_DigestUpdate(ctx, magic2, 41);
sbin/iked/chap_ms.c
240
EVP_DigestFinal(ctx, md, &mdlen);
sbin/iked/chap_ms.c
241
EVP_MD_CTX_free(ctx);
sbin/iked/chap_ms.c
265
EVP_MD_CTX *ctx;
sbin/iked/chap_ms.c
272
ctx = EVP_MD_CTX_new();
sbin/iked/chap_ms.c
273
if (ctx == NULL)
sbin/iked/chap_ms.c
275
EVP_DigestInit(ctx, EVP_sha1());
sbin/iked/chap_ms.c
276
EVP_DigestUpdate(ctx, password_hash2, MSCHAP_HASH_SZ);
sbin/iked/chap_ms.c
277
EVP_DigestUpdate(ctx, ntresponse, 24);
sbin/iked/chap_ms.c
278
EVP_DigestUpdate(ctx, magic1, 27);
sbin/iked/chap_ms.c
279
EVP_DigestFinal(ctx, md, &mdlen);
sbin/iked/chap_ms.c
280
EVP_MD_CTX_free(ctx);
sbin/iked/chap_ms.c
289
EVP_MD_CTX *ctx;
sbin/iked/chap_ms.c
321
ctx = EVP_MD_CTX_new();
sbin/iked/chap_ms.c
322
if (ctx == NULL)
sbin/iked/chap_ms.c
324
EVP_DigestInit(ctx, EVP_sha1());
sbin/iked/chap_ms.c
325
EVP_DigestUpdate(ctx, masterkey, 16);
sbin/iked/chap_ms.c
326
EVP_DigestUpdate(ctx, sha1_pad1, 40);
sbin/iked/chap_ms.c
327
EVP_DigestUpdate(ctx, s, 84);
sbin/iked/chap_ms.c
328
EVP_DigestUpdate(ctx, sha1_pad2, 40);
sbin/iked/chap_ms.c
329
EVP_DigestFinal(ctx, md, &mdlen);
sbin/iked/chap_ms.c
330
EVP_MD_CTX_free(ctx);
sbin/iked/chap_ms.c
362
EVP_MD_CTX *ctx;
sbin/iked/chap_ms.c
366
ctx = EVP_MD_CTX_new();
sbin/iked/chap_ms.c
367
if (ctx == NULL)
sbin/iked/chap_ms.c
369
EVP_DigestInit(ctx, EVP_md5());
sbin/iked/chap_ms.c
370
EVP_DigestUpdate(ctx, secret, strlen(secret));
sbin/iked/chap_ms.c
371
EVP_DigestUpdate(ctx, authenticator, 16);
sbin/iked/chap_ms.c
372
EVP_DigestUpdate(ctx, crypted, 2);
sbin/iked/chap_ms.c
373
EVP_DigestFinal(ctx, b, &mdlen);
sbin/iked/chap_ms.c
379
EVP_DigestInit(ctx, EVP_md5());
sbin/iked/chap_ms.c
380
EVP_DigestUpdate(ctx, secret, strlen(secret));
sbin/iked/chap_ms.c
381
EVP_DigestUpdate(ctx, crypted + 2, mdlen);
sbin/iked/chap_ms.c
382
EVP_DigestFinal(ctx, b, &mdlen);
sbin/iked/chap_ms.c
383
EVP_MD_CTX_free(ctx);
sbin/iked/dh.c
841
EVP_MD_CTX *ctx = NULL;
sbin/iked/dh.c
878
if ((ctx = EVP_MD_CTX_new()) == NULL ||
sbin/iked/dh.c
879
EVP_DigestInit_ex(ctx, EVP_sha512(), NULL) != 1 ||
sbin/iked/dh.c
880
EVP_DigestUpdate(ctx, kemsx->kemkey, sizeof(kemsx->kemkey)) != 1 ||
sbin/iked/dh.c
881
EVP_DigestUpdate(ctx, shared, sizeof(shared)) != 1 ||
sbin/iked/dh.c
882
EVP_DigestFinal_ex(ctx, ibuf_data(buf), &len) != 1) {
sbin/iked/dh.c
883
EVP_MD_CTX_free(ctx);
sbin/iked/dh.c
887
EVP_MD_CTX_free(ctx);
sbin/iked/ikev2.c
2324
EVP_MD_CTX *ctx;
sbin/iked/ikev2.c
2356
ctx = EVP_MD_CTX_new();
sbin/iked/ikev2.c
2357
if (ctx == NULL)
sbin/iked/ikev2.c
2359
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
sbin/iked/ikev2.c
2382
EVP_DigestUpdate(ctx, &ispi, sizeof(ispi));
sbin/iked/ikev2.c
2383
EVP_DigestUpdate(ctx, &rspi, sizeof(rspi));
sbin/iked/ikev2.c
2388
EVP_DigestUpdate(ctx, &in4->sin_addr.s_addr,
sbin/iked/ikev2.c
2390
EVP_DigestUpdate(ctx, &in4->sin_port,
sbin/iked/ikev2.c
2395
EVP_DigestUpdate(ctx, &in6->sin6_addr.s6_addr,
sbin/iked/ikev2.c
2397
EVP_DigestUpdate(ctx, &in6->sin6_port,
sbin/iked/ikev2.c
2414
EVP_DigestUpdate(ctx, &rnd, sizeof(rnd));
sbin/iked/ikev2.c
2417
EVP_DigestFinal_ex(ctx, md, &mdlen);
sbin/iked/ikev2.c
2425
EVP_MD_CTX_free(ctx);
sbin/iked/radius.c
147
iked_radius_on_event(int fd, short ev, void *ctx)
sbin/iked/radius.c
150
struct iked_radserver *server = ctx;
sbin/iked/radius.c
351
iked_radius_request_send(struct iked *env, void *ctx)
sbin/iked/radius.c
353
struct iked_radserver_req *req = ctx, *req0;
sbin/iked/radius.c
816
iked_radius_dae_on_event(int fd, short ev, void *ctx)
sbin/iked/radius.c
818
struct iked_raddae *dae = ctx;
sbin/isakmpd/cookie.c
61
hash->Init(hash->ctx);
sbin/isakmpd/cookie.c
63
hash->Update(hash->ctx, (u_int8_t *)name, SA_LEN(name));
sbin/isakmpd/cookie.c
65
hash->Update(hash->ctx, (u_int8_t *)name, SA_LEN(name));
sbin/isakmpd/cookie.c
67
hash->Update(hash->ctx, exchange->cookies +
sbin/isakmpd/cookie.c
70
hash->Update(hash->ctx, tmpsecret, COOKIE_SECRET_SIZE);
sbin/isakmpd/cookie.c
71
hash->Final(hash->digest, hash->ctx);
sbin/isakmpd/hash.c
100
sha256_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
sbin/isakmpd/hash.c
102
SHA256Update(&ctx->sha2ctx, data, len);
sbin/isakmpd/hash.c
106
sha256_final(unsigned char *digest, union ANY_CTX *ctx)
sbin/isakmpd/hash.c
108
SHA256Final(digest, &ctx->sha2ctx);
sbin/isakmpd/hash.c
112
sha384_init(union ANY_CTX *ctx)
sbin/isakmpd/hash.c
114
SHA384Init(&ctx->sha2ctx);
sbin/isakmpd/hash.c
118
sha384_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
sbin/isakmpd/hash.c
120
SHA384Update(&ctx->sha2ctx, data, len);
sbin/isakmpd/hash.c
124
sha384_final(unsigned char *digest, union ANY_CTX *ctx)
sbin/isakmpd/hash.c
126
SHA384Final(digest, &ctx->sha2ctx);
sbin/isakmpd/hash.c
130
sha512_init(union ANY_CTX *ctx)
sbin/isakmpd/hash.c
132
SHA512Init(&ctx->sha2ctx);
sbin/isakmpd/hash.c
136
sha512_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
sbin/isakmpd/hash.c
138
SHA512Update(&ctx->sha2ctx, data, len);
sbin/isakmpd/hash.c
142
sha512_final(unsigned char *digest, union ANY_CTX *ctx)
sbin/isakmpd/hash.c
144
SHA512Final(digest, &ctx->sha2ctx);
sbin/isakmpd/hash.c
221
hash->Init(hash->ctx);
sbin/isakmpd/hash.c
222
hash->Update(hash->ctx, okey, len);
sbin/isakmpd/hash.c
223
hash->Final(key, hash->ctx);
sbin/isakmpd/hash.c
232
hash->Init(hash->ctx);
sbin/isakmpd/hash.c
233
hash->Update(hash->ctx, key, hash->blocklen);
sbin/isakmpd/hash.c
251
hash->Final(dgst, hash->ctx);
sbin/isakmpd/hash.c
58
md5_init(union ANY_CTX *ctx)
sbin/isakmpd/hash.c
60
MD5Init(&ctx->md5ctx);
sbin/isakmpd/hash.c
64
md5_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
sbin/isakmpd/hash.c
66
MD5Update(&ctx->md5ctx, data, len);
sbin/isakmpd/hash.c
70
md5_final(unsigned char *digest, union ANY_CTX *ctx)
sbin/isakmpd/hash.c
72
MD5Final(digest, &ctx->md5ctx);
sbin/isakmpd/hash.c
76
sha1_init(union ANY_CTX *ctx)
sbin/isakmpd/hash.c
78
SHA1Init(&ctx->sha1ctx);
sbin/isakmpd/hash.c
82
sha1_update(union ANY_CTX *ctx, const unsigned char *data, size_t len)
sbin/isakmpd/hash.c
84
SHA1Update(&ctx->sha1ctx, data, len);
sbin/isakmpd/hash.c
88
sha1_final(unsigned char *digest, union ANY_CTX *ctx)
sbin/isakmpd/hash.c
90
SHA1Final(digest, &ctx->sha1ctx);
sbin/isakmpd/hash.c
94
sha256_init(union ANY_CTX *ctx)
sbin/isakmpd/hash.c
96
SHA256Init(&ctx->sha2ctx);
sbin/isakmpd/hash.h
59
void *ctx; /* Pointer to a context, for HMAC ictx */
sbin/isakmpd/ike_auth.c
494
hash->Init(hash->ctx);
sbin/isakmpd/ike_auth.c
495
hash->Update(hash->ctx, exchange->nonce_i, exchange->nonce_i_len);
sbin/isakmpd/ike_auth.c
496
hash->Update(hash->ctx, exchange->nonce_r, exchange->nonce_r_len);
sbin/isakmpd/ike_auth.c
497
hash->Final(hash->digest, hash->ctx);
sbin/isakmpd/ike_phase_1.c
767
hash->Init(hash->ctx);
sbin/isakmpd/ike_phase_1.c
768
hash->Update(hash->ctx, ie->g_xi, ie->g_x_len);
sbin/isakmpd/ike_phase_1.c
769
hash->Update(hash->ctx, ie->g_xr, ie->g_x_len);
sbin/isakmpd/ike_phase_1.c
770
hash->Final(hash->digest, hash->ctx);
sbin/isakmpd/ipsec.c
880
hash->Init(hash->ctx);
sbin/isakmpd/ipsec.c
883
hash->Update(hash->ctx, ks->riv, ks->xf->blocksize);
sbin/isakmpd/ipsec.c
887
hash->Update(hash->ctx, ((u_int8_t *) msg->iov[0].iov_base) +
sbin/isakmpd/ipsec.c
889
hash->Final(hash->digest, hash->ctx);
sbin/isakmpd/nat_traversal.c
116
hash->Init(hash->ctx);
sbin/isakmpd/nat_traversal.c
117
hash->Update(hash->ctx,
sbin/isakmpd/nat_traversal.c
120
hash->Final(isakmp_nat_t_cap[i].hash, hash->ctx);
sbin/isakmpd/nat_traversal.c
241
hash->Init(hash->ctx);
sbin/isakmpd/nat_traversal.c
242
hash->Update(hash->ctx, msg->exchange->cookies,
sbin/isakmpd/nat_traversal.c
244
hash->Update(hash->ctx, sockaddr_addrdata(sa), sockaddr_addrlen(sa));
sbin/isakmpd/nat_traversal.c
245
hash->Update(hash->ctx, (unsigned char *)&port, sizeof port);
sbin/isakmpd/nat_traversal.c
246
hash->Final(res, hash->ctx);
sbin/isakmpd/prf.c
107
prfctx->ctx = malloc(hash->ctxsize);
sbin/isakmpd/prf.c
108
if (!prfctx->ctx) {
sbin/isakmpd/prf.c
117
free(prfctx->ctx);
sbin/isakmpd/prf.c
134
memcpy(prfctx->ctx, hash->ctx, hash->ctxsize);
sbin/isakmpd/prf.c
154
free(prfctx->ctx);
sbin/isakmpd/prf.c
47
prf_hash_init(struct prf_hash_ctx *ctx)
sbin/isakmpd/prf.c
49
memcpy(ctx->hash->ctx, ctx->ctx, ctx->hash->ctxsize);
sbin/isakmpd/prf.c
50
memcpy(ctx->hash->ctx2, ctx->ctx2, ctx->hash->ctxsize);
sbin/isakmpd/prf.c
54
prf_hash_update(struct prf_hash_ctx *ctx, unsigned char *data,
sbin/isakmpd/prf.c
57
ctx->hash->Update(ctx->hash->ctx, data, len);
sbin/isakmpd/prf.c
61
prf_hash_final(unsigned char *digest, struct prf_hash_ctx *ctx)
sbin/isakmpd/prf.c
63
ctx->hash->HMACFinal(digest, ctx->hash);
sbin/isakmpd/prf.h
52
void *ctx, *ctx2; /* Contexts we need for later */
sbin/isakmpd/vendor.c
55
hash->Init(hash->ctx);
sbin/isakmpd/vendor.c
56
hash->Update(hash->ctx,
sbin/isakmpd/vendor.c
59
hash->Final(openbsd_vendor_cap[i].hash, hash->ctx);
sbin/isakmpd/x509.c
611
x509_read_from_dir(X509_STORE *ctx, char *name, int hash, int *pcount)
sbin/isakmpd/x509.c
672
if (!X509_STORE_add_cert(ctx, cert)) {
sbin/isakmpd/x509.c
695
x509_read_crls_from_dir(X509_STORE *ctx, char *name)
sbin/isakmpd/x509.c
749
if (!X509_STORE_add_crl(ctx, crl)) {
sbin/isakmpd/x509.c
762
X509_STORE_set_flags(ctx, X509_V_FLAG_CRL_CHECK);
sbin/ping/ping.c
1142
SIPHASH_CTX ctx;
sbin/ping/ping.c
1154
SipHash24_Init(&ctx, &mac_key);
sbin/ping/ping.c
1155
SipHash24_Update(&ctx, tv64, sizeof(*tv64));
sbin/ping/ping.c
1156
SipHash24_Update(&ctx, &ident, sizeof(ident));
sbin/ping/ping.c
1157
SipHash24_Update(&ctx, &seq, sizeof(seq));
sbin/ping/ping.c
1158
SipHash24_Final(&payload.mac, &ctx);
sbin/ping/ping.c
1290
SIPHASH_CTX ctx;
sbin/ping/ping.c
1297
SipHash24_Init(&ctx, &mac_key);
sbin/ping/ping.c
1298
SipHash24_Update(&ctx, tv64, sizeof(*tv64));
sbin/ping/ping.c
1299
SipHash24_Update(&ctx, &ident, sizeof(ident));
sbin/ping/ping.c
1300
SipHash24_Update(&ctx, &seq, sizeof(seq));
sbin/ping/ping.c
1301
SipHash24_Final(mac, &ctx);
sbin/slaacd/engine.c
1588
SHA2_CTX ctx;
sbin/slaacd/engine.c
1616
SHA512Init(&ctx);
sbin/slaacd/engine.c
1617
SHA512Update(&ctx, &prefix->prefix,
sbin/slaacd/engine.c
1619
SHA512Update(&ctx, &iface->hw_address,
sbin/slaacd/engine.c
1621
SHA512Update(&ctx, &prefix->dad_counter,
sbin/slaacd/engine.c
1623
SHA512Update(&ctx, addr_proposal->soiikey,
sbin/slaacd/engine.c
1625
SHA512Final(digest, &ctx);
sbin/unwind/libunbound/daemon/remote.h
106
SSL_CTX* ctx;
sbin/unwind/libunbound/libunbound/context.c
100
if(!slabhash_is_size(ctx->env->msg_cache, cfg->msg_cache_size,
sbin/unwind/libunbound/libunbound/context.c
102
slabhash_delete(ctx->env->msg_cache);
sbin/unwind/libunbound/libunbound/context.c
103
ctx->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
sbin/unwind/libunbound/libunbound/context.c
107
if(!ctx->env->msg_cache)
sbin/unwind/libunbound/libunbound/context.c
110
ctx->env->rrset_cache = rrset_cache_adjust(ctx->env->rrset_cache,
sbin/unwind/libunbound/libunbound/context.c
111
ctx->env->cfg, ctx->env->alloc);
sbin/unwind/libunbound/libunbound/context.c
112
if(!ctx->env->rrset_cache)
sbin/unwind/libunbound/libunbound/context.c
114
ctx->env->infra_cache = infra_adjust(ctx->env->infra_cache, cfg);
sbin/unwind/libunbound/libunbound/context.c
115
if(!ctx->env->infra_cache)
sbin/unwind/libunbound/libunbound/context.c
117
ctx->finalized = 1;
sbin/unwind/libunbound/libunbound/context.c
143
find_id(struct ub_ctx* ctx, int* id)
sbin/unwind/libunbound/libunbound/context.c
146
ctx->next_querynum++;
sbin/unwind/libunbound/libunbound/context.c
147
while(rbtree_search(&ctx->queries, &ctx->next_querynum)) {
sbin/unwind/libunbound/libunbound/context.c
148
ctx->next_querynum++; /* numerical wraparound is fine */
sbin/unwind/libunbound/libunbound/context.c
152
*id = ctx->next_querynum;
sbin/unwind/libunbound/libunbound/context.c
157
context_new(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass,
sbin/unwind/libunbound/libunbound/context.c
162
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/context.c
163
if(!find_id(ctx, &q->querynum)) {
sbin/unwind/libunbound/libunbound/context.c
164
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/context.c
168
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/context.c
189
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/context.c
191
ctx->num_async ++;
sbin/unwind/libunbound/libunbound/context.c
192
(void)rbtree_insert(&ctx->queries, &q->node);
sbin/unwind/libunbound/libunbound/context.c
193
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/context.c
198
context_obtain_alloc(struct ub_ctx* ctx, int locking)
sbin/unwind/libunbound/libunbound/context.c
203
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/context.c
205
a = ctx->alloc_list;
sbin/unwind/libunbound/libunbound/context.c
207
ctx->alloc_list = a->super; /* snip off list */
sbin/unwind/libunbound/libunbound/context.c
208
else tnum = ctx->thr_next_num++;
sbin/unwind/libunbound/libunbound/context.c
210
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/context.c
213
a->super = &ctx->superalloc;
sbin/unwind/libunbound/libunbound/context.c
219
alloc_init(a, &ctx->superalloc, tnum);
sbin/unwind/libunbound/libunbound/context.c
224
context_release_alloc(struct ub_ctx* ctx, struct alloc_cache* alloc,
sbin/unwind/libunbound/libunbound/context.c
227
if(!ctx || !alloc)
sbin/unwind/libunbound/libunbound/context.c
230
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/context.c
232
alloc->super = ctx->alloc_list;
sbin/unwind/libunbound/libunbound/context.c
233
ctx->alloc_list = alloc;
sbin/unwind/libunbound/libunbound/context.c
235
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/context.c
263
context_deserialize_new_query(struct ub_ctx* ctx, uint8_t* p, uint32_t len)
sbin/unwind/libunbound/libunbound/context.c
290
ctx->num_async++;
sbin/unwind/libunbound/libunbound/context.c
291
(void)rbtree_insert(&ctx->queries, &q->node);
sbin/unwind/libunbound/libunbound/context.c
296
context_lookup_new_query(struct ub_ctx* ctx, uint8_t* p, uint32_t len)
sbin/unwind/libunbound/libunbound/context.c
305
q = (struct ctx_query*)rbtree_search(&ctx->queries, &querynum);
sbin/unwind/libunbound/libunbound/context.c
350
context_deserialize_answer(struct ub_ctx* ctx,
sbin/unwind/libunbound/libunbound/context.c
360
q = (struct ctx_query*)rbtree_search(&ctx->queries, &id);
sbin/unwind/libunbound/libunbound/context.c
406
struct ctx_query* context_deserialize_cancel(struct ub_ctx* ctx,
sbin/unwind/libunbound/libunbound/context.c
414
q = (struct ctx_query*)rbtree_search(&ctx->queries, &id);
sbin/unwind/libunbound/libunbound/context.c
60
context_finalize(struct ub_ctx* ctx)
sbin/unwind/libunbound/libunbound/context.c
63
struct config_file* cfg = ctx->env->cfg;
sbin/unwind/libunbound/libunbound/context.c
65
if(ctx_logfile_overridden && !ctx->logfile_override) {
sbin/unwind/libunbound/libunbound/context.c
69
if(ctx->logfile_override) {
sbin/unwind/libunbound/libunbound/context.c
71
log_file(ctx->log_out);
sbin/unwind/libunbound/libunbound/context.c
75
ctx->pipe_pid = getpid();
sbin/unwind/libunbound/libunbound/context.c
78
if(!modstack_call_startup(&ctx->mods, cfg->module_conf, ctx->env))
sbin/unwind/libunbound/libunbound/context.c
80
if(!modstack_call_init(&ctx->mods, cfg->module_conf, ctx->env))
sbin/unwind/libunbound/libunbound/context.c
83
log_edns_known_options(VERB_ALGO, ctx->env);
sbin/unwind/libunbound/libunbound/context.c
84
ctx->local_zones = local_zones_create();
sbin/unwind/libunbound/libunbound/context.c
85
if(!ctx->local_zones)
sbin/unwind/libunbound/libunbound/context.c
87
if(!local_zones_apply_cfg(ctx->local_zones, cfg))
sbin/unwind/libunbound/libunbound/context.c
89
if(!auth_zones_apply_cfg(ctx->env->auth_zones, cfg, 1, &is_rpz,
sbin/unwind/libunbound/libunbound/context.c
90
ctx->env, &ctx->mods))
sbin/unwind/libunbound/libunbound/context.c
92
if(!(ctx->env->fwds = forwards_create()) ||
sbin/unwind/libunbound/libunbound/context.c
93
!forwards_apply_cfg(ctx->env->fwds, cfg))
sbin/unwind/libunbound/libunbound/context.c
95
if(!(ctx->env->hints = hints_create()) ||
sbin/unwind/libunbound/libunbound/context.c
96
!hints_apply_cfg(ctx->env->hints, cfg))
sbin/unwind/libunbound/libunbound/context.c
98
if(!edns_strings_apply_cfg(ctx->env->edns_strings, cfg))
sbin/unwind/libunbound/libunbound/context.h
209
int context_finalize(struct ub_ctx* ctx);
sbin/unwind/libunbound/libunbound/context.h
231
struct ctx_query* context_new(struct ub_ctx* ctx, const char* name, int rrtype,
sbin/unwind/libunbound/libunbound/context.h
241
struct alloc_cache* context_obtain_alloc(struct ub_ctx* ctx, int locking);
sbin/unwind/libunbound/libunbound/context.h
249
void context_release_alloc(struct ub_ctx* ctx, struct alloc_cache* alloc,
sbin/unwind/libunbound/libunbound/context.h
306
struct ctx_query* context_lookup_new_query(struct ub_ctx* ctx,
sbin/unwind/libunbound/libunbound/context.h
316
struct ctx_query* context_deserialize_new_query(struct ub_ctx* ctx,
sbin/unwind/libunbound/libunbound/context.h
327
struct ctx_query* context_deserialize_answer(struct ub_ctx* ctx,
sbin/unwind/libunbound/libunbound/context.h
337
struct ctx_query* context_deserialize_cancel(struct ub_ctx* ctx,
sbin/unwind/libunbound/libunbound/libunbound.c
1000
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1009
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1010
if(!ctx->env->cfg->forwards ||
sbin/unwind/libunbound/libunbound/libunbound.c
1011
(ctx->env->cfg->forwards->name &&
sbin/unwind/libunbound/libunbound/libunbound.c
1012
strcmp(ctx->env->cfg->forwards->name, ".") != 0)) {
sbin/unwind/libunbound/libunbound/libunbound.c
1015
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1022
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1026
s->next = ctx->env->cfg->forwards;
sbin/unwind/libunbound/libunbound/libunbound.c
1027
ctx->env->cfg->forwards = s;
sbin/unwind/libunbound/libunbound/libunbound.c
1029
log_assert(ctx->env->cfg->forwards);
sbin/unwind/libunbound/libunbound/libunbound.c
1030
log_assert(ctx->env->cfg->forwards->name);
sbin/unwind/libunbound/libunbound/libunbound.c
1031
s = ctx->env->cfg->forwards;
sbin/unwind/libunbound/libunbound/libunbound.c
1035
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1040
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1044
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1048
int ub_ctx_set_tls(struct ub_ctx* ctx, int tls)
sbin/unwind/libunbound/libunbound/libunbound.c
1050
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1051
if(ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
1052
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1056
ctx->env->cfg->ssl_upstream = tls;
sbin/unwind/libunbound/libunbound/libunbound.c
1057
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1061
int ub_ctx_set_stub(struct ub_ctx* ctx, const char* zone, const char* addr,
sbin/unwind/libunbound/libunbound/libunbound.c
1091
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1092
if(ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
1093
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1099
prev = &ctx->env->cfg->stubs;
sbin/unwind/libunbound/libunbound/libunbound.c
1103
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1109
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
111
ctx = (struct ub_ctx*)calloc(1, sizeof(*ctx));
sbin/unwind/libunbound/libunbound/libunbound.c
1117
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
112
if(!ctx) {
sbin/unwind/libunbound/libunbound/libunbound.c
1121
elem->next = ctx->env->cfg->stubs;
sbin/unwind/libunbound/libunbound/libunbound.c
1122
ctx->env->cfg->stubs = elem;
sbin/unwind/libunbound/libunbound/libunbound.c
1129
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1134
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1138
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1143
ub_ctx_resolvconf(struct ub_ctx* ctx, const char* fname)
sbin/unwind/libunbound/libunbound/libunbound.c
116
alloc_init(&ctx->superalloc, NULL, 0);
sbin/unwind/libunbound/libunbound/libunbound.c
117
if(!(ctx->seed_rnd = ub_initstate(NULL))) {
sbin/unwind/libunbound/libunbound/libunbound.c
1175
if((retval=ub_ctx_set_fwd(ctx,
sbin/unwind/libunbound/libunbound/libunbound.c
118
ub_randfree(ctx->seed_rnd);
sbin/unwind/libunbound/libunbound/libunbound.c
119
free(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
1214
if((r = ub_ctx_set_fwd(ctx, addr)) != UB_NOERROR) {
sbin/unwind/libunbound/libunbound/libunbound.c
1223
return ub_ctx_set_fwd(ctx, "127.0.0.1");
sbin/unwind/libunbound/libunbound/libunbound.c
1229
ub_ctx_hosts(struct ub_ctx* ctx, const char* fname)
sbin/unwind/libunbound/libunbound/libunbound.c
123
lock_basic_init(&ctx->qqpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
1234
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1235
if(ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
1236
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
124
lock_basic_init(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
1240
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
125
lock_basic_init(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1253
if((retval=ub_ctx_hosts(ctx, buf)) !=0 ) {
sbin/unwind/libunbound/libunbound/libunbound.c
1256
retval=ub_ctx_hosts(ctx, buf);
sbin/unwind/libunbound/libunbound/libunbound.c
126
ctx->env = (struct module_env*)calloc(1, sizeof(*ctx->env));
sbin/unwind/libunbound/libunbound/libunbound.c
127
if(!ctx->env) {
sbin/unwind/libunbound/libunbound/libunbound.c
128
ub_randfree(ctx->seed_rnd);
sbin/unwind/libunbound/libunbound/libunbound.c
129
free(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
1317
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1318
if(!cfg_strlist_insert(&ctx->env->cfg->local_data,
sbin/unwind/libunbound/libunbound/libunbound.c
1320
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1325
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
133
ctx->env->cfg = config_create_forlib();
sbin/unwind/libunbound/libunbound/libunbound.c
1333
static int ub_ctx_finalize(struct ub_ctx* ctx)
sbin/unwind/libunbound/libunbound/libunbound.c
1336
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1337
if (!ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
1338
res = context_finalize(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
134
if(!ctx->env->cfg) {
sbin/unwind/libunbound/libunbound/libunbound.c
1340
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1345
int ub_ctx_print_local_zones(struct ub_ctx* ctx)
sbin/unwind/libunbound/libunbound/libunbound.c
1347
int res = ub_ctx_finalize(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
135
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
1350
local_zones_print(ctx->local_zones);
sbin/unwind/libunbound/libunbound/libunbound.c
1356
int ub_ctx_zone_add(struct ub_ctx* ctx, const char *zone_name,
sbin/unwind/libunbound/libunbound/libunbound.c
136
ub_randfree(ctx->seed_rnd);
sbin/unwind/libunbound/libunbound/libunbound.c
1365
int res = ub_ctx_finalize(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
137
free(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
1376
lock_rw_wrlock(&ctx->local_zones->lock);
sbin/unwind/libunbound/libunbound/libunbound.c
1377
if((z=local_zones_find(ctx->local_zones, nm, nmlen, nmlabs,
sbin/unwind/libunbound/libunbound/libunbound.c
1383
lock_rw_unlock(&ctx->local_zones->lock);
sbin/unwind/libunbound/libunbound/libunbound.c
1387
if(!local_zones_add_zone(ctx->local_zones, nm, nmlen, nmlabs,
sbin/unwind/libunbound/libunbound/libunbound.c
1389
lock_rw_unlock(&ctx->local_zones->lock);
sbin/unwind/libunbound/libunbound/libunbound.c
1392
lock_rw_unlock(&ctx->local_zones->lock);
sbin/unwind/libunbound/libunbound/libunbound.c
1397
int ub_ctx_zone_remove(struct ub_ctx* ctx, const char *zone_name)
sbin/unwind/libunbound/libunbound/libunbound.c
1404
int res = ub_ctx_finalize(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
1411
lock_rw_wrlock(&ctx->local_zones->lock);
sbin/unwind/libunbound/libunbound/libunbound.c
1412
if((z=local_zones_find(ctx->local_zones, nm, nmlen, nmlabs,
sbin/unwind/libunbound/libunbound/libunbound.c
1415
local_zones_del_zone(ctx->local_zones, z);
sbin/unwind/libunbound/libunbound/libunbound.c
1417
lock_rw_unlock(&ctx->local_zones->lock);
sbin/unwind/libunbound/libunbound/libunbound.c
142
if(!edns_known_options_init(ctx->env)) {
sbin/unwind/libunbound/libunbound/libunbound.c
1423
int ub_ctx_data_add(struct ub_ctx* ctx, const char *data)
sbin/unwind/libunbound/libunbound/libunbound.c
1425
int res = ub_ctx_finalize(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
1428
res = local_zones_add_RR(ctx->local_zones, data);
sbin/unwind/libunbound/libunbound/libunbound.c
143
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
1433
int ub_ctx_data_remove(struct ub_ctx* ctx, const char *data)
sbin/unwind/libunbound/libunbound/libunbound.c
1438
int res = ub_ctx_finalize(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
144
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
1444
local_zones_del_data(ctx->local_zones, nm, nmlen, nmlabs,
sbin/unwind/libunbound/libunbound/libunbound.c
145
ub_randfree(ctx->seed_rnd);
sbin/unwind/libunbound/libunbound/libunbound.c
1457
ub_ctx_set_event(struct ub_ctx* ctx, struct event_base* base) {
sbin/unwind/libunbound/libunbound/libunbound.c
146
free(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
1460
if (!ctx || !ctx->event_base || !base) {
sbin/unwind/libunbound/libunbound/libunbound.c
1463
if (ub_libevent_get_event_base(ctx->event_base) == base) {
sbin/unwind/libunbound/libunbound/libunbound.c
1468
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
1470
libworker_delete_event(ctx->event_worker);
sbin/unwind/libunbound/libunbound/libunbound.c
1471
ctx->event_worker = NULL;
sbin/unwind/libunbound/libunbound/libunbound.c
1474
ctx->event_base = new_base;
sbin/unwind/libunbound/libunbound/libunbound.c
1475
ctx->created_bg = 0;
sbin/unwind/libunbound/libunbound/libunbound.c
1476
ctx->dothread = 1;
sbin/unwind/libunbound/libunbound/libunbound.c
1477
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
150
ctx->env->auth_zones = auth_zones_create();
sbin/unwind/libunbound/libunbound/libunbound.c
151
if(!ctx->env->auth_zones) {
sbin/unwind/libunbound/libunbound/libunbound.c
152
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
153
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
154
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
155
ub_randfree(ctx->seed_rnd);
sbin/unwind/libunbound/libunbound/libunbound.c
156
free(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
160
ctx->env->edns_strings = edns_strings_create();
sbin/unwind/libunbound/libunbound/libunbound.c
161
if(!ctx->env->edns_strings) {
sbin/unwind/libunbound/libunbound/libunbound.c
162
auth_zones_delete(ctx->env->auth_zones);
sbin/unwind/libunbound/libunbound/libunbound.c
163
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
164
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
165
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
166
ub_randfree(ctx->seed_rnd);
sbin/unwind/libunbound/libunbound/libunbound.c
167
free(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
172
ctx->env->alloc = &ctx->superalloc;
sbin/unwind/libunbound/libunbound/libunbound.c
173
ctx->env->worker = NULL;
sbin/unwind/libunbound/libunbound/libunbound.c
174
ctx->env->need_to_validate = 0;
sbin/unwind/libunbound/libunbound/libunbound.c
175
modstack_init(&ctx->mods);
sbin/unwind/libunbound/libunbound/libunbound.c
176
ctx->env->modstack = &ctx->mods;
sbin/unwind/libunbound/libunbound/libunbound.c
177
rbtree_init(&ctx->queries, &context_query_cmp);
sbin/unwind/libunbound/libunbound/libunbound.c
178
return ctx;
sbin/unwind/libunbound/libunbound/libunbound.c
184
struct ub_ctx* ctx = ub_ctx_create_nopipe();
sbin/unwind/libunbound/libunbound/libunbound.c
185
if(!ctx)
sbin/unwind/libunbound/libunbound/libunbound.c
187
if((ctx->qq_pipe = tube_create()) == NULL) {
sbin/unwind/libunbound/libunbound/libunbound.c
189
ub_randfree(ctx->seed_rnd);
sbin/unwind/libunbound/libunbound/libunbound.c
190
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
191
modstack_call_deinit(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
192
modstack_call_destartup(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
193
modstack_free(&ctx->mods);
sbin/unwind/libunbound/libunbound/libunbound.c
195
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
196
edns_strings_delete(ctx->env->edns_strings);
sbin/unwind/libunbound/libunbound/libunbound.c
197
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
198
free(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
202
if((ctx->rr_pipe = tube_create()) == NULL) {
sbin/unwind/libunbound/libunbound/libunbound.c
204
tube_delete(ctx->qq_pipe);
sbin/unwind/libunbound/libunbound/libunbound.c
205
ub_randfree(ctx->seed_rnd);
sbin/unwind/libunbound/libunbound/libunbound.c
206
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
207
modstack_call_deinit(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
208
modstack_call_destartup(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
209
modstack_free(&ctx->mods);
sbin/unwind/libunbound/libunbound/libunbound.c
211
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
212
edns_strings_delete(ctx->env->edns_strings);
sbin/unwind/libunbound/libunbound/libunbound.c
213
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
214
free(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
218
return ctx;
sbin/unwind/libunbound/libunbound/libunbound.c
224
struct ub_ctx* ctx = ub_ctx_create_nopipe();
sbin/unwind/libunbound/libunbound/libunbound.c
225
if(!ctx)
sbin/unwind/libunbound/libunbound/libunbound.c
228
ctx->created_bg = 0;
sbin/unwind/libunbound/libunbound/libunbound.c
229
ctx->dothread = 1; /* the processing is in the same process,
sbin/unwind/libunbound/libunbound/libunbound.c
231
ctx->event_base = ueb;
sbin/unwind/libunbound/libunbound/libunbound.c
232
return ctx;
sbin/unwind/libunbound/libunbound/libunbound.c
238
struct ub_ctx* ctx = ub_ctx_create_nopipe();
sbin/unwind/libunbound/libunbound/libunbound.c
239
if(!ctx)
sbin/unwind/libunbound/libunbound/libunbound.c
242
ctx->created_bg = 0;
sbin/unwind/libunbound/libunbound/libunbound.c
243
ctx->dothread = 1; /* the processing is in the same process,
sbin/unwind/libunbound/libunbound/libunbound.c
245
ctx->event_base = ub_libevent_event_base(eb);
sbin/unwind/libunbound/libunbound/libunbound.c
246
if (!ctx->event_base) {
sbin/unwind/libunbound/libunbound/libunbound.c
247
ub_ctx_delete(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
250
ctx->event_base_malloced = 1;
sbin/unwind/libunbound/libunbound/libunbound.c
251
return ctx;
sbin/unwind/libunbound/libunbound/libunbound.c
263
static void ub_stop_bg(struct ub_ctx* ctx)
sbin/unwind/libunbound/libunbound/libunbound.c
266
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
267
if(ctx->created_bg) {
sbin/unwind/libunbound/libunbound/libunbound.c
271
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
272
lock_basic_lock(&ctx->qqpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
273
(void)tube_write_msg(ctx->qq_pipe, (uint8_t*)&cmd,
sbin/unwind/libunbound/libunbound/libunbound.c
275
lock_basic_unlock(&ctx->qqpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
276
lock_basic_lock(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
277
while(tube_read_msg(ctx->rr_pipe, &msg, &len, 0)) {
sbin/unwind/libunbound/libunbound/libunbound.c
285
lock_basic_unlock(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
289
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
290
if(ctx->dothread) {
sbin/unwind/libunbound/libunbound/libunbound.c
291
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
292
ub_thread_join(ctx->bg_tid);
sbin/unwind/libunbound/libunbound/libunbound.c
294
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
296
if(waitpid(ctx->bg_pid, NULL, 0) == -1) {
sbin/unwind/libunbound/libunbound/libunbound.c
304
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
309
ub_ctx_delete(struct ub_ctx* ctx)
sbin/unwind/libunbound/libunbound/libunbound.c
313
if(!ctx) return;
sbin/unwind/libunbound/libunbound/libunbound.c
319
if(ctx->created_bg && ctx->pipe_pid != getpid()) {
sbin/unwind/libunbound/libunbound/libunbound.c
325
if(ctx->qq_pipe->listen_com)
sbin/unwind/libunbound/libunbound/libunbound.c
326
ctx->qq_pipe->listen_com->event_added = 0;
sbin/unwind/libunbound/libunbound/libunbound.c
327
if(ctx->qq_pipe->res_com)
sbin/unwind/libunbound/libunbound/libunbound.c
328
ctx->qq_pipe->res_com->event_added = 0;
sbin/unwind/libunbound/libunbound/libunbound.c
329
if(ctx->rr_pipe->listen_com)
sbin/unwind/libunbound/libunbound/libunbound.c
330
ctx->rr_pipe->listen_com->event_added = 0;
sbin/unwind/libunbound/libunbound/libunbound.c
331
if(ctx->rr_pipe->res_com)
sbin/unwind/libunbound/libunbound/libunbound.c
332
ctx->rr_pipe->res_com->event_added = 0;
sbin/unwind/libunbound/libunbound/libunbound.c
339
if(ctx->created_bg && ctx->dothread && do_stop) {
sbin/unwind/libunbound/libunbound/libunbound.c
340
if(pthread_kill(ctx->bg_tid, 0) == ESRCH) {
sbin/unwind/libunbound/libunbound/libunbound.c
347
ub_stop_bg(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
348
if(ctx->created_bg && ctx->pipe_pid != getpid() && ctx->thread_worker) {
sbin/unwind/libunbound/libunbound/libunbound.c
353
ctx->thread_worker->base);
sbin/unwind/libunbound/libunbound/libunbound.c
354
libworker_delete_event(ctx->thread_worker);
sbin/unwind/libunbound/libunbound/libunbound.c
355
ctx->thread_worker = NULL;
sbin/unwind/libunbound/libunbound/libunbound.c
365
libworker_delete_event(ctx->event_worker);
sbin/unwind/libunbound/libunbound/libunbound.c
367
modstack_call_deinit(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
368
modstack_call_destartup(&ctx->mods, ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
369
modstack_free(&ctx->mods);
sbin/unwind/libunbound/libunbound/libunbound.c
370
a = ctx->alloc_list;
sbin/unwind/libunbound/libunbound/libunbound.c
373
a->super = &ctx->superalloc;
sbin/unwind/libunbound/libunbound/libunbound.c
378
local_zones_delete(ctx->local_zones);
sbin/unwind/libunbound/libunbound/libunbound.c
379
lock_basic_destroy(&ctx->qqpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
380
lock_basic_destroy(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
381
lock_basic_destroy(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
382
tube_delete(ctx->qq_pipe);
sbin/unwind/libunbound/libunbound/libunbound.c
383
tube_delete(ctx->rr_pipe);
sbin/unwind/libunbound/libunbound/libunbound.c
384
if(ctx->env) {
sbin/unwind/libunbound/libunbound/libunbound.c
385
slabhash_delete(ctx->env->msg_cache);
sbin/unwind/libunbound/libunbound/libunbound.c
386
rrset_cache_delete(ctx->env->rrset_cache);
sbin/unwind/libunbound/libunbound/libunbound.c
387
infra_delete(ctx->env->infra_cache);
sbin/unwind/libunbound/libunbound/libunbound.c
388
config_delete(ctx->env->cfg);
sbin/unwind/libunbound/libunbound/libunbound.c
389
edns_known_options_delete(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
390
edns_strings_delete(ctx->env->edns_strings);
sbin/unwind/libunbound/libunbound/libunbound.c
391
forwards_delete(ctx->env->fwds);
sbin/unwind/libunbound/libunbound/libunbound.c
392
hints_delete(ctx->env->hints);
sbin/unwind/libunbound/libunbound/libunbound.c
393
auth_zones_delete(ctx->env->auth_zones);
sbin/unwind/libunbound/libunbound/libunbound.c
394
free(ctx->env);
sbin/unwind/libunbound/libunbound/libunbound.c
396
ub_randfree(ctx->seed_rnd);
sbin/unwind/libunbound/libunbound/libunbound.c
397
alloc_clear(&ctx->superalloc);
sbin/unwind/libunbound/libunbound/libunbound.c
399
traverse_postorder(&ctx->queries, delq, NULL);
sbin/unwind/libunbound/libunbound/libunbound.c
404
if(ctx->event_base_malloced)
sbin/unwind/libunbound/libunbound/libunbound.c
405
free(ctx->event_base);
sbin/unwind/libunbound/libunbound/libunbound.c
406
free(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
413
ub_ctx_set_option(struct ub_ctx* ctx, const char* opt, const char* val)
sbin/unwind/libunbound/libunbound/libunbound.c
415
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
416
if(ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
417
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
420
if(!config_set_option(ctx->env->cfg, opt, val)) {
sbin/unwind/libunbound/libunbound/libunbound.c
421
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
424
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
429
ub_ctx_get_option(struct ub_ctx* ctx, const char* opt, char** str)
sbin/unwind/libunbound/libunbound/libunbound.c
432
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
433
r = config_get_option_collate(ctx->env->cfg, opt, str);
sbin/unwind/libunbound/libunbound/libunbound.c
434
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
442
ub_ctx_config(struct ub_ctx* ctx, const char* fname)
sbin/unwind/libunbound/libunbound/libunbound.c
444
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
445
if(ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
446
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
449
if(!config_read(ctx->env->cfg, fname, NULL)) {
sbin/unwind/libunbound/libunbound/libunbound.c
450
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
453
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
458
ub_ctx_add_ta(struct ub_ctx* ctx, const char* ta)
sbin/unwind/libunbound/libunbound/libunbound.c
462
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
463
if(ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
464
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
468
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_list, dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
469
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
472
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
477
ub_ctx_add_ta_file(struct ub_ctx* ctx, const char* fname)
sbin/unwind/libunbound/libunbound/libunbound.c
481
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
482
if(ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
483
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
487
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_file_list, dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
488
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
491
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
495
int ub_ctx_add_ta_autr(struct ub_ctx* ctx, const char* fname)
sbin/unwind/libunbound/libunbound/libunbound.c
499
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
500
if(ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
501
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
505
if(!cfg_strlist_insert(&ctx->env->cfg->auto_trust_anchor_file_list,
sbin/unwind/libunbound/libunbound/libunbound.c
507
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
510
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
515
ub_ctx_trustedkeys(struct ub_ctx* ctx, const char* fname)
sbin/unwind/libunbound/libunbound/libunbound.c
519
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
520
if(ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
521
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
525
if(!cfg_strlist_insert(&ctx->env->cfg->trusted_keys_file_list, dup)) {
sbin/unwind/libunbound/libunbound/libunbound.c
526
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
529
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
534
ub_ctx_debuglevel(struct ub_ctx* ctx, int d)
sbin/unwind/libunbound/libunbound/libunbound.c
536
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
538
ctx->env->cfg->verbosity = d;
sbin/unwind/libunbound/libunbound/libunbound.c
539
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
543
int ub_ctx_debugout(struct ub_ctx* ctx, void* out)
sbin/unwind/libunbound/libunbound/libunbound.c
545
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
548
ctx->logfile_override = 1;
sbin/unwind/libunbound/libunbound/libunbound.c
549
ctx->log_out = out;
sbin/unwind/libunbound/libunbound/libunbound.c
550
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
555
ub_ctx_async(struct ub_ctx* ctx, int dothread)
sbin/unwind/libunbound/libunbound/libunbound.c
561
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
562
if(ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
563
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
566
ctx->dothread = dothread;
sbin/unwind/libunbound/libunbound/libunbound.c
567
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
572
ub_poll(struct ub_ctx* ctx)
sbin/unwind/libunbound/libunbound/libunbound.c
575
return tube_poll(ctx->rr_pipe);
sbin/unwind/libunbound/libunbound/libunbound.c
579
ub_fd(struct ub_ctx* ctx)
sbin/unwind/libunbound/libunbound/libunbound.c
581
return tube_read_fd(ctx->rr_pipe);
sbin/unwind/libunbound/libunbound/libunbound.c
586
process_answer_detail(struct ub_ctx* ctx, uint8_t* msg, uint32_t len,
sbin/unwind/libunbound/libunbound/libunbound.c
597
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
598
q = context_deserialize_answer(ctx, msg, len, err);
sbin/unwind/libunbound/libunbound/libunbound.c
600
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
639
(void)rbtree_delete(&ctx->queries, q->node.key);
sbin/unwind/libunbound/libunbound/libunbound.c
640
ctx->num_async--;
sbin/unwind/libunbound/libunbound/libunbound.c
642
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
651
process_answer(struct ub_ctx* ctx, uint8_t* msg, uint32_t len)
sbin/unwind/libunbound/libunbound/libunbound.c
659
r = process_answer_detail(ctx, msg, len, &cb, &cbarg, &err, &res);
sbin/unwind/libunbound/libunbound/libunbound.c
670
ub_process(struct ub_ctx* ctx)
sbin/unwind/libunbound/libunbound/libunbound.c
677
lock_basic_lock(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
678
r = tube_read_msg(ctx->rr_pipe, &msg, &len, 1);
sbin/unwind/libunbound/libunbound/libunbound.c
679
lock_basic_unlock(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
684
if(!process_answer(ctx, msg, len)) {
sbin/unwind/libunbound/libunbound/libunbound.c
694
ub_wait(struct ub_ctx* ctx)
sbin/unwind/libunbound/libunbound/libunbound.c
706
lock_basic_lock(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
707
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
708
if(ctx->num_async == 0) {
sbin/unwind/libunbound/libunbound/libunbound.c
709
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
710
lock_basic_unlock(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
713
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
721
r = tube_wait(ctx->rr_pipe);
sbin/unwind/libunbound/libunbound/libunbound.c
723
r = tube_read_msg(ctx->rr_pipe, &msg, &len, 1);
sbin/unwind/libunbound/libunbound/libunbound.c
725
lock_basic_unlock(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
729
lock_basic_unlock(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
732
r = process_answer_detail(ctx, msg, len,
sbin/unwind/libunbound/libunbound/libunbound.c
734
lock_basic_unlock(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
741
lock_basic_unlock(&ctx->rrpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
748
ub_resolve(struct ub_ctx* ctx, const char* name, int rrtype,
sbin/unwind/libunbound/libunbound/libunbound.c
755
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
756
if(!ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
757
r = context_finalize(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
759
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
764
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
765
q = context_new(ctx, name, rrtype, rrclass, NULL, NULL, NULL);
sbin/unwind/libunbound/libunbound/libunbound.c
770
r = libworker_fg(ctx, q);
sbin/unwind/libunbound/libunbound/libunbound.c
772
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
773
(void)rbtree_delete(&ctx->queries, q->node.key);
sbin/unwind/libunbound/libunbound/libunbound.c
775
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
784
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
785
(void)rbtree_delete(&ctx->queries, q->node.key);
sbin/unwind/libunbound/libunbound/libunbound.c
787
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
792
ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype,
sbin/unwind/libunbound/libunbound/libunbound.c
801
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
802
if(!ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
803
r = context_finalize(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
805
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
809
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
810
if(!ctx->event_worker) {
sbin/unwind/libunbound/libunbound/libunbound.c
811
ctx->event_worker = libworker_create_event(ctx,
sbin/unwind/libunbound/libunbound/libunbound.c
812
ctx->event_base);
sbin/unwind/libunbound/libunbound/libunbound.c
813
if(!ctx->event_worker) {
sbin/unwind/libunbound/libunbound/libunbound.c
819
ub_comm_base_now(ctx->event_worker->base);
sbin/unwind/libunbound/libunbound/libunbound.c
822
q = context_new(ctx, name, rrtype, rrclass, NULL, callback, mydata);
sbin/unwind/libunbound/libunbound/libunbound.c
827
if((r=libworker_attach_mesh(ctx, q, async_id)) != 0)
sbin/unwind/libunbound/libunbound/libunbound.c
834
ub_resolve_async(struct ub_ctx* ctx, const char* name, int rrtype,
sbin/unwind/libunbound/libunbound/libunbound.c
843
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
844
if(!ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
845
int r = context_finalize(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
847
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
851
if(!ctx->created_bg) {
sbin/unwind/libunbound/libunbound/libunbound.c
853
ctx->created_bg = 1;
sbin/unwind/libunbound/libunbound/libunbound.c
854
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
855
r = libworker_bg(ctx);
sbin/unwind/libunbound/libunbound/libunbound.c
857
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
858
ctx->created_bg = 0;
sbin/unwind/libunbound/libunbound/libunbound.c
859
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
863
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
867
q = context_new(ctx, name, rrtype, rrclass, callback, NULL, mydata);
sbin/unwind/libunbound/libunbound/libunbound.c
872
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
875
(void)rbtree_delete(&ctx->queries, q->node.key);
sbin/unwind/libunbound/libunbound/libunbound.c
876
ctx->num_async--;
sbin/unwind/libunbound/libunbound/libunbound.c
878
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
883
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
885
lock_basic_lock(&ctx->qqpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
886
if(!tube_write_msg(ctx->qq_pipe, msg, len, 0)) {
sbin/unwind/libunbound/libunbound/libunbound.c
887
lock_basic_unlock(&ctx->qqpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
891
lock_basic_unlock(&ctx->qqpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
897
ub_cancel(struct ub_ctx* ctx, int async_id)
sbin/unwind/libunbound/libunbound/libunbound.c
902
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
903
q = (struct ctx_query*)rbtree_search(&ctx->queries, &async_id);
sbin/unwind/libunbound/libunbound/libunbound.c
906
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
913
if(!ctx->dothread) { /* if forked */
sbin/unwind/libunbound/libunbound/libunbound.c
914
(void)rbtree_delete(&ctx->queries, q->node.key);
sbin/unwind/libunbound/libunbound/libunbound.c
915
ctx->num_async--;
sbin/unwind/libunbound/libunbound/libunbound.c
918
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
92
struct ub_ctx* ctx;
sbin/unwind/libunbound/libunbound/libunbound.c
923
lock_basic_lock(&ctx->qqpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
924
if(!tube_write_msg(ctx->qq_pipe, msg, len, 0)) {
sbin/unwind/libunbound/libunbound/libunbound.c
925
lock_basic_unlock(&ctx->qqpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
929
lock_basic_unlock(&ctx->qqpipe_lock);
sbin/unwind/libunbound/libunbound/libunbound.c
932
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
975
ub_ctx_set_fwd(struct ub_ctx* ctx, const char* addr)
sbin/unwind/libunbound/libunbound/libunbound.c
981
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
982
if(ctx->finalized) {
sbin/unwind/libunbound/libunbound/libunbound.c
983
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libunbound.c
989
if(ctx->env->cfg->forwards &&
sbin/unwind/libunbound/libunbound/libunbound.c
990
(ctx->env->cfg->forwards->name &&
sbin/unwind/libunbound/libunbound/libunbound.c
991
strcmp(ctx->env->cfg->forwards->name, ".") == 0)) {
sbin/unwind/libunbound/libunbound/libunbound.c
992
s = ctx->env->cfg->forwards;
sbin/unwind/libunbound/libunbound/libunbound.c
993
ctx->env->cfg->forwards = s->next;
sbin/unwind/libunbound/libunbound/libunbound.c
997
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
131
libworker_setup(struct ub_ctx* ctx, int is_bg, struct ub_event_base* eb)
sbin/unwind/libunbound/libunbound/libworker.c
134
struct config_file* cfg = ctx->env->cfg;
sbin/unwind/libunbound/libunbound/libworker.c
139
w->ctx = ctx;
sbin/unwind/libunbound/libunbound/libworker.c
145
*w->env = *ctx->env;
sbin/unwind/libunbound/libunbound/libworker.c
146
w->env->alloc = context_obtain_alloc(ctx, !w->is_bg || w->is_bg_thread);
sbin/unwind/libunbound/libunbound/libworker.c
154
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
168
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
177
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
179
if(!(w->env->rnd = ub_initstate(ctx->seed_rnd))) {
sbin/unwind/libunbound/libunbound/libworker.c
181
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
187
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
212
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
217
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
235
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
242
w->env->mesh = mesh_create(&ctx->mods, w->env);
sbin/unwind/libunbound/libunbound/libworker.c
258
struct libworker* libworker_create_event(struct ub_ctx* ctx,
sbin/unwind/libunbound/libunbound/libworker.c
261
return libworker_setup(ctx, 0, eb);
sbin/unwind/libunbound/libunbound/libworker.c
270
lock_basic_lock(&w->ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
271
q = context_deserialize_cancel(w->ctx, buf, len);
sbin/unwind/libunbound/libunbound/libworker.c
272
lock_basic_unlock(&w->ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
274
q = context_deserialize_cancel(w->ctx, buf, len);
sbin/unwind/libunbound/libunbound/libworker.c
333
struct ub_ctx* ctx;
sbin/unwind/libunbound/libunbound/libworker.c
338
ctx = w->ctx;
sbin/unwind/libunbound/libunbound/libworker.c
344
tube_close_write(ctx->qq_pipe);
sbin/unwind/libunbound/libunbound/libworker.c
345
tube_close_read(ctx->rr_pipe);
sbin/unwind/libunbound/libunbound/libworker.c
347
if(!tube_setup_bg_listen(ctx->qq_pipe, w->base,
sbin/unwind/libunbound/libunbound/libworker.c
352
if(!tube_setup_bg_write(ctx->rr_pipe, w->base)) {
sbin/unwind/libunbound/libunbound/libworker.c
363
tube_remove_bg_listen(w->ctx->qq_pipe);
sbin/unwind/libunbound/libunbound/libworker.c
364
tube_remove_bg_write(w->ctx->rr_pipe);
sbin/unwind/libunbound/libunbound/libworker.c
366
(void)tube_write_msg(ctx->rr_pipe, (uint8_t*)&m,
sbin/unwind/libunbound/libunbound/libworker.c
370
tube_close_read(ctx->qq_pipe);
sbin/unwind/libunbound/libunbound/libworker.c
371
tube_close_write(ctx->rr_pipe);
sbin/unwind/libunbound/libunbound/libworker.c
376
int libworker_bg(struct ub_ctx* ctx)
sbin/unwind/libunbound/libunbound/libworker.c
380
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
381
if(ctx->dothread) {
sbin/unwind/libunbound/libunbound/libworker.c
382
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
383
w = libworker_setup(ctx, 1, NULL);
sbin/unwind/libunbound/libunbound/libworker.c
386
ctx->thread_worker = w;
sbin/unwind/libunbound/libunbound/libworker.c
390
ub_thread_create(&ctx->bg_tid, libworker_dobg, w);
sbin/unwind/libunbound/libunbound/libworker.c
392
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
397
switch((ctx->bg_pid=fork())) {
sbin/unwind/libunbound/libunbound/libworker.c
399
w = libworker_setup(ctx, 1, NULL);
sbin/unwind/libunbound/libunbound/libworker.c
402
tube_close_write(ctx->qq_pipe);
sbin/unwind/libunbound/libunbound/libworker.c
403
tube_close_read(ctx->rr_pipe);
sbin/unwind/libunbound/libunbound/libworker.c
413
tube_close_read(ctx->qq_pipe);
sbin/unwind/libunbound/libunbound/libworker.c
414
tube_close_write(ctx->rr_pipe);
sbin/unwind/libunbound/libunbound/libworker.c
605
int libworker_fg(struct ub_ctx* ctx, struct ctx_query* q)
sbin/unwind/libunbound/libunbound/libworker.c
607
struct libworker* w = libworker_setup(ctx, 0, NULL);
sbin/unwind/libunbound/libunbound/libworker.c
623
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
633
if(ctx->env->auth_zones && auth_zones_downstream_answer(
sbin/unwind/libunbound/libunbound/libworker.c
634
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
sbin/unwind/libunbound/libunbound/libworker.c
668
struct ub_ctx* ctx = q->w->ctx;
sbin/unwind/libunbound/libunbound/libworker.c
669
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
670
(void)rbtree_delete(&ctx->queries, q->node.key);
sbin/unwind/libunbound/libunbound/libworker.c
671
ctx->num_async--;
sbin/unwind/libunbound/libunbound/libworker.c
673
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
687
int libworker_attach_mesh(struct ub_ctx* ctx, struct ctx_query* q,
sbin/unwind/libunbound/libunbound/libworker.c
690
struct libworker* w = ctx->event_worker;
sbin/unwind/libunbound/libunbound/libworker.c
704
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
713
if(ctx->env->auth_zones && auth_zones_downstream_answer(
sbin/unwind/libunbound/libunbound/libworker.c
714
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
sbin/unwind/libunbound/libunbound/libworker.c
748
lock_basic_lock(&w->ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
763
lock_basic_unlock(&w->ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
769
(void)rbtree_delete(&w->ctx->queries, q->node.key);
sbin/unwind/libunbound/libunbound/libworker.c
770
w->ctx->num_async--;
sbin/unwind/libunbound/libunbound/libworker.c
778
if(!tube_queue_item(w->ctx->rr_pipe, msg, len)) {
sbin/unwind/libunbound/libunbound/libworker.c
793
struct ub_ctx* ctx = q->w->ctx;
sbin/unwind/libunbound/libunbound/libworker.c
794
lock_basic_lock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
795
(void)rbtree_delete(&ctx->queries, q->node.key);
sbin/unwind/libunbound/libunbound/libworker.c
796
ctx->num_async--;
sbin/unwind/libunbound/libunbound/libworker.c
798
lock_basic_unlock(&ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
823
lock_basic_lock(&w->ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
824
q = context_lookup_new_query(w->ctx, buf, len);
sbin/unwind/libunbound/libunbound/libworker.c
825
lock_basic_unlock(&w->ctx->cfglock);
sbin/unwind/libunbound/libunbound/libworker.c
827
q = context_deserialize_new_query(w->ctx, buf, len);
sbin/unwind/libunbound/libunbound/libworker.c
843
if(local_zones_answer(w->ctx->local_zones, w->env, &qinfo, &edns,
sbin/unwind/libunbound/libunbound/libworker.c
852
if(w->ctx->env->auth_zones && auth_zones_downstream_answer(
sbin/unwind/libunbound/libunbound/libworker.c
853
w->ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
sbin/unwind/libunbound/libunbound/libworker.c
97
context_release_alloc(w->ctx, w->env->alloc,
sbin/unwind/libunbound/libunbound/libworker.h
101
int libworker_bg(struct ub_ctx* ctx);
sbin/unwind/libunbound/libunbound/libworker.h
112
int libworker_fg(struct ub_ctx* ctx, struct ctx_query* q);
sbin/unwind/libunbound/libunbound/libworker.h
120
struct libworker* libworker_create_event(struct ub_ctx* ctx,
sbin/unwind/libunbound/libunbound/libworker.h
130
int libworker_attach_mesh(struct ub_ctx* ctx, struct ctx_query* q,
sbin/unwind/libunbound/libunbound/libworker.h
72
struct ub_ctx* ctx;
sbin/unwind/libunbound/libunbound/unbound-event.h
216
int ub_ctx_set_event(struct ub_ctx* ctx, struct event_base* base);
sbin/unwind/libunbound/libunbound/unbound-event.h
257
int ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype,
sbin/unwind/libunbound/libunbound/unbound.h
278
void ub_ctx_delete(struct ub_ctx* ctx);
sbin/unwind/libunbound/libunbound/unbound.h
293
int ub_ctx_set_option(struct ub_ctx* ctx, const char* opt, const char* val);
sbin/unwind/libunbound/libunbound/unbound.h
309
int ub_ctx_get_option(struct ub_ctx* ctx, const char* opt, char** str);
sbin/unwind/libunbound/libunbound/unbound.h
321
int ub_ctx_config(struct ub_ctx* ctx, const char* fname);
sbin/unwind/libunbound/libunbound/unbound.h
340
int ub_ctx_set_fwd(struct ub_ctx* ctx, const char* addr);
sbin/unwind/libunbound/libunbound/unbound.h
351
int ub_ctx_set_tls(struct ub_ctx* ctx, int tls);
sbin/unwind/libunbound/libunbound/unbound.h
371
int ub_ctx_set_stub(struct ub_ctx* ctx, const char* zone, const char* addr,
sbin/unwind/libunbound/libunbound/unbound.h
388
int ub_ctx_resolvconf(struct ub_ctx* ctx, const char* fname);
sbin/unwind/libunbound/libunbound/unbound.h
401
int ub_ctx_hosts(struct ub_ctx* ctx, const char* fname);
sbin/unwind/libunbound/libunbound/unbound.h
414
int ub_ctx_add_ta(struct ub_ctx* ctx, const char* ta);
sbin/unwind/libunbound/libunbound/unbound.h
425
int ub_ctx_add_ta_file(struct ub_ctx* ctx, const char* fname);
sbin/unwind/libunbound/libunbound/unbound.h
440
int ub_ctx_add_ta_autr(struct ub_ctx* ctx, const char* fname);
sbin/unwind/libunbound/libunbound/unbound.h
452
int ub_ctx_trustedkeys(struct ub_ctx* ctx, const char* fname);
sbin/unwind/libunbound/libunbound/unbound.h
462
int ub_ctx_debugout(struct ub_ctx* ctx, void* out);
sbin/unwind/libunbound/libunbound/unbound.h
472
int ub_ctx_debuglevel(struct ub_ctx* ctx, int d);
sbin/unwind/libunbound/libunbound/unbound.h
484
int ub_ctx_async(struct ub_ctx* ctx, int dothread);
sbin/unwind/libunbound/libunbound/unbound.h
494
int ub_poll(struct ub_ctx* ctx);
sbin/unwind/libunbound/libunbound/unbound.h
503
int ub_wait(struct ub_ctx* ctx);
sbin/unwind/libunbound/libunbound/unbound.h
514
int ub_fd(struct ub_ctx* ctx);
sbin/unwind/libunbound/libunbound/unbound.h
523
int ub_process(struct ub_ctx* ctx);
sbin/unwind/libunbound/libunbound/unbound.h
537
int ub_resolve(struct ub_ctx* ctx, const char* name, int rrtype,
sbin/unwind/libunbound/libunbound/unbound.h
568
int ub_resolve_async(struct ub_ctx* ctx, const char* name, int rrtype,
sbin/unwind/libunbound/libunbound/unbound.h
584
int ub_cancel(struct ub_ctx* ctx, int async_id);
sbin/unwind/libunbound/libunbound/unbound.h
605
int ub_ctx_print_local_zones(struct ub_ctx* ctx);
sbin/unwind/libunbound/libunbound/unbound.h
616
int ub_ctx_zone_add(struct ub_ctx* ctx, const char *zone_name,
sbin/unwind/libunbound/libunbound/unbound.h
626
int ub_ctx_zone_remove(struct ub_ctx* ctx, const char *zone_name);
sbin/unwind/libunbound/libunbound/unbound.h
636
int ub_ctx_data_add(struct ub_ctx* ctx, const char *data);
sbin/unwind/libunbound/libunbound/unbound.h
644
int ub_ctx_data_remove(struct ub_ctx* ctx, const char *data);
sbin/unwind/libunbound/services/listen_dnsport.c
4648
SSL_CTX* ctx = SSL_CTX_new(TLS_server_method());
sbin/unwind/libunbound/services/listen_dnsport.c
4649
if(!ctx) {
sbin/unwind/libunbound/services/listen_dnsport.c
4655
SSL_CTX_free(ctx);
sbin/unwind/libunbound/services/listen_dnsport.c
4660
SSL_CTX_free(ctx);
sbin/unwind/libunbound/services/listen_dnsport.c
4663
SSL_CTX_set_options(ctx,
sbin/unwind/libunbound/services/listen_dnsport.c
4668
SSL_CTX_set_mode(ctx, SSL_MODE_RELEASE_BUFFERS);
sbin/unwind/libunbound/services/listen_dnsport.c
4669
SSL_CTX_set_min_proto_version(ctx, TLS1_3_VERSION);
sbin/unwind/libunbound/services/listen_dnsport.c
4670
SSL_CTX_set_max_proto_version(ctx, TLS1_3_VERSION);
sbin/unwind/libunbound/services/listen_dnsport.c
4672
SSL_CTX_set_alpn_select_cb(ctx, doq_alpn_select_cb, NULL);
sbin/unwind/libunbound/services/listen_dnsport.c
4674
SSL_CTX_set_default_verify_paths(ctx);
sbin/unwind/libunbound/services/listen_dnsport.c
4675
if(!SSL_CTX_use_certificate_chain_file(ctx, pem)) {
sbin/unwind/libunbound/services/listen_dnsport.c
4679
SSL_CTX_free(ctx);
sbin/unwind/libunbound/services/listen_dnsport.c
4682
if(!SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM)) {
sbin/unwind/libunbound/services/listen_dnsport.c
4685
SSL_CTX_free(ctx);
sbin/unwind/libunbound/services/listen_dnsport.c
4688
if(!SSL_CTX_check_private_key(ctx)) {
sbin/unwind/libunbound/services/listen_dnsport.c
4691
SSL_CTX_free(ctx);
sbin/unwind/libunbound/services/listen_dnsport.c
4694
SSL_CTX_set_session_id_context(ctx, (void*)sid_ctx, strlen(sid_ctx));
sbin/unwind/libunbound/services/listen_dnsport.c
4696
if(!SSL_CTX_load_verify_locations(ctx, verifypem, NULL)) {
sbin/unwind/libunbound/services/listen_dnsport.c
4701
SSL_CTX_free(ctx);
sbin/unwind/libunbound/services/listen_dnsport.c
4704
SSL_CTX_set_client_CA_list(ctx, SSL_load_client_CA_file(
sbin/unwind/libunbound/services/listen_dnsport.c
4706
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER|
sbin/unwind/libunbound/services/listen_dnsport.c
4711
SSL_CTX_set_max_early_data(ctx, 0xffffffff);
sbin/unwind/libunbound/services/listen_dnsport.c
4713
if(ngtcp2_crypto_quictls_configure_server_context(ctx) != 0) {
sbin/unwind/libunbound/services/listen_dnsport.c
4715
SSL_CTX_free(ctx);
sbin/unwind/libunbound/services/listen_dnsport.c
4725
SSL_CTX_free(ctx);
sbin/unwind/libunbound/services/listen_dnsport.c
4733
SSL_CTX_set_quic_method(ctx, doq_socket->quic_method);
sbin/unwind/libunbound/services/listen_dnsport.c
4735
return ctx;
sbin/unwind/libunbound/services/listen_dnsport.c
4751
doq_ssl_server_setup(SSL_CTX* ctx, struct doq_conn* conn)
sbin/unwind/libunbound/services/listen_dnsport.c
4756
SSL* ssl = SSL_new(ctx);
sbin/unwind/libunbound/services/listen_dnsport.c
4902
conn->ssl = doq_ssl_server_setup((SSL_CTX*)conn->doq_socket->ctx,
sbin/unwind/libunbound/sldns/keyraw.c
290
EVP_PKEY_CTX* ctx;
sbin/unwind/libunbound/sldns/keyraw.c
320
ctx = EVP_PKEY_CTX_new_from_name(NULL, "DSA", NULL);
sbin/unwind/libunbound/sldns/keyraw.c
321
if(!ctx) {
sbin/unwind/libunbound/sldns/keyraw.c
329
if(EVP_PKEY_fromdata_init(ctx) <= 0) {
sbin/unwind/libunbound/sldns/keyraw.c
330
EVP_PKEY_CTX_free(ctx);
sbin/unwind/libunbound/sldns/keyraw.c
338
if(EVP_PKEY_fromdata(ctx, &evp_key, EVP_PKEY_PUBLIC_KEY, params) <= 0) {
sbin/unwind/libunbound/sldns/keyraw.c
339
EVP_PKEY_CTX_free(ctx);
sbin/unwind/libunbound/sldns/keyraw.c
348
EVP_PKEY_CTX_free(ctx);
sbin/unwind/libunbound/sldns/keyraw.c
458
EVP_PKEY_CTX* ctx;
sbin/unwind/libunbound/sldns/keyraw.c
488
ctx = EVP_PKEY_CTX_new_from_name(NULL, "RSA", NULL);
sbin/unwind/libunbound/sldns/keyraw.c
489
if(!ctx) {
sbin/unwind/libunbound/sldns/keyraw.c
495
if(EVP_PKEY_fromdata_init(ctx) <= 0) {
sbin/unwind/libunbound/sldns/keyraw.c
496
EVP_PKEY_CTX_free(ctx);
sbin/unwind/libunbound/sldns/keyraw.c
502
if(EVP_PKEY_fromdata(ctx, &evp_key, EVP_PKEY_PUBLIC_KEY, params) <= 0) {
sbin/unwind/libunbound/sldns/keyraw.c
503
EVP_PKEY_CTX_free(ctx);
sbin/unwind/libunbound/sldns/keyraw.c
510
EVP_PKEY_CTX_free(ctx);
sbin/unwind/libunbound/sldns/keyraw.c
567
EVP_PKEY_CTX* ctx;
sbin/unwind/libunbound/sldns/keyraw.c
601
ctx = EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL);
sbin/unwind/libunbound/sldns/keyraw.c
602
if(!ctx) {
sbin/unwind/libunbound/sldns/keyraw.c
606
if(EVP_PKEY_fromdata_init(ctx) <= 0) {
sbin/unwind/libunbound/sldns/keyraw.c
607
EVP_PKEY_CTX_free(ctx);
sbin/unwind/libunbound/sldns/keyraw.c
611
if(EVP_PKEY_fromdata(ctx, &evp_key, EVP_PKEY_PUBLIC_KEY, params) <= 0) {
sbin/unwind/libunbound/sldns/keyraw.c
612
EVP_PKEY_CTX_free(ctx);
sbin/unwind/libunbound/sldns/keyraw.c
616
EVP_PKEY_CTX_free(ctx);
sbin/unwind/libunbound/sldns/keyraw.c
706
EVP_MD_CTX* ctx;
sbin/unwind/libunbound/sldns/keyraw.c
707
ctx = EVP_MD_CTX_create();
sbin/unwind/libunbound/sldns/keyraw.c
708
if(!ctx)
sbin/unwind/libunbound/sldns/keyraw.c
710
if(!EVP_DigestInit_ex(ctx, md, NULL) ||
sbin/unwind/libunbound/sldns/keyraw.c
711
!EVP_DigestUpdate(ctx, data, len) ||
sbin/unwind/libunbound/sldns/keyraw.c
712
!EVP_DigestFinal_ex(ctx, dest, NULL)) {
sbin/unwind/libunbound/sldns/keyraw.c
713
EVP_MD_CTX_destroy(ctx);
sbin/unwind/libunbound/sldns/keyraw.c
716
EVP_MD_CTX_destroy(ctx);
sbin/unwind/libunbound/util/net_help.c
1232
SSL_CTX* ctx = (SSL_CTX*)ctxt;
sbin/unwind/libunbound/util/net_help.c
1235
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2)
sbin/unwind/libunbound/util/net_help.c
1241
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)
sbin/unwind/libunbound/util/net_help.c
1248
if((SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1) & SSL_OP_NO_TLSv1)
sbin/unwind/libunbound/util/net_help.c
1256
if((SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_1) & SSL_OP_NO_TLSv1_1)
sbin/unwind/libunbound/util/net_help.c
1264
if((SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_2) & SSL_OP_NO_TLSv1_2)
sbin/unwind/libunbound/util/net_help.c
1272
if((SSL_CTX_set_options(ctx, SSL_OP_NO_RENEGOTIATION) &
sbin/unwind/libunbound/util/net_help.c
1282
if(!SSL_CTX_set_cipher_list(ctx, "TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256"))
sbin/unwind/libunbound/util/net_help.c
1290
if((SSL_CTX_set_options(ctx, SSL_OP_IGNORE_UNEXPECTED_EOF) &
sbin/unwind/libunbound/util/net_help.c
1297
if((SSL_CTX_set_options(ctx, SSL_OP_CIPHER_SERVER_PREFERENCE) &
sbin/unwind/libunbound/util/net_help.c
1305
SSL_CTX_set_security_level(ctx, 0);
sbin/unwind/libunbound/util/net_help.c
1317
SSL_CTX* ctx = (SSL_CTX*)ctxt;
sbin/unwind/libunbound/util/net_help.c
1318
(void)ctx;
sbin/unwind/libunbound/util/net_help.c
1320
if(!SSL_CTX_set_ecdh_auto(ctx,1)) {
sbin/unwind/libunbound/util/net_help.c
1329
if (1 != SSL_CTX_set_tmp_ecdh (ctx, ecdh)) {
sbin/unwind/libunbound/util/net_help.c
1347
SSL_CTX* ctx = SSL_CTX_new(SSLv23_server_method());
sbin/unwind/libunbound/util/net_help.c
1348
if(!ctx) {
sbin/unwind/libunbound/util/net_help.c
1354
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1359
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1362
if(!listen_sslctx_setup(ctx)) {
sbin/unwind/libunbound/util/net_help.c
1363
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1366
if(!SSL_CTX_use_certificate_chain_file(ctx, pem)) {
sbin/unwind/libunbound/util/net_help.c
1369
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1372
if(!SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM)) {
sbin/unwind/libunbound/util/net_help.c
1375
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1378
if(!SSL_CTX_check_private_key(ctx)) {
sbin/unwind/libunbound/util/net_help.c
1381
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1384
listen_sslctx_setup_2(ctx);
sbin/unwind/libunbound/util/net_help.c
1386
if(!SSL_CTX_load_verify_locations(ctx, verifypem, NULL)) {
sbin/unwind/libunbound/util/net_help.c
1388
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1391
SSL_CTX_set_client_CA_list(ctx, SSL_load_client_CA_file(
sbin/unwind/libunbound/util/net_help.c
1393
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT, NULL);
sbin/unwind/libunbound/util/net_help.c
1396
if (!SSL_CTX_set_cipher_list(ctx, tls_ciphers)) {
sbin/unwind/libunbound/util/net_help.c
1400
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1406
if (!SSL_CTX_set_ciphersuites(ctx, tls_ciphersuites)) {
sbin/unwind/libunbound/util/net_help.c
1410
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1418
if(!setup_ticket_keys_cb(ctx)) {
sbin/unwind/libunbound/util/net_help.c
1420
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1427
SSL_CTX_set_alpn_select_cb(ctx, dot_alpn_select_cb, NULL);
sbin/unwind/libunbound/util/net_help.c
1430
SSL_CTX_set_alpn_select_cb(ctx, doh_alpn_select_cb, NULL);
sbin/unwind/libunbound/util/net_help.c
1434
return ctx;
sbin/unwind/libunbound/util/net_help.c
1538
SSL_CTX* ctx = SSL_CTX_new(SSLv23_client_method());
sbin/unwind/libunbound/util/net_help.c
1539
if(!ctx) {
sbin/unwind/libunbound/util/net_help.c
1544
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2)
sbin/unwind/libunbound/util/net_help.c
1547
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1551
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)
sbin/unwind/libunbound/util/net_help.c
1554
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1559
if((SSL_CTX_set_options(ctx, SSL_OP_NO_RENEGOTIATION) &
sbin/unwind/libunbound/util/net_help.c
1562
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1570
if((SSL_CTX_set_options(ctx, SSL_OP_IGNORE_UNEXPECTED_EOF) &
sbin/unwind/libunbound/util/net_help.c
1573
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1578
if(!SSL_CTX_use_certificate_chain_file(ctx, pem)) {
sbin/unwind/libunbound/util/net_help.c
1581
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1584
if(!SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM)) {
sbin/unwind/libunbound/util/net_help.c
1587
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1590
if(!SSL_CTX_check_private_key(ctx)) {
sbin/unwind/libunbound/util/net_help.c
1593
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1599
if(!SSL_CTX_load_verify_locations(ctx, verifypem, NULL)) {
sbin/unwind/libunbound/util/net_help.c
1601
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1607
if(!add_WIN_cacerts_to_openssl_store(ctx)) {
sbin/unwind/libunbound/util/net_help.c
1609
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1615
if(!SSL_CTX_set_default_verify_paths(ctx)) {
sbin/unwind/libunbound/util/net_help.c
1617
SSL_CTX_free(ctx);
sbin/unwind/libunbound/util/net_help.c
1622
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
sbin/unwind/libunbound/util/net_help.c
1624
return ctx;
sbin/unwind/libunbound/util/netevent.c
2742
doq_socket->ctx = (SSL_CTX*)quic_sslctx;
sbin/unwind/libunbound/util/netevent.h
1068
void* ctx;
sbin/unwind/libunbound/util/random.c
177
struct yarrow256_ctx ctx;
sbin/unwind/libunbound/util/random.c
190
yarrow256_init(&s->ctx, 0, NULL);
sbin/unwind/libunbound/util/random.c
194
yarrow256_seed(&s->ctx, YARROW256_SEED_FILE_SIZE, buf);
sbin/unwind/libunbound/util/random.c
195
s->seeded = yarrow256_is_seeded(&s->ctx);
sbin/unwind/libunbound/util/random.c
213
yarrow256_random(&s->ctx, sizeof(x), (uint8_t *)&x);
sbin/unwind/libunbound/validator/val_secalgo.c
1509
struct sha1_ctx ctx;
sbin/unwind/libunbound/validator/val_secalgo.c
1510
sha1_init(&ctx);
sbin/unwind/libunbound/validator/val_secalgo.c
1511
sha1_update(&ctx, len, buf);
sbin/unwind/libunbound/validator/val_secalgo.c
1512
sha1_digest(&ctx, SHA1_DIGEST_SIZE, res);
sbin/unwind/libunbound/validator/val_secalgo.c
1517
struct sha256_ctx ctx;
sbin/unwind/libunbound/validator/val_secalgo.c
1518
sha256_init(&ctx);
sbin/unwind/libunbound/validator/val_secalgo.c
1519
sha256_update(&ctx, len, buf);
sbin/unwind/libunbound/validator/val_secalgo.c
1520
sha256_digest(&ctx, SHA256_DIGEST_SIZE, res);
sbin/unwind/libunbound/validator/val_secalgo.c
1525
struct sha384_ctx ctx;
sbin/unwind/libunbound/validator/val_secalgo.c
1526
sha384_init(&ctx);
sbin/unwind/libunbound/validator/val_secalgo.c
1527
sha384_update(&ctx, len, buf);
sbin/unwind/libunbound/validator/val_secalgo.c
1528
sha384_digest(&ctx, SHA384_DIGEST_SIZE, res);
sbin/unwind/libunbound/validator/val_secalgo.c
1533
struct sha512_ctx ctx;
sbin/unwind/libunbound/validator/val_secalgo.c
1534
sha512_init(&ctx);
sbin/unwind/libunbound/validator/val_secalgo.c
1535
sha512_update(&ctx, len, buf);
sbin/unwind/libunbound/validator/val_secalgo.c
1536
sha512_digest(&ctx, SHA512_DIGEST_SIZE, res);
sbin/unwind/libunbound/validator/val_secalgo.c
164
EVP_MD_CTX* ctx;
sbin/unwind/libunbound/validator/val_secalgo.c
176
h->ctx = EVP_MD_CTX_create();
sbin/unwind/libunbound/validator/val_secalgo.c
177
if(!h->ctx) {
sbin/unwind/libunbound/validator/val_secalgo.c
181
if(!EVP_DigestInit_ex(h->ctx, md, NULL)) {
sbin/unwind/libunbound/validator/val_secalgo.c
182
EVP_MD_CTX_destroy(h->ctx);
sbin/unwind/libunbound/validator/val_secalgo.c
201
return EVP_DigestUpdate(hash->ctx, (unsigned char*)data,
sbin/unwind/libunbound/validator/val_secalgo.c
208
if(EVP_MD_CTX_size(hash->ctx) > (int)maxlen) {
sbin/unwind/libunbound/validator/val_secalgo.c
213
*resultlen = EVP_MD_CTX_size(hash->ctx);
sbin/unwind/libunbound/validator/val_secalgo.c
214
return EVP_DigestFinal_ex(hash->ctx, result, NULL);
sbin/unwind/libunbound/validator/val_secalgo.c
220
EVP_MD_CTX_destroy(hash->ctx);
sbin/unwind/libunbound/validator/val_secalgo.c
691
digest_ctx_free(EVP_MD_CTX* ctx, EVP_PKEY *evp_key,
sbin/unwind/libunbound/validator/val_secalgo.c
695
EVP_MD_CTX_destroy(ctx);
sbin/unwind/libunbound/validator/val_secalgo.c
697
EVP_MD_CTX_cleanup(ctx);
sbin/unwind/libunbound/validator/val_secalgo.c
698
free(ctx);
sbin/unwind/libunbound/validator/val_secalgo.c
740
EVP_MD_CTX* ctx;
sbin/unwind/libunbound/validator/val_secalgo.c
790
ctx = EVP_MD_CTX_new();
sbin/unwind/libunbound/validator/val_secalgo.c
792
ctx = (EVP_MD_CTX*)malloc(sizeof(*ctx));
sbin/unwind/libunbound/validator/val_secalgo.c
793
if(ctx) EVP_MD_CTX_init(ctx);
sbin/unwind/libunbound/validator/val_secalgo.c
795
if(!ctx) {
sbin/unwind/libunbound/validator/val_secalgo.c
803
if(EVP_DigestInit(ctx, digest_type) == 0) {
sbin/unwind/libunbound/validator/val_secalgo.c
806
digest_ctx_free(ctx, evp_key, sigblock,
sbin/unwind/libunbound/validator/val_secalgo.c
810
if(EVP_DigestUpdate(ctx, (unsigned char*)sldns_buffer_begin(buf),
sbin/unwind/libunbound/validator/val_secalgo.c
814
digest_ctx_free(ctx, evp_key, sigblock,
sbin/unwind/libunbound/validator/val_secalgo.c
819
res = EVP_VerifyFinal(ctx, sigblock, sigblock_len, evp_key);
sbin/unwind/libunbound/validator/val_secalgo.c
821
if(EVP_DigestVerifyInit(ctx, NULL, digest_type, NULL, evp_key) == 0) {
sbin/unwind/libunbound/validator/val_secalgo.c
824
digest_ctx_free(ctx, evp_key, sigblock,
sbin/unwind/libunbound/validator/val_secalgo.c
828
res = EVP_DigestVerify(ctx, sigblock, sigblock_len,
sbin/unwind/libunbound/validator/val_secalgo.c
832
digest_ctx_free(ctx, evp_key, sigblock,
sbin/unwind/libunbound/validator/val_secalgo.c
894
HASHContext* ctx;
sbin/unwind/libunbound/validator/val_secalgo.c
903
h->ctx = HASH_Create(tp);
sbin/unwind/libunbound/validator/val_secalgo.c
904
if(!h->ctx) {
sbin/unwind/libunbound/validator/val_secalgo.c
923
HASH_Update(hash->ctx, (unsigned char*)data, (unsigned int)len);
sbin/unwind/libunbound/validator/val_secalgo.c
931
if(HASH_ResultLenContext(hash->ctx) > (unsigned int)maxlen) {
sbin/unwind/libunbound/validator/val_secalgo.c
936
HASH_End(hash->ctx, (unsigned char*)result, &reslen,
sbin/unwind/libunbound/validator/val_secalgo.c
945
HASH_Destroy(hash->ctx);
sbin/unwind/resolver.c
107
struct ub_ctx *ctx;
sbin/unwind/resolver.c
1191
if (res == NULL || res->ctx == NULL)
sbin/unwind/resolver.c
1194
if (res->ctx->env->msg_cache != NULL) {
sbin/unwind/resolver.c
1196
if (res->ctx->env->msg_cache != unified_msg_cache ||
sbin/unwind/resolver.c
1197
res->ctx->env->rrset_cache != unified_rrset_cache ||
sbin/unwind/resolver.c
1198
res->ctx->env->key_cache != unified_key_cache ||
sbin/unwind/resolver.c
1199
res->ctx->env->neg_cache != unified_neg_cache)
sbin/unwind/resolver.c
1206
res->ctx->env->msg_cache = unified_msg_cache;
sbin/unwind/resolver.c
1207
res->ctx->env->rrset_cache = unified_rrset_cache;
sbin/unwind/resolver.c
1208
res->ctx->env->key_cache = unified_key_cache;
sbin/unwind/resolver.c
1209
res->ctx->env->neg_cache = unified_neg_cache;
sbin/unwind/resolver.c
1211
context_finalize(res->ctx);
sbin/unwind/resolver.c
1213
if (res->ctx->env->msg_cache != unified_msg_cache ||
sbin/unwind/resolver.c
1214
res->ctx->env->rrset_cache != unified_rrset_cache ||
sbin/unwind/resolver.c
1215
res->ctx->env->key_cache != unified_key_cache ||
sbin/unwind/resolver.c
1216
res->ctx->env->neg_cache != unified_neg_cache)
sbin/unwind/resolver.c
1280
if ((res->ctx = ub_ctx_create_event(ev_base)) == NULL) {
sbin/unwind/resolver.c
1286
ub_ctx_debuglevel(res->ctx, log_getverbose() & OPT_VERBOSE3 ?
sbin/unwind/resolver.c
1290
if ((err = ub_ctx_add_ta(res->ctx, ta->ta)) != 0) {
sbin/unwind/resolver.c
1291
ub_ctx_delete(res->ctx);
sbin/unwind/resolver.c
1311
if ((err = ub_ctx_set_option(res->ctx, options[i].name,
sbin/unwind/resolver.c
1313
ub_ctx_delete(res->ctx);
sbin/unwind/resolver.c
1323
if((err = ub_ctx_set_option(res->ctx, "do-ip4:",
sbin/unwind/resolver.c
1325
ub_ctx_delete(res->ctx);
sbin/unwind/resolver.c
1334
if((err = ub_ctx_set_option(res->ctx, "do-ip6:",
sbin/unwind/resolver.c
1336
ub_ctx_delete(res->ctx);
sbin/unwind/resolver.c
1345
if((err = ub_ctx_set_option(res->ctx, "use-syslog:",
sbin/unwind/resolver.c
1347
ub_ctx_delete(res->ctx);
sbin/unwind/resolver.c
1353
ub_ctx_debugout(res->ctx, NULL);
sbin/unwind/resolver.c
1374
ub_ctx_set_option(res->ctx, "tls-cert-bundle:",
sbin/unwind/resolver.c
1376
ub_ctx_set_tls(res->ctx, 1);
sbin/unwind/resolver.c
1383
ub_ctx_set_option(res->ctx, "tls-cert-bundle:",
sbin/unwind/resolver.c
1385
ub_ctx_set_tls(res->ctx, 1);
sbin/unwind/resolver.c
1389
ub_ctx_set_option(res->ctx, "tls-cert-bundle:",
sbin/unwind/resolver.c
1391
ub_ctx_set_tls(res->ctx, 1);
sbin/unwind/resolver.c
1406
if((err = ub_ctx_set_option(res->ctx, "local-zone:",
sbin/unwind/resolver.c
1408
ub_ctx_delete(res->ctx);
sbin/unwind/resolver.c
1435
if (res->ctx != NULL) {
sbin/unwind/resolver.c
1436
if (res->ctx->env->msg_cache == unified_msg_cache) {
sbin/unwind/resolver.c
1440
res->ctx->env->modinfo[val_id];
sbin/unwind/resolver.c
1441
res->ctx->env->msg_cache = NULL;
sbin/unwind/resolver.c
1442
res->ctx->env->rrset_cache = NULL;
sbin/unwind/resolver.c
1444
res->ctx->env->key_cache = NULL;
sbin/unwind/resolver.c
1446
res->ctx->env->neg_cache = NULL;
sbin/unwind/resolver.c
1450
ub_ctx_delete(res->ctx);
sbin/unwind/resolver.c
1460
struct ub_ctx *ctx;
sbin/unwind/resolver.c
1465
if ((ctx = ub_ctx_create_event(ev_base)) == NULL)
sbin/unwind/resolver.c
1469
if ((err = ub_ctx_set_option(ctx, options[i].name,
sbin/unwind/resolver.c
1476
context_finalize(ctx);
sbin/unwind/resolver.c
1478
if (ctx->env->msg_cache == NULL || ctx->env->rrset_cache == NULL ||
sbin/unwind/resolver.c
1479
ctx->env->key_cache == NULL || ctx->env->neg_cache == NULL)
sbin/unwind/resolver.c
1482
unified_msg_cache = ctx->env->msg_cache;
sbin/unwind/resolver.c
1483
unified_rrset_cache = ctx->env->rrset_cache;
sbin/unwind/resolver.c
1484
unified_key_cache = ctx->env->key_cache;
sbin/unwind/resolver.c
1485
unified_neg_cache = ctx->env->neg_cache;
sbin/unwind/resolver.c
1488
for (j = 0; j < ctx->mods.num; j++) {
sbin/unwind/resolver.c
1489
if (strcmp(ctx->mods.mod[j]->name, "validator") == 0) {
sbin/unwind/resolver.c
1498
val_env = (struct val_env*)ctx->env->modinfo[val_id];
sbin/unwind/resolver.c
1499
ctx->env->msg_cache = NULL;
sbin/unwind/resolver.c
1500
ctx->env->rrset_cache = NULL;
sbin/unwind/resolver.c
1501
ctx->env->key_cache = NULL;
sbin/unwind/resolver.c
1503
ctx->env->neg_cache = NULL;
sbin/unwind/resolver.c
1505
ub_ctx_delete(ctx);
sbin/unwind/resolver.c
1532
ub_ctx_set_fwd(res->ctx, fwd);
sbin/unwind/resolver.c
911
if ((err = ub_resolve_event(res->ctx, name, rrtype, rrclass,
sys/arch/alpha/include/alpha_cpu.h
432
alpha_pal_swpctx(unsigned long ctx)
sys/arch/alpha/include/alpha_cpu.h
434
register unsigned long a0 __asm("$16") = ctx;
sys/arch/amd64/stand/libsa/softraid_amd64.c
318
struct aes_xts_ctx ctx;
sys/arch/amd64/stand/libsa/softraid_amd64.c
365
aes_xts_setkey(&ctx, (u_char *)bv->sbv_keys, 64);
sys/arch/amd64/stand/libsa/softraid_amd64.c
377
aes_xts_reinit(&ctx, iv);
sys/arch/amd64/stand/libsa/softraid_amd64.c
379
aes_xts_decrypt(&ctx, bp + j);
sys/arch/arm64/stand/efiboot/softraid_arm64.c
312
struct aes_xts_ctx ctx;
sys/arch/arm64/stand/efiboot/softraid_arm64.c
357
aes_xts_setkey(&ctx, (u_char *)bv->sbv_keys, 64);
sys/arch/arm64/stand/efiboot/softraid_arm64.c
369
aes_xts_reinit(&ctx, iv);
sys/arch/arm64/stand/efiboot/softraid_arm64.c
371
aes_xts_decrypt(&ctx, bp + j);
sys/arch/i386/stand/libsa/softraid_i386.c
312
struct aes_xts_ctx ctx;
sys/arch/i386/stand/libsa/softraid_i386.c
358
aes_xts_setkey(&ctx, (u_char *)bv->sbv_keys, 64);
sys/arch/i386/stand/libsa/softraid_i386.c
370
aes_xts_reinit(&ctx, iv);
sys/arch/i386/stand/libsa/softraid_i386.c
372
aes_xts_decrypt(&ctx, bp + j);
sys/arch/riscv64/stand/efiboot/softraid_riscv64.c
312
struct aes_xts_ctx ctx;
sys/arch/riscv64/stand/efiboot/softraid_riscv64.c
357
aes_xts_setkey(&ctx, (u_char *)bv->sbv_keys, 64);
sys/arch/riscv64/stand/efiboot/softraid_riscv64.c
369
aes_xts_reinit(&ctx, iv);
sys/arch/riscv64/stand/efiboot/softraid_riscv64.c
371
aes_xts_decrypt(&ctx, bp + j);
sys/arch/sparc64/include/pte.h
101
#define tlb_flush_pte(va,ctx) (*sp_tlb_flush_pte)(va, ctx)
sys/arch/sparc64/include/pte.h
102
#define tlb_flush_ctx(ctx) (*sp_tlb_flush_ctx)(ctx)
sys/arch/sparc64/include/pte.h
117
#define TSB_TAG(g,ctx,va) ((((u_int64_t)((g)!=0))<<63)|(((u_int64_t)(ctx)&CTX_MASK)<<TSB_TAG_CTX_SHIFT)|(((u_int64_t)va)>>TSB_TAG_VA_SHIFT))
sys/arch/sparc64/include/pte.h
98
#define tlb_flush_pte(va,ctx) smp_tlb_flush_pte(va, ctx)
sys/arch/sparc64/include/pte.h
99
#define tlb_flush_ctx(ctx) smp_tlb_flush_ctx(ctx)
sys/arch/sparc64/sparc64/ipifuncs.c
220
smp_tlb_flush_pte(vaddr_t va, uint64_t ctx)
sys/arch/sparc64/sparc64/ipifuncs.c
222
(*sp_tlb_flush_pte)(va, ctx);
sys/arch/sparc64/sparc64/ipifuncs.c
228
sun4v_broadcast_ipi(sun4v_ipi_tlb_page_demap, va, ctx);
sys/arch/sparc64/sparc64/ipifuncs.c
230
sun4u_broadcast_ipi(sun4u_ipi_tlb_page_demap, va, ctx);
sys/arch/sparc64/sparc64/ipifuncs.c
234
smp_tlb_flush_ctx(uint64_t ctx)
sys/arch/sparc64/sparc64/ipifuncs.c
236
(*sp_tlb_flush_ctx)(ctx);
sys/arch/sparc64/sparc64/ipifuncs.c
242
sun4v_broadcast_ipi(sun4v_ipi_tlb_context_demap, ctx, 0);
sys/arch/sparc64/sparc64/ipifuncs.c
244
sun4u_broadcast_ipi(sun4u_ipi_tlb_context_demap, ctx, 0);
sys/arch/sparc64/sparc64/pmap.c
202
tsb_invalidate(int ctx, vaddr_t va)
sys/arch/sparc64/sparc64/pmap.c
208
tag = TSB_TAG(0, ctx, va);
sys/arch/sparc64/stand/ofwboot/softraid_sparc64.c
335
struct aes_xts_ctx ctx;
sys/arch/sparc64/stand/ofwboot/softraid_sparc64.c
375
aes_xts_setkey(&ctx, (u_char *)bv->sbv_keys, 64);
sys/arch/sparc64/stand/ofwboot/softraid_sparc64.c
392
aes_xts_reinit(&ctx, iv);
sys/arch/sparc64/stand/ofwboot/softraid_sparc64.c
394
aes_xts_decrypt(&ctx, bp + j);
sys/crypto/aes.c
661
AES_Setkey(AES_CTX *ctx, const uint8_t *key, int len)
sys/crypto/aes.c
663
ctx->num_rounds = aes_ct_keysched(ctx->sk, key, len);
sys/crypto/aes.c
664
if (ctx->num_rounds == 0)
sys/crypto/aes.c
666
aes_ct_skey_expand(ctx->sk_exp, ctx->num_rounds, ctx->sk);
sys/crypto/aes.c
671
AES_Encrypt_ECB(AES_CTX *ctx, const uint8_t *src,
sys/crypto/aes.c
693
aes_ct_bitslice_encrypt(ctx->num_rounds, ctx->sk_exp, q);
sys/crypto/aes.c
714
AES_Decrypt_ECB(AES_CTX *ctx, const uint8_t *src,
sys/crypto/aes.c
736
aes_ct_bitslice_decrypt(ctx->num_rounds, ctx->sk_exp, q);
sys/crypto/aes.c
757
AES_Encrypt(AES_CTX *ctx, const uint8_t *src, uint8_t *dst)
sys/crypto/aes.c
759
AES_Encrypt_ECB(ctx, src, dst, 1);
sys/crypto/aes.c
763
AES_Decrypt(AES_CTX *ctx, const uint8_t *src, uint8_t *dst)
sys/crypto/aes.c
765
AES_Decrypt_ECB(ctx, src, dst, 1);
sys/crypto/arc4.c
24
u_int8_t t = ctx->state[x]; \
sys/crypto/arc4.c
25
ctx->state[x] = ctx->state[y]; \
sys/crypto/arc4.c
26
ctx->state[y] = t; \
sys/crypto/arc4.c
30
rc4_keysetup(struct rc4_ctx *ctx, u_char *key, u_int32_t klen)
sys/crypto/arc4.c
37
ctx->state[i] = i;
sys/crypto/arc4.c
39
y = (key[x] + ctx->state[i] + y) & (RC4STATE - 1);
sys/crypto/arc4.c
43
ctx->x = ctx->y = 0;
sys/crypto/arc4.c
47
rc4_crypt(struct rc4_ctx *ctx, u_char *src, u_char *dst,
sys/crypto/arc4.c
53
ctx->x = (ctx->x + 1) & (RC4STATE - 1);
sys/crypto/arc4.c
54
ctx->y = (ctx->state[ctx->x] + ctx->y) & (RC4STATE - 1);
sys/crypto/arc4.c
55
RC4SWAP(ctx->x, ctx->y);
sys/crypto/arc4.c
56
dst[i] = src[i] ^ ctx->state[
sys/crypto/arc4.c
57
(ctx->state[ctx->x] + ctx->state[ctx->y]) & (RC4STATE - 1)];
sys/crypto/arc4.c
62
rc4_getbytes(struct rc4_ctx *ctx, u_char *dst, u_int32_t len)
sys/crypto/arc4.c
67
ctx->x = (ctx->x + 1) & (RC4STATE - 1);
sys/crypto/arc4.c
68
ctx->y = (ctx->state[ctx->x] + ctx->y) & (RC4STATE - 1);
sys/crypto/arc4.c
69
RC4SWAP(ctx->x, ctx->y);
sys/crypto/arc4.c
70
dst[i] = ctx->state[
sys/crypto/arc4.c
71
(ctx->state[ctx->x] + ctx->state[ctx->y]) & (RC4STATE - 1)];
sys/crypto/arc4.c
76
rc4_skip(struct rc4_ctx *ctx, u_int32_t len)
sys/crypto/arc4.c
79
ctx->x = (ctx->x + 1) & (RC4STATE - 1);
sys/crypto/arc4.c
80
ctx->y = (ctx->state[ctx->x] + ctx->y) & (RC4STATE - 1);
sys/crypto/arc4.c
81
RC4SWAP(ctx->x, ctx->y);
sys/crypto/chachapoly.c
102
poly1305_update((poly1305_state *)&ctx->poly, zeroes,
sys/crypto/chachapoly.c
110
CHACHA20_POLY1305_CTX *ctx = xctx;
sys/crypto/chachapoly.c
112
poly1305_finish((poly1305_state *)&ctx->poly, tag);
sys/crypto/chachapoly.c
113
explicit_bzero(ctx, sizeof(*ctx));
sys/crypto/chachapoly.c
29
struct chacha20_ctx *ctx = (struct chacha20_ctx *)sched;
sys/crypto/chachapoly.c
35
ctx->nonce[0] = 1;
sys/crypto/chachapoly.c
36
memcpy(ctx->nonce + CHACHA20_CTR, key + CHACHA20_KEYSIZE,
sys/crypto/chachapoly.c
38
chacha_keysetup((chacha_ctx *)&ctx->block, key, CHACHA20_KEYSIZE * 8);
sys/crypto/chachapoly.c
45
struct chacha20_ctx *ctx = (struct chacha20_ctx *)key;
sys/crypto/chachapoly.c
47
chacha_ivsetup((chacha_ctx *)ctx->block, iv, ctx->nonce);
sys/crypto/chachapoly.c
53
struct chacha20_ctx *ctx = (struct chacha20_ctx *)key;
sys/crypto/chachapoly.c
55
chacha_encrypt_bytes((chacha_ctx *)ctx->block, data, data,
sys/crypto/chachapoly.c
62
CHACHA20_POLY1305_CTX *ctx = xctx;
sys/crypto/chachapoly.c
64
memset(ctx, 0, sizeof(*ctx));
sys/crypto/chachapoly.c
70
CHACHA20_POLY1305_CTX *ctx = xctx;
sys/crypto/chachapoly.c
73
memcpy(ctx->nonce + CHACHA20_CTR, key + CHACHA20_KEYSIZE,
sys/crypto/chachapoly.c
75
chacha_keysetup((chacha_ctx *)&ctx->chacha, key, CHACHA20_KEYSIZE * 8);
sys/crypto/chachapoly.c
81
CHACHA20_POLY1305_CTX *ctx = xctx;
sys/crypto/chachapoly.c
84
chacha_ivsetup((chacha_ctx *)&ctx->chacha, iv, ctx->nonce);
sys/crypto/chachapoly.c
85
chacha_encrypt_bytes((chacha_ctx *)&ctx->chacha, ctx->key, ctx->key,
sys/crypto/chachapoly.c
87
poly1305_init((poly1305_state *)&ctx->poly, ctx->key);
sys/crypto/chachapoly.c
94
CHACHA20_POLY1305_CTX *ctx = xctx;
sys/crypto/chachapoly.c
97
poly1305_update((poly1305_state *)&ctx->poly, data, len);
sys/crypto/cmac.c
100
XOR(K, ctx->M_last);
sys/crypto/cmac.c
110
ctx->M_last[ctx->M_n] = 0x80;
sys/crypto/cmac.c
111
while (++ctx->M_n < 16)
sys/crypto/cmac.c
112
ctx->M_last[ctx->M_n] = 0;
sys/crypto/cmac.c
114
XOR(K, ctx->M_last);
sys/crypto/cmac.c
116
XOR(ctx->M_last, ctx->X);
sys/crypto/cmac.c
117
AES_Encrypt(&ctx->aesctx, ctx->X, digest);
sys/crypto/cmac.c
44
AES_CMAC_Init(AES_CMAC_CTX *ctx)
sys/crypto/cmac.c
46
memset(ctx->X, 0, sizeof ctx->X);
sys/crypto/cmac.c
47
ctx->M_n = 0;
sys/crypto/cmac.c
51
AES_CMAC_SetKey(AES_CMAC_CTX *ctx, const u_int8_t key[AES_CMAC_KEY_LENGTH])
sys/crypto/cmac.c
53
AES_Setkey(&ctx->aesctx, key, 16);
sys/crypto/cmac.c
57
AES_CMAC_Update(AES_CMAC_CTX *ctx, const u_int8_t *data, u_int len)
sys/crypto/cmac.c
61
if (ctx->M_n > 0) {
sys/crypto/cmac.c
62
mlen = MIN(16 - ctx->M_n, len);
sys/crypto/cmac.c
63
memcpy(ctx->M_last + ctx->M_n, data, mlen);
sys/crypto/cmac.c
64
ctx->M_n += mlen;
sys/crypto/cmac.c
65
if (ctx->M_n < 16 || len == mlen)
sys/crypto/cmac.c
67
XOR(ctx->M_last, ctx->X);
sys/crypto/cmac.c
68
AES_Encrypt(&ctx->aesctx, ctx->X, ctx->X);
sys/crypto/cmac.c
73
XOR(data, ctx->X);
sys/crypto/cmac.c
74
AES_Encrypt(&ctx->aesctx, ctx->X, ctx->X);
sys/crypto/cmac.c
79
memcpy(ctx->M_last, data, len);
sys/crypto/cmac.c
80
ctx->M_n = len;
sys/crypto/cmac.c
84
AES_CMAC_Final(u_int8_t digest[AES_CMAC_DIGEST_LENGTH], AES_CMAC_CTX *ctx)
sys/crypto/cmac.c
90
AES_Encrypt(&ctx->aesctx, K, K);
sys/crypto/cmac.c
98
if (ctx->M_n == 16) {
sys/crypto/cryptosoft.c
424
union authctx ctx;
sys/crypto/cryptosoft.c
432
bcopy(sw->sw_ictx, &ctx, axf->ctxsize);
sys/crypto/cryptosoft.c
437
(caddr_t) &ctx);
sys/crypto/cryptosoft.c
442
(caddr_t) &ctx);
sys/crypto/cryptosoft.c
448
axf->Update(&ctx, crd->crd_esn, 4);
sys/crypto/cryptosoft.c
460
axf->Final(aalg, &ctx);
sys/crypto/cryptosoft.c
461
bcopy(sw->sw_octx, &ctx, axf->ctxsize);
sys/crypto/cryptosoft.c
462
axf->Update(&ctx, aalg, axf->hashsize);
sys/crypto/cryptosoft.c
463
axf->Final(aalg, &ctx);
sys/crypto/cryptosoft.c
486
union authctx ctx;
sys/crypto/cryptosoft.c
526
bcopy(swa->sw_ictx, &ctx, axf->ctxsize);
sys/crypto/cryptosoft.c
566
axf->Reinit(&ctx, iv, ivlen);
sys/crypto/cryptosoft.c
592
axf->Update(&ctx, blk, axf->hashsize);
sys/crypto/cryptosoft.c
607
axf->Update(&ctx, blk, len);
sys/crypto/cryptosoft.c
609
axf->Update(&ctx, blk, len);
sys/crypto/cryptosoft.c
626
axf->Update(&ctx, blk, axf->hashsize);
sys/crypto/cryptosoft.c
635
axf->Update(&ctx, blk, axf->hashsize);
sys/crypto/cryptosoft.c
640
axf->Final(aalg, &ctx);
sys/crypto/gmac.c
104
AES_GMAC_CTX *ctx = xctx;
sys/crypto/gmac.c
106
bzero(ctx->ghash.H, GMAC_BLOCK_LEN);
sys/crypto/gmac.c
107
bzero(ctx->ghash.S, GMAC_BLOCK_LEN);
sys/crypto/gmac.c
108
bzero(ctx->ghash.Z, GMAC_BLOCK_LEN);
sys/crypto/gmac.c
109
bzero(ctx->J, GMAC_BLOCK_LEN);
sys/crypto/gmac.c
115
AES_GMAC_CTX *ctx = xctx;
sys/crypto/gmac.c
117
AES_Setkey(&ctx->K, key, klen - AESCTR_NONCESIZE);
sys/crypto/gmac.c
119
bcopy(key + klen - AESCTR_NONCESIZE, ctx->J, AESCTR_NONCESIZE);
sys/crypto/gmac.c
121
AES_Encrypt(&ctx->K, ctx->ghash.H, ctx->ghash.H);
sys/crypto/gmac.c
127
AES_GMAC_CTX *ctx = xctx;
sys/crypto/gmac.c
130
bcopy(iv, ctx->J + AESCTR_NONCESIZE, ivlen);
sys/crypto/gmac.c
136
AES_GMAC_CTX *ctx = xctx;
sys/crypto/gmac.c
143
(*ghash_update)(&ctx->ghash, (uint8_t *)data,
sys/crypto/gmac.c
148
(*ghash_update)(&ctx->ghash, (uint8_t *)blk,
sys/crypto/gmac.c
158
AES_GMAC_CTX *ctx = xctx;
sys/crypto/gmac.c
163
ctx->J[GMAC_BLOCK_LEN - 1] = 1;
sys/crypto/gmac.c
164
AES_Encrypt(&ctx->K, ctx->J, keystream);
sys/crypto/gmac.c
166
digest[i] = ctx->ghash.S[i] ^ keystream[i];
sys/crypto/gmac.c
76
ghash_update_mi(GHASH_CTX *ctx, uint8_t *X, size_t len)
sys/crypto/gmac.c
79
uint32_t *s = (uint32_t *)ctx->S;
sys/crypto/gmac.c
80
uint32_t *y = (uint32_t *)ctx->Z;
sys/crypto/gmac.c
89
ghash_gfmul((uint32_t *)ctx->S, (uint32_t *)ctx->H,
sys/crypto/gmac.c
90
(uint32_t *)ctx->S);
sys/crypto/gmac.c
96
bcopy(ctx->S, ctx->Z, GMAC_BLOCK_LEN);
sys/crypto/hmac.c
103
memcpy(k_ipad, ctx->key, ctx->key_len);
sys/crypto/hmac.c
107
SHA1Init(&ctx->ctx);
sys/crypto/hmac.c
108
SHA1Update(&ctx->ctx, k_ipad, SHA1_BLOCK_LENGTH);
sys/crypto/hmac.c
114
HMAC_SHA1_Update(HMAC_SHA1_CTX *ctx, const u_int8_t *data, u_int len)
sys/crypto/hmac.c
116
SHA1Update(&ctx->ctx, data, len);
sys/crypto/hmac.c
120
HMAC_SHA1_Final(u_int8_t digest[SHA1_DIGEST_LENGTH], HMAC_SHA1_CTX *ctx)
sys/crypto/hmac.c
125
SHA1Final(digest, &ctx->ctx);
sys/crypto/hmac.c
128
memcpy(k_opad, ctx->key, ctx->key_len);
sys/crypto/hmac.c
132
SHA1Init(&ctx->ctx);
sys/crypto/hmac.c
133
SHA1Update(&ctx->ctx, k_opad, SHA1_BLOCK_LENGTH);
sys/crypto/hmac.c
134
SHA1Update(&ctx->ctx, digest, SHA1_DIGEST_LENGTH);
sys/crypto/hmac.c
135
SHA1Final(digest, &ctx->ctx);
sys/crypto/hmac.c
141
HMAC_SHA256_Init(HMAC_SHA256_CTX *ctx, const u_int8_t *key, u_int key_len)
sys/crypto/hmac.c
147
SHA256Init(&ctx->ctx);
sys/crypto/hmac.c
148
SHA256Update(&ctx->ctx, key, key_len);
sys/crypto/hmac.c
149
SHA256Final(ctx->key, &ctx->ctx);
sys/crypto/hmac.c
150
ctx->key_len = SHA256_DIGEST_LENGTH;
sys/crypto/hmac.c
152
bcopy(key, ctx->key, key_len);
sys/crypto/hmac.c
153
ctx->key_len = key_len;
sys/crypto/hmac.c
157
memcpy(k_ipad, ctx->key, ctx->key_len);
sys/crypto/hmac.c
161
SHA256Init(&ctx->ctx);
sys/crypto/hmac.c
162
SHA256Update(&ctx->ctx, k_ipad, SHA256_BLOCK_LENGTH);
sys/crypto/hmac.c
168
HMAC_SHA256_Update(HMAC_SHA256_CTX *ctx, const u_int8_t *data, u_int len)
sys/crypto/hmac.c
170
SHA256Update(&ctx->ctx, data, len);
sys/crypto/hmac.c
174
HMAC_SHA256_Final(u_int8_t digest[SHA256_DIGEST_LENGTH], HMAC_SHA256_CTX *ctx)
sys/crypto/hmac.c
179
SHA256Final(digest, &ctx->ctx);
sys/crypto/hmac.c
182
memcpy(k_opad, ctx->key, ctx->key_len);
sys/crypto/hmac.c
186
SHA256Init(&ctx->ctx);
sys/crypto/hmac.c
187
SHA256Update(&ctx->ctx, k_opad, SHA256_BLOCK_LENGTH);
sys/crypto/hmac.c
188
SHA256Update(&ctx->ctx, digest, SHA256_DIGEST_LENGTH);
sys/crypto/hmac.c
189
SHA256Final(digest, &ctx->ctx);
sys/crypto/hmac.c
33
HMAC_MD5_Init(HMAC_MD5_CTX *ctx, const u_int8_t *key, u_int key_len)
sys/crypto/hmac.c
39
MD5Init(&ctx->ctx);
sys/crypto/hmac.c
40
MD5Update(&ctx->ctx, key, key_len);
sys/crypto/hmac.c
41
MD5Final(ctx->key, &ctx->ctx);
sys/crypto/hmac.c
42
ctx->key_len = MD5_DIGEST_LENGTH;
sys/crypto/hmac.c
44
bcopy(key, ctx->key, key_len);
sys/crypto/hmac.c
45
ctx->key_len = key_len;
sys/crypto/hmac.c
49
memcpy(k_ipad, ctx->key, ctx->key_len);
sys/crypto/hmac.c
53
MD5Init(&ctx->ctx);
sys/crypto/hmac.c
54
MD5Update(&ctx->ctx, k_ipad, MD5_BLOCK_LENGTH);
sys/crypto/hmac.c
60
HMAC_MD5_Update(HMAC_MD5_CTX *ctx, const u_int8_t *data, u_int len)
sys/crypto/hmac.c
62
MD5Update(&ctx->ctx, data, len);
sys/crypto/hmac.c
66
HMAC_MD5_Final(u_int8_t digest[MD5_DIGEST_LENGTH], HMAC_MD5_CTX *ctx)
sys/crypto/hmac.c
71
MD5Final(digest, &ctx->ctx);
sys/crypto/hmac.c
74
memcpy(k_opad, ctx->key, ctx->key_len);
sys/crypto/hmac.c
78
MD5Init(&ctx->ctx);
sys/crypto/hmac.c
79
MD5Update(&ctx->ctx, k_opad, MD5_BLOCK_LENGTH);
sys/crypto/hmac.c
80
MD5Update(&ctx->ctx, digest, MD5_DIGEST_LENGTH);
sys/crypto/hmac.c
81
MD5Final(digest, &ctx->ctx);
sys/crypto/hmac.c
87
HMAC_SHA1_Init(HMAC_SHA1_CTX *ctx, const u_int8_t *key, u_int key_len)
sys/crypto/hmac.c
93
SHA1Init(&ctx->ctx);
sys/crypto/hmac.c
94
SHA1Update(&ctx->ctx, key, key_len);
sys/crypto/hmac.c
95
SHA1Final(ctx->key, &ctx->ctx);
sys/crypto/hmac.c
96
ctx->key_len = SHA1_DIGEST_LENGTH;
sys/crypto/hmac.c
98
bcopy(key, ctx->key, key_len);
sys/crypto/hmac.c
99
ctx->key_len = key_len;
sys/crypto/hmac.h
23
MD5_CTX ctx;
sys/crypto/hmac.h
29
SHA1_CTX ctx;
sys/crypto/hmac.h
35
SHA2_CTX ctx;
sys/crypto/idgen.c
105
idgen32_rekey(struct idgen32_ctx *ctx)
sys/crypto/idgen.c
107
ctx->id32_counter = 0;
sys/crypto/idgen.c
108
ctx->id32_hibit ^= 0x80000000;
sys/crypto/idgen.c
109
ctx->id32_offset = arc4random();
sys/crypto/idgen.c
110
arc4random_buf(ctx->id32_key, sizeof(ctx->id32_key));
sys/crypto/idgen.c
111
ctx->id32_rekey_time = getuptime() + IDGEN32_REKEY_TIME;
sys/crypto/idgen.c
115
idgen32_init(struct idgen32_ctx *ctx)
sys/crypto/idgen.c
117
bzero(ctx, sizeof(*ctx));
sys/crypto/idgen.c
118
ctx->id32_hibit = arc4random() & 0x80000000;
sys/crypto/idgen.c
119
idgen32_rekey(ctx);
sys/crypto/idgen.c
123
idgen32(struct idgen32_ctx *ctx)
sys/crypto/idgen.c
129
if (ctx->id32_counter > IDGEN32_REKEY_LIMIT ||
sys/crypto/idgen.c
130
ctx->id32_rekey_time < getuptime())
sys/crypto/idgen.c
131
idgen32_rekey(ctx);
sys/crypto/idgen.c
132
ret = ctx->id32_hibit | idgen32_permute(ctx,
sys/crypto/idgen.c
133
(ctx->id32_offset + ctx->id32_counter++) & 0x7fffffff);
sys/crypto/idgen.c
84
idgen32_permute(struct idgen32_ctx *ctx, u_int32_t in)
sys/crypto/idgen.c
94
wr ^= (idgen32_g(ctx->id32_key, r, wl) ^ r);
sys/crypto/idgen.c
96
wl ^= (idgen32_g(ctx->id32_key, r, wr) ^ r) & 0x7fff;
sys/crypto/idgen.c
99
wr ^= (idgen32_g(ctx->id32_key, r, wl) ^ r);
sys/crypto/key_wrap.c
33
aes_key_wrap_set_key(aes_key_wrap_ctx *ctx, const u_int8_t *K, size_t K_len)
sys/crypto/key_wrap.c
35
AES_Setkey(&ctx->ctx, K, K_len);
sys/crypto/key_wrap.c
39
aes_key_wrap_set_key_wrap_only(aes_key_wrap_ctx *ctx, const u_int8_t *K,
sys/crypto/key_wrap.c
42
AES_Setkey(&ctx->ctx, K, K_len);
sys/crypto/key_wrap.c
46
aes_key_wrap(aes_key_wrap_ctx *ctx, const u_int8_t *P, size_t n, u_int8_t *C)
sys/crypto/key_wrap.c
64
AES_Encrypt(&ctx->ctx, (caddr_t)B, (caddr_t)B);
sys/crypto/key_wrap.c
79
aes_key_unwrap(aes_key_wrap_ctx *ctx, const u_int8_t *C, u_int8_t *P, size_t n)
sys/crypto/key_wrap.c
99
AES_Decrypt(&ctx->ctx, (caddr_t)B, (caddr_t)B);
sys/crypto/key_wrap.h
23
AES_CTX ctx;
sys/crypto/md5.c
104
MD5Final(unsigned char digest[MD5_DIGEST_LENGTH], MD5_CTX *ctx)
sys/crypto/md5.c
111
PUT_64BIT_LE(count, ctx->count);
sys/crypto/md5.c
115
((ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1));
sys/crypto/md5.c
118
MD5Update(ctx, PADDING, padlen - 8); /* padlen - 8 <= 64 */
sys/crypto/md5.c
119
MD5Update(ctx, count, 8);
sys/crypto/md5.c
122
PUT_32BIT_LE(digest + i * 4, ctx->state[i]);
sys/crypto/md5.c
123
explicit_bzero(ctx, sizeof(*ctx)); /* in case it's sensitive */
sys/crypto/md5.c
51
MD5Init(MD5_CTX *ctx)
sys/crypto/md5.c
53
ctx->count = 0;
sys/crypto/md5.c
54
ctx->state[0] = 0x67452301;
sys/crypto/md5.c
55
ctx->state[1] = 0xefcdab89;
sys/crypto/md5.c
56
ctx->state[2] = 0x98badcfe;
sys/crypto/md5.c
57
ctx->state[3] = 0x10325476;
sys/crypto/md5.c
65
MD5Update(MD5_CTX *ctx, const void *inputptr, size_t len)
sys/crypto/md5.c
71
have = (size_t)((ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1));
sys/crypto/md5.c
75
ctx->count += (u_int64_t)len << 3;
sys/crypto/md5.c
79
memcpy(ctx->buffer + have, input, need);
sys/crypto/md5.c
80
MD5Transform(ctx->state, ctx->buffer);
sys/crypto/md5.c
88
MD5Transform(ctx->state, input);
sys/crypto/md5.c
96
memcpy(ctx->buffer + have, input, len);
sys/crypto/michael.c
57
michael_init(MICHAEL_CTX *ctx)
sys/crypto/michael.c
59
bzero(ctx, sizeof(MICHAEL_CTX));
sys/crypto/michael.c
63
michael_update(MICHAEL_CTX *ctx, const u_int8_t *data, u_int len)
sys/crypto/michael.c
68
ctx->michael_state |= data[i] << (ctx->michael_count << 3);
sys/crypto/michael.c
69
ctx->michael_count++;
sys/crypto/michael.c
71
if (ctx->michael_count >= MICHAEL_RAW_BLOCK_LENGTH) {
sys/crypto/michael.c
72
ctx->michael_l ^= ctx->michael_state;
sys/crypto/michael.c
73
MICHAEL_BLOCK(ctx->michael_l, ctx->michael_r);
sys/crypto/michael.c
74
ctx->michael_state = ctx->michael_count = 0;
sys/crypto/michael.c
80
michael_final(u_int8_t digest[MICHAEL_DIGEST_LENGTH], MICHAEL_CTX *ctx)
sys/crypto/michael.c
85
michael_update(ctx, pad, sizeof(pad));
sys/crypto/michael.c
87
PUTLE32(digest, ctx->michael_l);
sys/crypto/michael.c
88
PUTLE32(digest + MICHAEL_RAW_BLOCK_LENGTH, ctx->michael_r);
sys/crypto/michael.c
92
michael_key(const u_int8_t *key, MICHAEL_CTX *ctx)
sys/crypto/michael.c
94
ctx->michael_l = ctx->michael_key[0] =
sys/crypto/michael.c
96
ctx->michael_r = ctx->michael_key[1] =
sys/crypto/rijndael.c
1125
rijndael_set_key_enc_only(rijndael_ctx *ctx, const u_char *key, int bits)
sys/crypto/rijndael.c
1129
rounds = rijndaelKeySetupEnc(ctx->ek, key, bits);
sys/crypto/rijndael.c
1133
ctx->Nr = rounds;
sys/crypto/rijndael.c
1134
ctx->enc_only = 1;
sys/crypto/rijndael.c
1141
rijndael_set_key(rijndael_ctx *ctx, const u_char *key, int bits)
sys/crypto/rijndael.c
1145
rounds = rijndaelKeySetupEnc(ctx->ek, key, bits);
sys/crypto/rijndael.c
1148
if (rijndaelKeySetupDec(ctx->dk, key, bits) != rounds)
sys/crypto/rijndael.c
1151
ctx->Nr = rounds;
sys/crypto/rijndael.c
1152
ctx->enc_only = 0;
sys/crypto/rijndael.c
1158
rijndael_decrypt(rijndael_ctx *ctx, const u_char *src, u_char *dst)
sys/crypto/rijndael.c
1160
rijndaelDecrypt(ctx->dk, ctx->Nr, src, dst);
sys/crypto/rijndael.c
1164
rijndael_encrypt(rijndael_ctx *ctx, const u_char *src, u_char *dst)
sys/crypto/rijndael.c
1166
rijndaelEncrypt(ctx->ek, ctx->Nr, src, dst);
sys/crypto/rmd160.c
100
ctx->state[4] = H4;
sys/crypto/rmd160.c
104
RMD160Update(RMD160_CTX *ctx, const u_char *input, u_int32_t len)
sys/crypto/rmd160.c
108
have = (ctx->count/8) % 64;
sys/crypto/rmd160.c
110
ctx->count += 8 * len;
sys/crypto/rmd160.c
115
memcpy(ctx->buffer + have, input, need);
sys/crypto/rmd160.c
116
RMD160Transform(ctx->state, ctx->buffer);
sys/crypto/rmd160.c
122
RMD160Transform(ctx->state, input+off);
sys/crypto/rmd160.c
127
memcpy(ctx->buffer + have, input+off, len-off);
sys/crypto/rmd160.c
131
RMD160Final(u_char digest[20], RMD160_CTX *ctx)
sys/crypto/rmd160.c
137
PUT_64BIT_LE(size, ctx->count);
sys/crypto/rmd160.c
143
padlen = 64 - ((ctx->count/8) % 64);
sys/crypto/rmd160.c
146
RMD160Update(ctx, PADDING, padlen - 8); /* padlen - 8 <= 64 */
sys/crypto/rmd160.c
147
RMD160Update(ctx, size, 8);
sys/crypto/rmd160.c
151
PUT_32BIT_LE(digest + i*4, ctx->state[i]);
sys/crypto/rmd160.c
153
explicit_bzero(ctx, sizeof (*ctx));
sys/crypto/rmd160.c
93
RMD160Init(RMD160_CTX *ctx)
sys/crypto/rmd160.c
95
ctx->count = 0;
sys/crypto/rmd160.c
96
ctx->state[0] = H0;
sys/crypto/rmd160.c
97
ctx->state[1] = H1;
sys/crypto/rmd160.c
98
ctx->state[2] = H2;
sys/crypto/rmd160.c
99
ctx->state[3] = H3;
sys/crypto/siphash.c
100
len -= sizeof(ctx->buf);
sys/crypto/siphash.c
101
ptr += sizeof(ctx->buf);
sys/crypto/siphash.c
105
memcpy(ctx->buf, ptr, len);
sys/crypto/siphash.c
109
SipHash_Final(void *dst, SIPHASH_CTX *ctx, int rc, int rf)
sys/crypto/siphash.c
113
htolem64(&r, SipHash_End(ctx, rc, rf));
sys/crypto/siphash.c
118
SipHash_End(SIPHASH_CTX *ctx, int rc, int rf)
sys/crypto/siphash.c
123
used = ctx->bytes % sizeof(ctx->buf);
sys/crypto/siphash.c
124
left = sizeof(ctx->buf) - used;
sys/crypto/siphash.c
125
memset(&ctx->buf[used], 0, left - 1);
sys/crypto/siphash.c
126
ctx->buf[7] = ctx->bytes;
sys/crypto/siphash.c
128
SipHash_CRounds(ctx, rc);
sys/crypto/siphash.c
129
ctx->v[2] ^= 0xff;
sys/crypto/siphash.c
130
SipHash_Rounds(ctx, rf);
sys/crypto/siphash.c
132
r = (ctx->v[0] ^ ctx->v[1]) ^ (ctx->v[2] ^ ctx->v[3]);
sys/crypto/siphash.c
133
explicit_bzero(ctx, sizeof(*ctx));
sys/crypto/siphash.c
140
SIPHASH_CTX ctx;
sys/crypto/siphash.c
142
SipHash_Init(&ctx, key);
sys/crypto/siphash.c
143
SipHash_Update(&ctx, rc, rf, src, len);
sys/crypto/siphash.c
144
return (SipHash_End(&ctx, rc, rf));
sys/crypto/siphash.c
150
SipHash_Rounds(SIPHASH_CTX *ctx, int rounds)
sys/crypto/siphash.c
153
ctx->v[0] += ctx->v[1];
sys/crypto/siphash.c
154
ctx->v[2] += ctx->v[3];
sys/crypto/siphash.c
155
ctx->v[1] = SIP_ROTL(ctx->v[1], 13);
sys/crypto/siphash.c
156
ctx->v[3] = SIP_ROTL(ctx->v[3], 16);
sys/crypto/siphash.c
158
ctx->v[1] ^= ctx->v[0];
sys/crypto/siphash.c
159
ctx->v[3] ^= ctx->v[2];
sys/crypto/siphash.c
160
ctx->v[0] = SIP_ROTL(ctx->v[0], 32);
sys/crypto/siphash.c
162
ctx->v[2] += ctx->v[1];
sys/crypto/siphash.c
163
ctx->v[0] += ctx->v[3];
sys/crypto/siphash.c
164
ctx->v[1] = SIP_ROTL(ctx->v[1], 17);
sys/crypto/siphash.c
165
ctx->v[3] = SIP_ROTL(ctx->v[3], 21);
sys/crypto/siphash.c
167
ctx->v[1] ^= ctx->v[2];
sys/crypto/siphash.c
168
ctx->v[3] ^= ctx->v[0];
sys/crypto/siphash.c
169
ctx->v[2] = SIP_ROTL(ctx->v[2], 32);
sys/crypto/siphash.c
174
SipHash_CRounds(SIPHASH_CTX *ctx, int rounds)
sys/crypto/siphash.c
176
uint64_t m = lemtoh64((uint64_t *)ctx->buf);
sys/crypto/siphash.c
178
ctx->v[3] ^= m;
sys/crypto/siphash.c
179
SipHash_Rounds(ctx, rounds);
sys/crypto/siphash.c
180
ctx->v[0] ^= m;
sys/crypto/siphash.c
55
SipHash_Init(SIPHASH_CTX *ctx, const SIPHASH_KEY *key)
sys/crypto/siphash.c
62
ctx->v[0] = 0x736f6d6570736575ULL ^ k0;
sys/crypto/siphash.c
63
ctx->v[1] = 0x646f72616e646f6dULL ^ k1;
sys/crypto/siphash.c
64
ctx->v[2] = 0x6c7967656e657261ULL ^ k0;
sys/crypto/siphash.c
65
ctx->v[3] = 0x7465646279746573ULL ^ k1;
sys/crypto/siphash.c
67
memset(ctx->buf, 0, sizeof(ctx->buf));
sys/crypto/siphash.c
68
ctx->bytes = 0;
sys/crypto/siphash.c
72
SipHash_Update(SIPHASH_CTX *ctx, int rc, int rf, const void *src, size_t len)
sys/crypto/siphash.c
80
used = ctx->bytes % sizeof(ctx->buf);
sys/crypto/siphash.c
81
ctx->bytes += len;
sys/crypto/siphash.c
84
left = sizeof(ctx->buf) - used;
sys/crypto/siphash.c
87
memcpy(&ctx->buf[used], ptr, left);
sys/crypto/siphash.c
88
SipHash_CRounds(ctx, rc);
sys/crypto/siphash.c
92
memcpy(&ctx->buf[used], ptr, len);
sys/crypto/siphash.c
97
while (len >= sizeof(ctx->buf)) {
sys/crypto/siphash.c
98
memcpy(ctx->buf, ptr, sizeof(ctx->buf));
sys/crypto/siphash.c
99
SipHash_CRounds(ctx, rc);
sys/crypto/xform.c
410
struct aes_ctr_ctx *ctx;
sys/crypto/xform.c
412
ctx = (struct aes_ctr_ctx *)key;
sys/crypto/xform.c
413
bcopy(iv, ctx->ac_block + AESCTR_NONCESIZE, AESCTR_IVSIZE);
sys/crypto/xform.c
416
bzero(ctx->ac_block + AESCTR_NONCESIZE + AESCTR_IVSIZE, 4);
sys/crypto/xform.c
422
struct aes_ctr_ctx *ctx;
sys/crypto/xform.c
424
ctx = (struct aes_ctr_ctx *)key;
sys/crypto/xform.c
425
bcopy(iv, ctx->ac_block + AESCTR_NONCESIZE, AESCTR_IVSIZE);
sys/crypto/xform.c
428
bzero(ctx->ac_block + AESCTR_NONCESIZE + AESCTR_IVSIZE, 4);
sys/crypto/xform.c
429
ctx->ac_block[AESCTR_BLOCKSIZE - 1] = 1; /* GCM starts with 1 */
sys/crypto/xform.c
435
struct aes_ctr_ctx *ctx;
sys/crypto/xform.c
439
ctx = (struct aes_ctr_ctx *)key;
sys/crypto/xform.c
443
if (++ctx->ac_block[i]) /* continue on overflow */
sys/crypto/xform.c
445
AES_Encrypt(&ctx->ac_key, ctx->ac_block, keystream);
sys/crypto/xform.c
454
struct aes_ctr_ctx *ctx;
sys/crypto/xform.c
459
ctx = (struct aes_ctr_ctx *)sched;
sys/crypto/xform.c
460
if (AES_Setkey(&ctx->ac_key, key, len - AESCTR_NONCESIZE) != 0)
sys/crypto/xform.c
462
bcopy(key + len - AESCTR_NONCESIZE, ctx->ac_block, AESCTR_NONCESIZE);
sys/crypto/xform.c
469
struct aes_xts_ctx *ctx = (struct aes_xts_ctx *)key;
sys/crypto/xform.c
479
ctx->tweak[i] = blocknum & 0xff;
sys/crypto/xform.c
483
bzero(ctx->tweak + AES_XTS_IVSIZE, AES_XTS_IVSIZE);
sys/crypto/xform.c
485
rijndael_encrypt(&ctx->key2, ctx->tweak, ctx->tweak);
sys/crypto/xform.c
489
aes_xts_crypt(struct aes_xts_ctx *ctx, u_int8_t *data, u_int do_encrypt)
sys/crypto/xform.c
495
block[i] = data[i] ^ ctx->tweak[i];
sys/crypto/xform.c
498
rijndael_encrypt(&ctx->key1, block, data);
sys/crypto/xform.c
500
rijndael_decrypt(&ctx->key1, block, data);
sys/crypto/xform.c
503
data[i] ^= ctx->tweak[i];
sys/crypto/xform.c
508
carry_out = ctx->tweak[i] & 0x80;
sys/crypto/xform.c
509
ctx->tweak[i] = (ctx->tweak[i] << 1) | carry_in;
sys/crypto/xform.c
512
ctx->tweak[0] ^= (AES_XTS_ALPHA & -carry_in);
sys/crypto/xform.c
531
struct aes_xts_ctx *ctx;
sys/crypto/xform.c
536
ctx = (struct aes_xts_ctx *)sched;
sys/crypto/xform.c
538
rijndael_set_key(&ctx->key1, key, len * 4);
sys/crypto/xform.c
539
rijndael_set_key(&ctx->key2, key + (len / 2), len * 4);
sys/crypto/xform.c
549
RMD160Update_int(void *ctx, const u_int8_t *buf, u_int16_t len)
sys/crypto/xform.c
551
RMD160Update(ctx, buf, len);
sys/crypto/xform.c
556
MD5Update_int(void *ctx, const u_int8_t *buf, u_int16_t len)
sys/crypto/xform.c
558
MD5Update(ctx, buf, len);
sys/crypto/xform.c
563
SHA1Update_int(void *ctx, const u_int8_t *buf, u_int16_t len)
sys/crypto/xform.c
565
SHA1Update(ctx, buf, len);
sys/crypto/xform.c
570
SHA256Update_int(void *ctx, const u_int8_t *buf, u_int16_t len)
sys/crypto/xform.c
572
SHA256Update(ctx, buf, len);
sys/crypto/xform.c
577
SHA384Update_int(void *ctx, const u_int8_t *buf, u_int16_t len)
sys/crypto/xform.c
579
SHA384Update(ctx, buf, len);
sys/crypto/xform.c
584
SHA512Update_int(void *ctx, const u_int8_t *buf, u_int16_t len)
sys/crypto/xform.c
586
SHA512Update(ctx, buf, len);
sys/dev/acpi/acpidmar.c
224
struct context_entry *ctx[256];
sys/dev/acpi/acpidmar.c
2306
struct context_entry *ctx;
sys/dev/acpi/acpidmar.c
2337
iommu->ctx[bus] = iommu_alloc_page(iommu, &paddr, 0);
sys/dev/acpi/acpidmar.c
2338
if (iommu->ctx[bus] == NULL) {
sys/dev/acpi/acpidmar.c
2349
iommu->ctx[bus]);
sys/dev/acpi/acpidmar.c
2353
ctx = iommu->ctx[bus] + devfn;
sys/dev/acpi/acpidmar.c
2354
if (!context_entry_is_valid(ctx)) {
sys/dev/acpi/acpidmar.c
2359
context_set_slpte(ctx, dom->ptep);
sys/dev/acpi/acpidmar.c
2360
context_set_translation_type(ctx, tt);
sys/dev/acpi/acpidmar.c
2361
context_set_domain_id(ctx, dom->did);
sys/dev/acpi/acpidmar.c
2362
context_set_address_width(ctx, lvl);
sys/dev/acpi/acpidmar.c
2363
context_set_present(ctx);
sys/dev/acpi/acpidmar.c
2366
iommu_flush_cache(iommu, ctx, sizeof(struct context_entry));
sys/dev/acpi/acpidmar.c
2690
acpiivhd_intr(void *ctx)
sys/dev/acpi/acpidmar.c
2692
struct iommu_softc *iommu = ctx;
sys/dev/acpi/acpidmar.c
3650
acpidmar_intr_establish(void *ctx, int level, int (*func)(void *),
sys/dev/acpi/acpidmar.c
3653
struct iommu_softc *iommu = ctx;
sys/dev/acpi/acpidmar.c
3676
acpidmar_intr(void *ctx)
sys/dev/acpi/acpidmar.c
3678
struct iommu_softc *iommu = ctx;
sys/dev/acpi/acpidmar.c
3774
struct context_entry *ctx;
sys/dev/acpi/acpidmar.c
3791
ctx = iommu->ctx[i] + j;
sys/dev/acpi/acpidmar.c
3792
if (!context_entry_is_valid(ctx)) {
sys/dev/acpi/acpidmar.c
3799
context_address_width(ctx),
sys/dev/acpi/acpidmar.c
3800
context_domain_id(ctx),
sys/dev/acpi/acpidmar.c
3801
context_translation_type(ctx),
sys/dev/acpi/acpidmar.c
3802
context_pte(ctx),
sys/dev/acpi/acpidmar.c
3803
context_user(ctx),
sys/dev/acpi/acpidmar.c
3807
iommu_showpte(ctx->lo & ~VTD_PAGE_MASK, iommu->agaw -
sys/dev/acpi/acpidmar.c
3831
if (!iommu->ctx[bus]) {
sys/dev/acpi/acpidmar.c
3834
} else if (!context_entry_is_valid(&iommu->ctx[bus][df])) {
sys/dev/acpi/acpidmar.c
3837
} else if (context_user(&iommu->ctx[bus][df]) != 0xA) {
sys/dev/acpi/acpidmar.c
444
struct context_entry *ctx;
sys/dev/acpi/acpidmar.c
455
ctx = &iommu->ctx[sid_bus(dd->sid)][sid_devfn(dd->sid)];
sys/dev/acpi/acpidmar.c
456
v = context_user(ctx);
sys/dev/acpi/acpidmar.c
465
context_set_user(ctx, 0xA);
sys/dev/ic/gdt_common.c
1005
ctx.service = ctx.info2 = 0;
sys/dev/ic/gdt_common.c
1007
sc->sc_intr(sc, &ctx);
sys/dev/ic/gdt_common.c
1009
sc->sc_status = ctx.cmd_status;
sys/dev/ic/gdt_common.c
1010
sc->sc_info = ctx.info;
sys/dev/ic/gdt_common.c
1011
sc->sc_info2 = ctx.info2;
sys/dev/ic/gdt_common.c
1015
gdt_wait_index = ctx.istatus;
sys/dev/ic/gdt_common.c
1018
switch (ctx.istatus) {
sys/dev/ic/gdt_common.c
1020
gdt_async_event(sc, ctx.service);
sys/dev/ic/gdt_common.c
1025
DEVNAME(sc), ctx.info, ctx.info2);
sys/dev/ic/gdt_common.c
1030
ccb = &sc->sc_ccbs[ctx.istatus - 2];
sys/dev/ic/gdt_common.c
1034
ctx.service = ccb->gc_service;
sys/dev/ic/gdt_common.c
1054
sync_val = gdt_sync_event(sc, ctx.service, ctx.istatus, xs);
sys/dev/ic/gdt_common.c
985
struct gdt_intr_ctx ctx;
sys/dev/ic/gdt_common.c
998
ctx.istatus = sc->sc_get_status(sc);
sys/dev/ic/gdt_common.c
999
if (!ctx.istatus) {
sys/dev/ic/if_wi.c
2211
struct rc4_ctx ctx;
sys/dev/ic/if_wi.c
2238
rc4_keysetup(&ctx, key, klen);
sys/dev/ic/if_wi.c
2250
rc4_crypt(&ctx, dat, dat, len);
sys/dev/ic/if_wi.c
2258
rc4_crypt(&ctx, dat, dat, IEEE80211_WEP_CRCLEN);
sys/dev/ic/if_wi.c
2267
struct rc4_ctx ctx;
sys/dev/ic/if_wi.c
2290
rc4_keysetup(&ctx, key, klen);
sys/dev/ic/if_wi.c
2293
rc4_crypt(&ctx, dat, dat, len);
sys/dev/ic/if_wi.c
2298
rc4_crypt(&ctx, dat, dat, IEEE80211_WEP_CRCLEN);
sys/dev/ic/mfi.c
965
uint32_t producer, consumer, ctx;
sys/dev/ic/mfi.c
984
ctx = pcq->mpc_reply_q[consumer];
sys/dev/ic/mfi.c
986
if (ctx == MFI_INVALID_CTX)
sys/dev/ic/mfi.c
991
ccb = &sc->sc_ccb[ctx];
sys/dev/ic/mfi.c
993
DEVNAME(sc), ctx);
sys/dev/ic/qwx.c
14269
void *ctx;
sys/dev/ic/qwx.c
14306
ctx = pipe->src_ring->per_transfer_context[pipe->src_ring->write_index];
sys/dev/ic/qwx.c
14307
tx_data = (struct qwx_tx_data *)ctx;
sys/dev/ic/qwx.c
21705
void *ctx;
sys/dev/ic/qwx.c
21724
ctx = pipe->src_ring->per_transfer_context[sw_index];
sys/dev/ic/qwx.c
21725
tx_data = (struct qwx_tx_data *)ctx;
sys/dev/ic/qwx.c
22130
struct qwx_tx_data *ctx = &txdata[i];
sys/dev/ic/qwx.c
22132
attr->src_sz_max, 0, BUS_DMA_NOWAIT, &ctx->map);
sys/dev/ic/qwx.c
22136
struct qwx_tx_data *ctx = &txdata[j];
sys/dev/ic/qwx.c
22137
bus_dmamap_destroy(sc->sc_dmat, ctx->map);
sys/dev/ic/qwx.c
22142
pipe->src_ring->per_transfer_context[i] = ctx;
sys/dev/ic/qwx.c
22167
struct qwx_rx_data *ctx = &rxdata[i];
sys/dev/ic/qwx.c
22169
attr->src_sz_max, 0, BUS_DMA_NOWAIT, &ctx->map);
sys/dev/ic/qwx.c
22173
struct qwx_rx_data *ctx = &rxdata[j];
sys/dev/ic/qwx.c
22174
bus_dmamap_destroy(sc->sc_dmat, ctx->map);
sys/dev/ic/qwx.c
22179
pipe->dest_ring->per_transfer_context[i] = ctx;
sys/dev/ic/qwx.c
22279
void *ctx;
sys/dev/ic/qwx.c
22287
ctx = ring->per_transfer_context[i];
sys/dev/ic/qwx.c
22288
if (!ctx)
sys/dev/ic/qwx.c
22291
rx_data = (struct qwx_rx_data *)ctx;
sys/dev/ic/qwx.c
22621
void *ctx;
sys/dev/ic/qwx.c
22648
ctx = pipe->dest_ring->per_transfer_context[idx];
sys/dev/ic/qwx.c
22649
rx_data = (struct qwx_rx_data *)ctx;
sys/dev/ic/qwx.c
22839
void *ctx;
sys/dev/ic/qwx.c
22896
ctx = pipe->src_ring->per_transfer_context[write_index];
sys/dev/ic/qwx.c
22897
tx_data = (struct qwx_tx_data *)ctx;
sys/dev/ic/qwx.c
23556
arg.channel.freq2_radar = ctx->radar_enabled;
sys/dev/ic/qwx.c
24509
qwx_dp_reo_cmd_free(struct qwx_dp *dp, void *ctx,
sys/dev/ic/qwx.c
24513
struct dp_rx_tid *rx_tid = ctx;
sys/dev/ic/qwx.c
24571
qwx_dp_rx_tid_del_func(struct qwx_dp *dp, void *ctx,
sys/dev/ic/qwx.c
24575
struct dp_rx_tid *rx_tid = ctx;
sys/dev/ic/qwz.c
11943
void *ctx;
sys/dev/ic/qwz.c
11978
ctx = pipe->src_ring->per_transfer_context[pipe->src_ring->write_index];
sys/dev/ic/qwz.c
11979
tx_data = (struct qwz_tx_data *)ctx;
sys/dev/ic/qwz.c
18993
void *ctx;
sys/dev/ic/qwz.c
19012
ctx = pipe->src_ring->per_transfer_context[sw_index];
sys/dev/ic/qwz.c
19013
tx_data = (struct qwz_tx_data *)ctx;
sys/dev/ic/qwz.c
19377
struct qwz_tx_data *ctx = &txdata[i];
sys/dev/ic/qwz.c
19379
attr->src_sz_max, 0, BUS_DMA_NOWAIT, &ctx->map);
sys/dev/ic/qwz.c
19383
struct qwz_tx_data *ctx = &txdata[j];
sys/dev/ic/qwz.c
19384
bus_dmamap_destroy(sc->sc_dmat, ctx->map);
sys/dev/ic/qwz.c
19389
pipe->src_ring->per_transfer_context[i] = ctx;
sys/dev/ic/qwz.c
19414
struct qwz_rx_data *ctx = &rxdata[i];
sys/dev/ic/qwz.c
19416
attr->src_sz_max, 0, BUS_DMA_NOWAIT, &ctx->map);
sys/dev/ic/qwz.c
19420
struct qwz_rx_data *ctx = &rxdata[j];
sys/dev/ic/qwz.c
19421
bus_dmamap_destroy(sc->sc_dmat, ctx->map);
sys/dev/ic/qwz.c
19426
pipe->dest_ring->per_transfer_context[i] = ctx;
sys/dev/ic/qwz.c
19526
void *ctx;
sys/dev/ic/qwz.c
19534
ctx = ring->per_transfer_context[i];
sys/dev/ic/qwz.c
19535
if (!ctx)
sys/dev/ic/qwz.c
19538
rx_data = (struct qwz_rx_data *)ctx;
sys/dev/ic/qwz.c
19864
void *ctx;
sys/dev/ic/qwz.c
19891
ctx = pipe->dest_ring->per_transfer_context[idx];
sys/dev/ic/qwz.c
19892
rx_data = (struct qwz_rx_data *)ctx;
sys/dev/ic/qwz.c
20081
void *ctx;
sys/dev/ic/qwz.c
20138
ctx = pipe->src_ring->per_transfer_context[write_index];
sys/dev/ic/qwz.c
20139
tx_data = (struct qwz_tx_data *)ctx;
sys/dev/ic/qwz.c
20750
arg.channel.freq2_radar = ctx->radar_enabled;
sys/dev/ic/qwz.c
21673
qwz_dp_reo_cmd_free(struct qwz_dp *dp, void *ctx,
sys/dev/ic/qwz.c
21677
struct dp_rx_tid *rx_tid = ctx;
sys/dev/ic/qwz.c
21735
qwz_dp_rx_tid_del_func(struct qwz_dp *dp, void *ctx,
sys/dev/ic/qwz.c
21739
struct dp_rx_tid *rx_tid = ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_aca.c
924
struct aca_dump_context *ctx = (struct aca_dump_context *)data;
sys/dev/pci/drm/amd/amdgpu/amdgpu_aca.c
926
aca_dump_entry(ctx->m, bank, type, ctx->idx++);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1059
struct ttm_operation_ctx ctx = { true, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1110
ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1153
struct bo_vm_reservation_context *ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1160
ctx->n_vms = 1;
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1161
ctx->sync = &mem->sync;
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1162
drm_exec_init(&ctx->exec, DRM_EXEC_INTERRUPTIBLE_WAIT, 0);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1163
drm_exec_until_all_locked(&ctx->exec) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1164
ret = amdgpu_vm_lock_pd(vm, &ctx->exec, 2);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1165
drm_exec_retry_on_contention(&ctx->exec);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1169
ret = drm_exec_prepare_obj(&ctx->exec, &bo->tbo.base, 1);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1170
drm_exec_retry_on_contention(&ctx->exec);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1178
drm_exec_fini(&ctx->exec);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1194
struct bo_vm_reservation_context *ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1200
ctx->sync = &mem->sync;
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1201
drm_exec_init(&ctx->exec, DRM_EXEC_INTERRUPTIBLE_WAIT |
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1203
drm_exec_until_all_locked(&ctx->exec) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1204
ctx->n_vms = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1212
&ctx->exec, 2);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1213
drm_exec_retry_on_contention(&ctx->exec);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1216
++ctx->n_vms;
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1219
ret = drm_exec_prepare_obj(&ctx->exec, &bo->tbo.base, 1);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1220
drm_exec_retry_on_contention(&ctx->exec);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1228
drm_exec_fini(&ctx->exec);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1242
static int unreserve_bo_and_vms(struct bo_vm_reservation_context *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1248
ret = amdgpu_sync_wait(ctx->sync, intr);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1250
drm_exec_fini(&ctx->exec);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1251
ctx->sync = NULL;
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1505
struct ttm_operation_ctx ctx = { true, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1508
ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1891
struct bo_vm_reservation_context ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1931
ret = reserve_bo_and_cond_vms(mem, NULL, BO_VM_ALL, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
1946
ret = unreserve_bo_and_vms(&ctx, false, false);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2007
struct bo_vm_reservation_context ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2049
ret = reserve_bo_and_vm(mem, avm, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2073
ret = map_bo_to_gpuvm(mem, entry, ctx.sync,
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2080
ret = vm_update_pds(avm, ctx.sync);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2092
ret = unreserve_bo_and_vms(&ctx, false, false);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2097
unreserve_bo_and_vms(&ctx, false, false);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2141
struct bo_vm_reservation_context ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2146
ret = reserve_bo_and_cond_vms(mem, avm, BO_VM_MAPPED, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2150
if (ctx.n_vms == 0) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2171
ret = unmap_bo_from_gpuvm(mem, entry, ctx.sync);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2183
unreserve_bo_and_vms(&ctx, false, false);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2527
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2568
ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2641
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
2692
ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
420
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
433
ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
566
struct ttm_operation_ctx ctx = {.interruptible = true};
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
593
ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
613
struct ttm_operation_ctx ctx = {.interruptible = true};
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
617
return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
650
struct ttm_operation_ctx ctx = {.interruptible = true};
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
685
ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
727
struct ttm_operation_ctx ctx = {.interruptible = false};
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
736
(void)ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
773
struct ttm_operation_ctx ctx = {.interruptible = true};
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
785
(void)ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
118
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
127
if (amdgpu_atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
128
i2c_info = (struct _ATOM_GPIO_I2C_INFO *)(ctx->bios + data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
149
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
158
if (amdgpu_atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
159
i2c_info = (struct _ATOM_GPIO_I2C_INFO *)(ctx->bios + data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1666
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1674
if (amdgpu_atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1675
firmware_usage = (struct _ATOM_VRAM_USAGE_BY_FIRMWARE *)(ctx->bios + data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1697
ctx->scratch_size_bytes = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1701
ctx->scratch = kzalloc(usage_bytes, GFP_KERNEL);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1702
if (!ctx->scratch)
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1704
ctx->scratch_size_bytes = usage_bytes;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1813
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1815
return sysfs_emit(buf, "%s\n", ctx->vbios_pn);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1824
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1826
return sysfs_emit(buf, "%s\n", ctx->build_num);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
183
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1845
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
1847
if (attr == &dev_attr_vbios_build.attr && !strlen(ctx->build_num))
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
194
if (amdgpu_atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
195
gpio_info = (struct _ATOM_GPIO_PIN_LUT *)(ctx->bios + data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
287
struct atom_context *ctx = mode_info->atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
294
if (!amdgpu_atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset))
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
300
obj_header = (ATOM_OBJECT_HEADER *) (ctx->bios + data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
302
(ctx->bios + data_offset +
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
314
struct atom_context *ctx = mode_info->atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
331
if (!amdgpu_atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset))
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
337
obj_header = (ATOM_OBJECT_HEADER *) (ctx->bios + data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
339
(ctx->bios + data_offset +
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
342
(ctx->bios + data_offset +
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
345
(ctx->bios + data_offset +
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
348
(ctx->bios + data_offset +
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
397
(ctx->bios + data_offset +
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
425
(ctx->bios + data_offset +
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
433
(ctx->bios + data_offset +
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
503
(ctx->bios + data_offset +
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
85
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
96
if (amdgpu_atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_atombios.c
97
i2c_info = (struct _ATOM_GPIO_I2C_INFO *)(ctx->bios + data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
1006
return amdgpu_atom_execute_table(ctx, ATOM_CMD_INIT, (uint32_t *)&asic_init_ps_v2_1,
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
175
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
184
if (amdgpu_atom_parse_data_header(ctx, index, NULL, &frev, &crev, &data_offset)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
187
(struct vram_usagebyfirmware_v2_1 *)(ctx->bios + data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
193
(struct vram_usagebyfirmware_v2_2 *)(ctx->bios + data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
200
ctx->scratch_size_bytes = 0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
204
ctx->scratch = kzalloc(usage_bytes, GFP_KERNEL);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
205
if (!ctx->scratch)
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
207
ctx->scratch_size_bytes = usage_bytes;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
908
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
918
if (!amdgpu_atom_parse_data_header(ctx, index, &size,
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
923
firmware_info = (union firmware_info *)(ctx->bios + data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
956
struct atom_context *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
966
ctx = mode_info->atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
967
if (!ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
973
if (amdgpu_atom_parse_data_header(ctx, index, NULL,
sys/dev/pci/drm/amd/amdgpu/amdgpu_atomfirmware.c
976
(union firmware_info *)(ctx->bios +
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
208
section->ctx.reg_ctx_type = CPER_CTX_TYPE_CRASH;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
209
section->ctx.reg_arr_size = sizeof(section->ctx.reg_dump);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
211
memcpy(section->ctx.reg_dump, reg_dump, reg_count * sizeof(uint32_t));
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
246
section->ctx.reg_ctx_type = CPER_CTX_TYPE_CRASH;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
247
section->ctx.reg_arr_size = sizeof(section->ctx.reg_dump);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
253
section->ctx.reg_dump[CPER_ACA_REG_CTL_LO] = 0x1;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
254
section->ctx.reg_dump[CPER_ACA_REG_CTL_HI] = 0x0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
255
section->ctx.reg_dump[CPER_ACA_REG_STATUS_LO] = 0x137;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
256
section->ctx.reg_dump[CPER_ACA_REG_STATUS_HI] = 0xB0000000;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
257
section->ctx.reg_dump[CPER_ACA_REG_ADDR_LO] = 0x0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
258
section->ctx.reg_dump[CPER_ACA_REG_ADDR_HI] = 0x0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
259
section->ctx.reg_dump[CPER_ACA_REG_MISC0_LO] = 0x0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
260
section->ctx.reg_dump[CPER_ACA_REG_MISC0_HI] = 0x0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
261
section->ctx.reg_dump[CPER_ACA_REG_CONFIG_LO] = 0x2;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
262
section->ctx.reg_dump[CPER_ACA_REG_CONFIG_HI] = 0x1ff;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
263
section->ctx.reg_dump[CPER_ACA_REG_IPID_LO] = (socket_id / 4) & 0x01;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
264
section->ctx.reg_dump[CPER_ACA_REG_IPID_HI] = 0x096 | (((socket_id % 4) & 0x3) << 12);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
265
section->ctx.reg_dump[CPER_ACA_REG_SYND_LO] = 0x0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cper.c
266
section->ctx.reg_dump[CPER_ACA_REG_SYND_HI] = 0x0;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1214
r = amdgpu_ctx_wait_prev_fence(p->ctx, p->entities[p->gang_leader_idx]);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1357
seq = amdgpu_ctx_add_fence(p->ctx, p->entities[p->gang_leader_idx],
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1362
!p->ctx->preamble_presented) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1364
p->ctx->preamble_presented = true;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1401
if (parser->ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1402
amdgpu_ctx_put(parser->ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1495
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1499
ctx = amdgpu_ctx_get(filp->driver_priv, wait->in.ctx_id);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1500
if (ctx == NULL)
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1503
r = amdgpu_ctx_get_entity(ctx, wait->in.ip_type, wait->in.ip_instance,
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1506
amdgpu_ctx_put(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1510
fence = amdgpu_ctx_get_fence(ctx, entity, wait->in.handle);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1521
amdgpu_ctx_put(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1543
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1547
ctx = amdgpu_ctx_get(filp->driver_priv, user->ctx_id);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1548
if (ctx == NULL)
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1551
r = amdgpu_ctx_get_entity(ctx, user->ip_type, user->ip_instance,
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1554
amdgpu_ctx_put(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1558
fence = amdgpu_ctx_get_fence(ctx, entity, user->seq_no);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1559
amdgpu_ctx_put(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1783
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
1809
r = ttm_bo_validate(&(*bo)->tbo, &(*bo)->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
310
if (p->ctx->generation != p->gang_leader->generation) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
415
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
419
ctx = amdgpu_ctx_get(fpriv, deps[i].ctx_id);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
420
if (ctx == NULL)
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
423
r = amdgpu_ctx_get_entity(ctx, deps[i].ip_type,
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
427
amdgpu_ctx_put(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
431
fence = amdgpu_ctx_get_fence(ctx, entity, deps[i].handle);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
432
amdgpu_ctx_put(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
59
p->ctx = amdgpu_ctx_get(fpriv, cs->in.ctx_id);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
60
if (!p->ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
63
if (atomic_read(&p->ctx->guilty)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
64
amdgpu_ctx_put(p->ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
804
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
81
r = amdgpu_ctx_get_entity(p->ctx, chunk_ib->ip_type,
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
840
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
842
p->bytes_moved += ctx.bytes_moved;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
845
p->bytes_moved_vis += ctx.bytes_moved;
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
859
struct ttm_operation_ctx ctx = { true, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
949
&ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.h
52
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
139
static unsigned int amdgpu_ctx_get_hw_prio(struct amdgpu_ctx *ctx, u32 hw_ip)
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
141
struct amdgpu_device *adev = ctx->mgr->adev;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
145
ctx_prio = (ctx->override_priority == AMDGPU_CTX_PRIORITY_UNSET) ?
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
146
ctx->init_priority : ctx->override_priority;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
190
static ktime_t amdgpu_ctx_entity_time(struct amdgpu_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
196
spin_lock(&ctx->ring_lock);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
200
spin_unlock(&ctx->ring_lock);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
204
static int amdgpu_ctx_init_entity(struct amdgpu_ctx *ctx, u32 hw_ip,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
208
struct amdgpu_device *adev = ctx->mgr->adev;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
220
ctx_prio = (ctx->override_priority == AMDGPU_CTX_PRIORITY_UNSET) ?
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
221
ctx->init_priority : ctx->override_priority;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
224
hw_prio = amdgpu_ctx_get_hw_prio(ctx, hw_ip);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
235
fpriv = container_of(ctx->ctx_mgr, struct amdgpu_fpriv, ctx_mgr);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
253
&ctx->guilty);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
258
if (cmpxchg(&ctx->entities[hw_ip][ring], NULL, entity))
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
292
static int amdgpu_ctx_get_stable_pstate(struct amdgpu_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
295
struct amdgpu_device *adev = ctx->mgr->adev;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
321
struct drm_file *filp, struct amdgpu_ctx *ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
331
memset(ctx, 0, sizeof(*ctx));
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
333
kref_init(&ctx->refcount);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
334
ctx->mgr = mgr;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
335
mtx_init(&ctx->ring_lock, IPL_TTY);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
337
ctx->reset_counter = atomic_read(&mgr->adev->gpu_reset_counter);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
338
ctx->reset_counter_query = ctx->reset_counter;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
339
ctx->generation = amdgpu_vm_generation(mgr->adev, &fpriv->vm);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
340
ctx->init_priority = priority;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
341
ctx->override_priority = AMDGPU_CTX_PRIORITY_UNSET;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
343
r = amdgpu_ctx_get_stable_pstate(ctx, ¤t_stable_pstate);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
348
ctx->stable_pstate = mgr->adev->pm.stable_pstate_ctx->stable_pstate;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
350
ctx->stable_pstate = current_stable_pstate;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
352
ctx->ctx_mgr = &(fpriv->ctx_mgr);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
356
static int amdgpu_ctx_set_stable_pstate(struct amdgpu_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
359
struct amdgpu_device *adev = ctx->mgr->adev;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
365
if (adev->pm.stable_pstate_ctx && adev->pm.stable_pstate_ctx != ctx) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
370
r = amdgpu_ctx_get_stable_pstate(ctx, ¤t_stable_pstate);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
400
adev->pm.stable_pstate_ctx = ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
409
struct amdgpu_ctx *ctx = container_of(ref, struct amdgpu_ctx, refcount);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
410
struct amdgpu_ctx_mgr *mgr = ctx->mgr;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
421
spend = amdgpu_ctx_fini_entity(adev, ctx->entities[i][j]);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
427
amdgpu_ctx_set_stable_pstate(ctx, ctx->stable_pstate);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
431
kfree(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
434
int amdgpu_ctx_get_entity(struct amdgpu_ctx *ctx, u32 hw_ip, u32 instance,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
456
if (ctx->entities[hw_ip][ring] == NULL) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
457
r = amdgpu_ctx_init_entity(ctx, hw_ip, ring);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
462
ctx_entity = &ctx->entities[hw_ip][ring]->entity;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
480
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
483
ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
484
if (!ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
488
r = idr_alloc(&mgr->ctx_handles, ctx, 1, AMDGPU_VM_MAX_NUM_CTX, GFP_KERNEL);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
491
kfree(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
496
r = amdgpu_ctx_init(mgr, priority, filp, ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
500
kfree(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
508
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
511
ctx = container_of(ref, struct amdgpu_ctx, refcount);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
514
if (!ctx->entities[i][j])
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
517
drm_sched_entity_destroy(&ctx->entities[i][j]->entity);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
527
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
530
ctx = idr_remove(&mgr->ctx_handles, id);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
531
if (ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
532
kref_put(&ctx->refcount, amdgpu_ctx_do_release);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
534
return ctx ? 0 : -EINVAL;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
541
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
550
ctx = idr_find(&mgr->ctx_handles, id);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
551
if (!ctx) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
563
if (ctx->reset_counter_query == reset_counter)
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
567
ctx->reset_counter_query = reset_counter;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
580
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
588
ctx = idr_find(&mgr->ctx_handles, id);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
589
if (!ctx) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
597
if (ctx->reset_counter != atomic_read(&adev->gpu_reset_counter))
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
600
if (ctx->generation != amdgpu_vm_generation(adev, &fpriv->vm))
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
603
if (atomic_read(&ctx->guilty))
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
619
if (ce_count != ctx->ras_counter_ce) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
620
ctx->ras_counter_ce = ce_count;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
624
if (ue_count != ctx->ras_counter_ue) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
625
ctx->ras_counter_ue = ue_count;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
641
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
650
ctx = idr_find(&mgr->ctx_handles, id);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
651
if (!ctx) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
657
r = amdgpu_ctx_set_stable_pstate(ctx, *stable_pstate);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
659
r = amdgpu_ctx_get_stable_pstate(ctx, stable_pstate);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
732
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
741
ctx = idr_find(&mgr->ctx_handles, id);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
742
if (ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
743
kref_get(&ctx->refcount);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
745
return ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
748
int amdgpu_ctx_put(struct amdgpu_ctx *ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
750
if (ctx == NULL)
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
753
kref_put(&ctx->refcount, amdgpu_ctx_do_release);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
757
uint64_t amdgpu_ctx_add_fence(struct amdgpu_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
772
spin_lock(&ctx->ring_lock);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
775
spin_unlock(&ctx->ring_lock);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
778
&ctx->mgr->time_spend[centity->hw_ip]);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
784
struct dma_fence *amdgpu_ctx_get_fence(struct amdgpu_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
791
spin_lock(&ctx->ring_lock);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
797
spin_unlock(&ctx->ring_lock);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
803
spin_unlock(&ctx->ring_lock);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
808
spin_unlock(&ctx->ring_lock);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
813
static void amdgpu_ctx_set_entity_priority(struct amdgpu_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
818
struct amdgpu_device *adev = ctx->mgr->adev;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
829
hw_prio = amdgpu_ctx_get_hw_prio(ctx, hw_ip);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
838
void amdgpu_ctx_priority_override(struct amdgpu_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
844
ctx->override_priority = priority;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
846
ctx_prio = (ctx->override_priority == AMDGPU_CTX_PRIORITY_UNSET) ?
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
847
ctx->init_priority : ctx->override_priority;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
850
if (!ctx->entities[i][j])
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
853
amdgpu_ctx_set_entity_priority(ctx, ctx->entities[i][j],
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
859
int amdgpu_ctx_wait_prev_fence(struct amdgpu_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
867
spin_lock(&ctx->ring_lock);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
870
spin_unlock(&ctx->ring_lock);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
898
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
905
idr_for_each_entry(idp, ctx, id) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
910
if (!ctx->entities[i][j])
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
913
entity = &ctx->entities[i][j]->entity;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
924
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
930
idr_for_each_entry(idp, ctx, id) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
931
if (kref_read(&ctx->refcount) != 1) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
932
DRM_ERROR("ctx %p is still alive\n", ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
940
if (!ctx->entities[i][j])
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
943
entity = &ctx->entities[i][j]->entity;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
947
kref_put(&ctx->refcount, amdgpu_ctx_fini);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
961
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
977
idr_for_each_entry(&mgr->ctx_handles, ctx, id) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
983
centity = ctx->entities[hw_ip][i];
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.c
986
spend = amdgpu_ctx_entity_time(ctx, centity);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.h
74
int amdgpu_ctx_put(struct amdgpu_ctx *ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.h
76
int amdgpu_ctx_get_entity(struct amdgpu_ctx *ctx, u32 hw_ip, u32 instance,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.h
78
uint64_t amdgpu_ctx_add_fence(struct amdgpu_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.h
81
struct dma_fence *amdgpu_ctx_get_fence(struct amdgpu_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.h
85
void amdgpu_ctx_priority_override(struct amdgpu_ctx *ctx, int32_t ctx_prio);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ctx.h
90
int amdgpu_ctx_wait_prev_fence(struct amdgpu_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_dev_coredump.c
191
drm_printf(p, "vbios name : %s\n", ctx->name);
sys/dev/pci/drm/amd/amdgpu/amdgpu_dev_coredump.c
192
drm_printf(p, "vbios pn : %s\n", ctx->vbios_pn);
sys/dev/pci/drm/amd/amdgpu/amdgpu_dev_coredump.c
193
drm_printf(p, "vbios version : %d\n", ctx->version);
sys/dev/pci/drm/amd/amdgpu/amdgpu_dev_coredump.c
194
drm_printf(p, "vbios ver_str : %s\n", ctx->vbios_ver_str);
sys/dev/pci/drm/amd/amdgpu/amdgpu_dev_coredump.c
195
drm_printf(p, "vbios date : %s\n", ctx->date);
sys/dev/pci/drm/amd/amdgpu/amdgpu_dev_coredump.c
79
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_display.c
195
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_display.c
312
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_display.c
329
ret = drm_crtc_helper_set_config(set, ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c
193
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c
202
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c
283
struct ttm_operation_ctx ctx = { true, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c
300
ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c
371
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c
384
ret = ttm_bo_setup_export(&bo->tbo, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c
461
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_dma_buf.c
473
r = ttm_bo_validate(&bo->tbo, &placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_gem.c
607
struct ttm_operation_ctx ctx = { true, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_gem.c
664
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
1677
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
1933
seq_printf(m, "VBIOS version: %s\n", ctx->vbios_pn);
sys/dev/pci/drm/amd/amdgpu/amdgpu_mode.h
707
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_mode.h
712
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
1371
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
1393
r = ttm_bo_validate(bo, &abo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
450
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
480
&(*bo_ptr)->tbo.resource, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
637
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
712
&bo->placement, page_align, &ctx, NULL,
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
719
amdgpu_cs_report_moved_bytes(adev, ctx.bytes_moved,
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
720
ctx.bytes_moved);
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
722
amdgpu_cs_report_moved_bytes(adev, ctx.bytes_moved, 0);
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
936
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c
990
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
318
struct psp_memory_training_context *ctx = &psp->mem_train_ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
320
ctx->init = PSP_MEM_TRAIN_NOT_SUPPORT;
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
321
kfree(ctx->sys_cache);
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
322
ctx->sys_cache = NULL;
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
328
struct psp_memory_training_context *ctx = &psp->mem_train_ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
330
if (ctx->init != PSP_MEM_TRAIN_RESERVE_SUCCESS) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
335
ctx->sys_cache = kzalloc(ctx->train_data_size, GFP_KERNEL);
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
336
if (ctx->sys_cache == NULL) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
344
ctx->train_data_size,
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
345
ctx->p2c_train_data_offset,
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
346
ctx->c2p_train_data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
347
ctx->init = PSP_MEM_TRAIN_INIT_SUCCESS;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
3849
struct atom_context *ctx = adev->mode_info.atom_context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
3851
if (!ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
3854
if (strnstr(ctx->vbios_pn, "D16406",
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
3855
sizeof(ctx->vbios_pn)) ||
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
3856
strnstr(ctx->vbios_pn, "D36002",
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
3857
sizeof(ctx->vbios_pn)))
sys/dev/pci/drm/amd/amdgpu/amdgpu_sched.c
44
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_sched.c
57
idr_for_each_entry(&mgr->ctx_handles, ctx, id)
sys/dev/pci/drm/amd/amdgpu/amdgpu_sched.c
58
amdgpu_ctx_priority_override(ctx, priority);
sys/dev/pci/drm/amd/amdgpu/amdgpu_sched.c
75
struct amdgpu_ctx *ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_sched.c
85
ctx = amdgpu_ctx_get(fpriv, ctx_id);
sys/dev/pci/drm/amd/amdgpu/amdgpu_sched.c
87
if (!ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_sched.c
90
amdgpu_ctx_priority_override(ctx, priority);
sys/dev/pci/drm/amd/amdgpu/amdgpu_sched.c
91
amdgpu_ctx_put(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_trace.h
551
__field(u64, ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_trace.h
558
__entry->ctx = fence->context;
sys/dev/pci/drm/amd/amdgpu/amdgpu_trace.h
562
__get_str(ring), __entry->ctx, __entry->seqno)
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1016
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1039
r = ttm_bo_mem_space(bo, &placement, &tmp, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1173
struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1196
ret = ttm_pool_alloc(pool, ttm, ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1761
struct psp_memory_training_context *ctx = &adev->psp.mem_train_ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1763
ctx->init = PSP_MEM_TRAIN_NOT_SUPPORT;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1764
amdgpu_bo_free_kernel(&ctx->c2p_bo, NULL, NULL);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1765
ctx->c2p_bo = NULL;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1773
struct psp_memory_training_context *ctx = &adev->psp.mem_train_ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1775
memset(ctx, 0, sizeof(*ctx));
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1777
ctx->c2p_train_data_offset =
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1779
ctx->p2c_train_data_offset =
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1781
ctx->train_data_size =
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1785
ctx->train_data_size,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1786
ctx->p2c_train_data_offset,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1787
ctx->c2p_train_data_offset);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1796
struct psp_memory_training_context *ctx = &adev->psp.mem_train_ctx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1831
ctx->c2p_train_data_offset,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1832
ctx->train_data_size,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1833
&ctx->c2p_bo,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
1840
ctx->init = PSP_MEM_TRAIN_RESERVE_SUCCESS;
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
494
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
529
r = ttm_bo_wait_ctx(bo, ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
591
r = ttm_bo_move_memcpy(bo, ctx, new_mem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_userq.c
762
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_userq.c
765
return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_userq.c
773
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_userq.c
791
ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1000
ctx->idx++;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1001
for (i = 0; i <= ctx->count; ++i) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1002
unsigned int reg = ctx->reg + i;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1004
if (ctx->idx >= ctx->ib->length_dw) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1011
ctx->data0 = ctx->idx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1014
ctx->data1 = ctx->idx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1017
r = cb(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1028
ctx->idx++;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1041
static int amdgpu_uvd_cs_packets(struct amdgpu_uvd_cs_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1042
int (*cb)(struct amdgpu_uvd_cs_ctx *ctx))
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1046
for (ctx->idx = 0 ; ctx->idx < ctx->ib->length_dw; ) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1047
uint32_t cmd = amdgpu_ib_get_value(ctx->ib, ctx->idx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1052
ctx->reg = CP_PACKET0_GET_REG(cmd);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1053
ctx->count = CP_PACKET_GET_COUNT(cmd);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1054
r = amdgpu_uvd_cs_reg(ctx, cb);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1059
++ctx->idx;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1082
struct amdgpu_uvd_cs_ctx ctx = {};
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1100
ctx.parser = parser;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1101
ctx.buf_sizes = buf_sizes;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1102
ctx.ib = ib;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1107
r = amdgpu_uvd_cs_packets(&ctx, amdgpu_uvd_cs_pass1);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1113
r = amdgpu_uvd_cs_packets(&ctx, amdgpu_uvd_cs_pass2);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
1117
if (!ctx.has_msg_cmd) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
144
struct ttm_operation_ctx ctx = { true, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
162
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
559
static u64 amdgpu_uvd_get_addr_from_ctx(struct amdgpu_uvd_cs_ctx *ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
564
lo = amdgpu_ib_get_value(ctx->ib, ctx->data0);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
565
hi = amdgpu_ib_get_value(ctx->ib, ctx->data1);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
579
static int amdgpu_uvd_cs_pass1(struct amdgpu_uvd_cs_ctx *ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
585
uint64_t addr = amdgpu_uvd_get_addr_from_ctx(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
588
r = amdgpu_cs_find_mapping(ctx->parser, addr, &bo, &mapping);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
594
if (!ctx->parser->adev->uvd.address_64_bit) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
596
cmd = amdgpu_ib_get_value(ctx->ib, ctx->idx) >> 1;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
816
static int amdgpu_uvd_cs_msg(struct amdgpu_uvd_cs_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
819
struct amdgpu_device *adev = ctx->parser->adev;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
861
adev->uvd.filp[i] = ctx->parser->filp;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
871
r = amdgpu_uvd_cs_msg_decode(adev, msg, ctx->buf_sizes);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
879
if (adev->uvd.filp[i] != ctx->parser->filp) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
912
static int amdgpu_uvd_cs_pass2(struct amdgpu_uvd_cs_ctx *ctx)
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
918
uint64_t addr = amdgpu_uvd_get_addr_from_ctx(ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
921
r = amdgpu_cs_find_mapping(ctx->parser, addr, &bo, &mapping);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
935
amdgpu_ib_set_value(ctx->ib, ctx->data0, lower_32_bits(start));
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
936
amdgpu_ib_set_value(ctx->ib, ctx->data1, upper_32_bits(start));
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
938
cmd = amdgpu_ib_get_value(ctx->ib, ctx->idx) >> 1;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
940
if ((end - start) < ctx->buf_sizes[cmd]) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
943
ctx->buf_sizes[cmd]);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
948
if ((end - start) < ctx->buf_sizes[4]) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
951
ctx->buf_sizes[4]);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
959
if (!ctx->parser->adev->uvd.address_64_bit) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
967
(start >> 28) != (ctx->parser->adev->uvd.inst->gpu_addr >> 28)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
975
ctx->has_msg_cmd = true;
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
976
r = amdgpu_uvd_cs_msg(ctx, bo, addr);
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
979
} else if (!ctx->has_msg_cmd) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
995
static int amdgpu_uvd_cs_reg(struct amdgpu_uvd_cs_ctx *ctx,
sys/dev/pci/drm/amd/amdgpu/amdgpu_uvd.c
996
int (*cb)(struct amdgpu_uvd_cs_ctx *ctx))
sys/dev/pci/drm/amd/amdgpu/amdgpu_vce.c
605
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_vce.c
635
return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_pt.c
364
struct ttm_operation_ctx ctx = { true, false };
sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_pt.c
383
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/atom.c
1004
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
1007
static void atom_op_sub(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
1013
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
1015
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
1018
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
1021
static void atom_op_switch(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
1026
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
1032
atom_get_src(ctx, (attr & 0x38) | ATOM_ARG_IMM,
sys/dev/pci/drm/amd/amdgpu/atom.c
1037
*ptr = ctx->start + target;
sys/dev/pci/drm/amd/amdgpu/atom.c
1048
static void atom_op_test(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
1053
dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
1055
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
1056
ctx->ctx->cs_equal = ((dst & src) == 0);
sys/dev/pci/drm/amd/amdgpu/atom.c
1057
SDEBUG(" result: %s\n", ctx->ctx->cs_equal ? "EQ" : "NE");
sys/dev/pci/drm/amd/amdgpu/atom.c
1060
static void atom_op_xor(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
1066
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
1068
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
1071
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
1074
static void atom_op_debug(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
1080
static void atom_op_processds(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
110
static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
sys/dev/pci/drm/amd/amdgpu/atom.c
121
temp = ctx->card->reg_read(ctx->card, CU16(base + 1));
sys/dev/pci/drm/amd/amdgpu/atom.c
1221
static int amdgpu_atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t *params, int params_size)
sys/dev/pci/drm/amd/amdgpu/atom.c
1223
int base = CU16(ctx->cmd_table + 4 + 2 * index);
sys/dev/pci/drm/amd/amdgpu/atom.c
1239
ectx.ctx = ctx;
sys/dev/pci/drm/amd/amdgpu/atom.c
125
ctx->card->reg_write(ctx->card, CU16(base + 1), temp);
sys/dev/pci/drm/amd/amdgpu/atom.c
1291
int amdgpu_atom_execute_table(struct atom_context *ctx, int index, uint32_t *params, int params_size)
sys/dev/pci/drm/amd/amdgpu/atom.c
1295
mutex_lock(&ctx->mutex);
sys/dev/pci/drm/amd/amdgpu/atom.c
1297
ctx->data_block = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
1299
ctx->reg_block = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
1301
ctx->fb_base = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
1303
ctx->io_mode = ATOM_IO_MM;
sys/dev/pci/drm/amd/amdgpu/atom.c
1305
ctx->divmul[0] = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
1306
ctx->divmul[1] = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
1307
r = amdgpu_atom_execute_table_locked(ctx, index, params, params_size);
sys/dev/pci/drm/amd/amdgpu/atom.c
1308
mutex_unlock(&ctx->mutex);
sys/dev/pci/drm/amd/amdgpu/atom.c
1314
static void atom_index_iio(struct atom_context *ctx, int base)
sys/dev/pci/drm/amd/amdgpu/atom.c
1316
ctx->iio = kzalloc(2 * 256, GFP_KERNEL);
sys/dev/pci/drm/amd/amdgpu/atom.c
1317
if (!ctx->iio)
sys/dev/pci/drm/amd/amdgpu/atom.c
1320
ctx->iio[CU8(base + 1)] = base + 2;
sys/dev/pci/drm/amd/amdgpu/atom.c
1328
static void atom_get_vbios_name(struct atom_context *ctx)
sys/dev/pci/drm/amd/amdgpu/atom.c
1340
p_rom = ctx->bios;
sys/dev/pci/drm/amd/amdgpu/atom.c
1350
memcpy(ctx->name, na, 7);
sys/dev/pci/drm/amd/amdgpu/atom.c
1351
ctx->name[7] = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
1369
memcpy(ctx->name, c_ptr, name_size);
sys/dev/pci/drm/amd/amdgpu/atom.c
1370
back = ctx->name + name_size;
sys/dev/pci/drm/amd/amdgpu/atom.c
1376
static void atom_get_vbios_date(struct atom_context *ctx)
sys/dev/pci/drm/amd/amdgpu/atom.c
1381
p_rom = ctx->bios;
sys/dev/pci/drm/amd/amdgpu/atom.c
1385
ctx->date[0] = '2';
sys/dev/pci/drm/amd/amdgpu/atom.c
1386
ctx->date[1] = '0';
sys/dev/pci/drm/amd/amdgpu/atom.c
1387
ctx->date[2] = date_in_rom[6];
sys/dev/pci/drm/amd/amdgpu/atom.c
1388
ctx->date[3] = date_in_rom[7];
sys/dev/pci/drm/amd/amdgpu/atom.c
1389
ctx->date[4] = '/';
sys/dev/pci/drm/amd/amdgpu/atom.c
1390
ctx->date[5] = date_in_rom[0];
sys/dev/pci/drm/amd/amdgpu/atom.c
1391
ctx->date[6] = date_in_rom[1];
sys/dev/pci/drm/amd/amdgpu/atom.c
1392
ctx->date[7] = '/';
sys/dev/pci/drm/amd/amdgpu/atom.c
1393
ctx->date[8] = date_in_rom[3];
sys/dev/pci/drm/amd/amdgpu/atom.c
1394
ctx->date[9] = date_in_rom[4];
sys/dev/pci/drm/amd/amdgpu/atom.c
1395
ctx->date[10] = ' ';
sys/dev/pci/drm/amd/amdgpu/atom.c
1396
ctx->date[11] = date_in_rom[9];
sys/dev/pci/drm/amd/amdgpu/atom.c
1397
ctx->date[12] = date_in_rom[10];
sys/dev/pci/drm/amd/amdgpu/atom.c
1398
ctx->date[13] = date_in_rom[11];
sys/dev/pci/drm/amd/amdgpu/atom.c
1399
ctx->date[14] = date_in_rom[12];
sys/dev/pci/drm/amd/amdgpu/atom.c
1400
ctx->date[15] = date_in_rom[13];
sys/dev/pci/drm/amd/amdgpu/atom.c
1401
ctx->date[16] = '\0';
sys/dev/pci/drm/amd/amdgpu/atom.c
1404
static unsigned char *atom_find_str_in_rom(struct atom_context *ctx, char *str, int start,
sys/dev/pci/drm/amd/amdgpu/atom.c
1413
p_rom = ctx->bios;
sys/dev/pci/drm/amd/amdgpu/atom.c
1427
static void atom_get_vbios_pn(struct atom_context *ctx)
sys/dev/pci/drm/amd/amdgpu/atom.c
1435
p_rom = ctx->bios;
sys/dev/pci/drm/amd/amdgpu/atom.c
1447
vbios_str = atom_find_str_in_rom(ctx, BIOS_ATOM_PREFIX, 3, 1024, 64);
sys/dev/pci/drm/amd/amdgpu/atom.c
1459
ctx->vbios_pn[count] = vbios_str[count];
sys/dev/pci/drm/amd/amdgpu/atom.c
1463
ctx->vbios_pn[count] = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
1466
pr_info("ATOM BIOS: %s\n", ctx->vbios_pn);
sys/dev/pci/drm/amd/amdgpu/atom.c
1469
static void atom_get_vbios_version(struct atom_context *ctx)
sys/dev/pci/drm/amd/amdgpu/atom.c
1475
p_rom = ctx->bios;
sys/dev/pci/drm/amd/amdgpu/atom.c
1491
atom_find_str_in_rom(ctx, BIOS_VERSION_PREFIX, start, end, 64);
sys/dev/pci/drm/amd/amdgpu/atom.c
1495
memcpy(ctx->vbios_ver_str, vbios_ver, STRLEN_NORMAL);
sys/dev/pci/drm/amd/amdgpu/atom.c
1497
ctx->vbios_ver_str[0] = '\0';
sys/dev/pci/drm/amd/amdgpu/atom.c
1501
static void atom_get_vbios_build(struct atom_context *ctx)
sys/dev/pci/drm/amd/amdgpu/atom.c
1520
strscpy(ctx->build_num, str, len);
sys/dev/pci/drm/amd/amdgpu/atom.c
1526
struct atom_context *ctx =
sys/dev/pci/drm/amd/amdgpu/atom.c
1532
if (!ctx)
sys/dev/pci/drm/amd/amdgpu/atom.c
1535
ctx->card = card;
sys/dev/pci/drm/amd/amdgpu/atom.c
1536
ctx->bios = bios;
sys/dev/pci/drm/amd/amdgpu/atom.c
1540
kfree(ctx);
sys/dev/pci/drm/amd/amdgpu/atom.c
1547
kfree(ctx);
sys/dev/pci/drm/amd/amdgpu/atom.c
1556
kfree(ctx);
sys/dev/pci/drm/amd/amdgpu/atom.c
1560
ctx->cmd_table = CU16(base + ATOM_ROM_CMD_PTR);
sys/dev/pci/drm/amd/amdgpu/atom.c
1561
ctx->data_table = CU16(base + ATOM_ROM_DATA_PTR);
sys/dev/pci/drm/amd/amdgpu/atom.c
1562
atom_index_iio(ctx, CU16(ctx->data_table + ATOM_DATA_IIO_PTR) + 4);
sys/dev/pci/drm/amd/amdgpu/atom.c
1563
if (!ctx->iio) {
sys/dev/pci/drm/amd/amdgpu/atom.c
1564
amdgpu_atom_destroy(ctx);
sys/dev/pci/drm/amd/amdgpu/atom.c
1575
ctx->version = atom_fw_info->ulFirmwareRevision;
sys/dev/pci/drm/amd/amdgpu/atom.c
1579
atom_get_vbios_name(ctx);
sys/dev/pci/drm/amd/amdgpu/atom.c
1580
atom_get_vbios_pn(ctx);
sys/dev/pci/drm/amd/amdgpu/atom.c
1581
atom_get_vbios_date(ctx);
sys/dev/pci/drm/amd/amdgpu/atom.c
1582
atom_get_vbios_version(ctx);
sys/dev/pci/drm/amd/amdgpu/atom.c
1583
atom_get_vbios_build(ctx);
sys/dev/pci/drm/amd/amdgpu/atom.c
1585
return ctx;
sys/dev/pci/drm/amd/amdgpu/atom.c
1588
int amdgpu_atom_asic_init(struct atom_context *ctx)
sys/dev/pci/drm/amd/amdgpu/atom.c
1590
int hwi = CU16(ctx->data_table + ATOM_DATA_FWI_PTR);
sys/dev/pci/drm/amd/amdgpu/atom.c
1601
if (!CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_INIT))
sys/dev/pci/drm/amd/amdgpu/atom.c
1603
ret = amdgpu_atom_execute_table(ctx, ATOM_CMD_INIT, ps, 16);
sys/dev/pci/drm/amd/amdgpu/atom.c
1612
void amdgpu_atom_destroy(struct atom_context *ctx)
sys/dev/pci/drm/amd/amdgpu/atom.c
1614
kfree(ctx->iio);
sys/dev/pci/drm/amd/amdgpu/atom.c
1615
kfree(ctx);
sys/dev/pci/drm/amd/amdgpu/atom.c
1618
bool amdgpu_atom_parse_data_header(struct atom_context *ctx, int index,
sys/dev/pci/drm/amd/amdgpu/atom.c
1623
int idx = CU16(ctx->data_table + offset);
sys/dev/pci/drm/amd/amdgpu/atom.c
1624
u16 *mdt = (u16 *)(ctx->bios + ctx->data_table + 4);
sys/dev/pci/drm/amd/amdgpu/atom.c
1639
bool amdgpu_atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t *frev,
sys/dev/pci/drm/amd/amdgpu/atom.c
1643
int idx = CU16(ctx->cmd_table + offset);
sys/dev/pci/drm/amd/amdgpu/atom.c
1644
u16 *mct = (u16 *)(ctx->bios + ctx->cmd_table + 4);
sys/dev/pci/drm/amd/amdgpu/atom.c
165
((ctx->
sys/dev/pci/drm/amd/amdgpu/atom.c
182
static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,
sys/dev/pci/drm/amd/amdgpu/atom.c
186
struct atom_context *gctx = ctx->ctx;
sys/dev/pci/drm/amd/amdgpu/atom.c
227
if (idx < ctx->ps_size)
sys/dev/pci/drm/amd/amdgpu/atom.c
228
val = get_unaligned_le32((u32 *)&ctx->ps[idx]);
sys/dev/pci/drm/amd/amdgpu/atom.c
230
pr_info("PS index out of range: %i > %i\n", idx, ctx->ps_size);
sys/dev/pci/drm/amd/amdgpu/atom.c
268
if (idx < ctx->ws_size)
sys/dev/pci/drm/amd/amdgpu/atom.c
269
val = ctx->ws[idx];
sys/dev/pci/drm/amd/amdgpu/atom.c
271
pr_info("WS index out of range: %i > %i\n", idx, ctx->ws_size);
sys/dev/pci/drm/amd/amdgpu/atom.c
373
static void atom_skip_src_int(atom_exec_context *ctx, uint8_t attr, int *ptr)
sys/dev/pci/drm/amd/amdgpu/atom.c
408
static uint32_t atom_get_src(atom_exec_context *ctx, uint8_t attr, int *ptr)
sys/dev/pci/drm/amd/amdgpu/atom.c
410
return atom_get_src_int(ctx, attr, ptr, NULL, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
413
static uint32_t atom_get_src_direct(atom_exec_context *ctx, uint8_t align, int *ptr)
sys/dev/pci/drm/amd/amdgpu/atom.c
439
static uint32_t atom_get_dst(atom_exec_context *ctx, int arg, uint8_t attr,
sys/dev/pci/drm/amd/amdgpu/atom.c
442
return atom_get_src_int(ctx,
sys/dev/pci/drm/amd/amdgpu/atom.c
448
static void atom_skip_dst(atom_exec_context *ctx, int arg, uint8_t attr, int *ptr)
sys/dev/pci/drm/amd/amdgpu/atom.c
450
atom_skip_src_int(ctx,
sys/dev/pci/drm/amd/amdgpu/atom.c
455
static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr,
sys/dev/pci/drm/amd/amdgpu/atom.c
461
struct atom_context *gctx = ctx->ctx;
sys/dev/pci/drm/amd/amdgpu/atom.c
505
if (idx >= ctx->ps_size) {
sys/dev/pci/drm/amd/amdgpu/atom.c
506
pr_info("PS index out of range: %i > %i\n", idx, ctx->ps_size);
sys/dev/pci/drm/amd/amdgpu/atom.c
509
ctx->ps[idx] = cpu_to_le32(val);
sys/dev/pci/drm/amd/amdgpu/atom.c
541
if (idx >= ctx->ws_size) {
sys/dev/pci/drm/amd/amdgpu/atom.c
542
pr_info("WS index out of range: %i > %i\n", idx, ctx->ws_size);
sys/dev/pci/drm/amd/amdgpu/atom.c
545
ctx->ws[idx] = val;
sys/dev/pci/drm/amd/amdgpu/atom.c
599
static void atom_op_add(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
605
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
607
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
610
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
613
static void atom_op_and(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
619
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
621
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
624
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
627
static void atom_op_beep(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
63
struct atom_context *ctx;
sys/dev/pci/drm/amd/amdgpu/atom.c
632
static void atom_op_calltable(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
641
if (U16(ctx->ctx->cmd_table + 4 + 2 * idx))
sys/dev/pci/drm/amd/amdgpu/atom.c
642
r = amdgpu_atom_execute_table_locked(ctx->ctx, idx, ctx->ps + ctx->ps_shift, ctx->ps_size - ctx->ps_shift);
sys/dev/pci/drm/amd/amdgpu/atom.c
644
ctx->abort = true;
sys/dev/pci/drm/amd/amdgpu/atom.c
648
static void atom_op_clear(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
655
atom_get_dst(ctx, arg, attr, ptr, &saved, 0);
sys/dev/pci/drm/amd/amdgpu/atom.c
657
atom_put_dst(ctx, arg, attr, &dptr, 0, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
660
static void atom_op_compare(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
665
dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
667
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
668
ctx->ctx->cs_equal = (dst == src);
sys/dev/pci/drm/amd/amdgpu/atom.c
669
ctx->ctx->cs_above = (dst > src);
sys/dev/pci/drm/amd/amdgpu/atom.c
670
SDEBUG(" result: %s %s\n", ctx->ctx->cs_equal ? "EQ" : "NE",
sys/dev/pci/drm/amd/amdgpu/atom.c
671
ctx->ctx->cs_above ? "GT" : "LE");
sys/dev/pci/drm/amd/amdgpu/atom.c
674
static void atom_op_delay(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
686
static void atom_op_div(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
691
dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
693
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
695
ctx->ctx->divmul[0] = dst / src;
sys/dev/pci/drm/amd/amdgpu/atom.c
696
ctx->ctx->divmul[1] = dst % src;
sys/dev/pci/drm/amd/amdgpu/atom.c
698
ctx->ctx->divmul[0] = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
699
ctx->ctx->divmul[1] = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
703
static void atom_op_div32(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
709
dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
711
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
714
val64 |= ((uint64_t)ctx->ctx->divmul[1]) << 32;
sys/dev/pci/drm/amd/amdgpu/atom.c
716
ctx->ctx->divmul[0] = lower_32_bits(val64);
sys/dev/pci/drm/amd/amdgpu/atom.c
717
ctx->ctx->divmul[1] = upper_32_bits(val64);
sys/dev/pci/drm/amd/amdgpu/atom.c
719
ctx->ctx->divmul[0] = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
720
ctx->ctx->divmul[1] = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
724
static void atom_op_eot(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
729
static void atom_op_jump(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
737
execute = ctx->ctx->cs_above;
sys/dev/pci/drm/amd/amdgpu/atom.c
74
static int amdgpu_atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t *params, int params_size);
sys/dev/pci/drm/amd/amdgpu/atom.c
740
execute = ctx->ctx->cs_above || ctx->ctx->cs_equal;
sys/dev/pci/drm/amd/amdgpu/atom.c
746
execute = !(ctx->ctx->cs_above || ctx->ctx->cs_equal);
sys/dev/pci/drm/amd/amdgpu/atom.c
749
execute = !ctx->ctx->cs_above;
sys/dev/pci/drm/amd/amdgpu/atom.c
75
int amdgpu_atom_execute_table(struct atom_context *ctx, int index, uint32_t *params, int params_size);
sys/dev/pci/drm/amd/amdgpu/atom.c
752
execute = ctx->ctx->cs_equal;
sys/dev/pci/drm/amd/amdgpu/atom.c
755
execute = !ctx->ctx->cs_equal;
sys/dev/pci/drm/amd/amdgpu/atom.c
762
if (ctx->last_jump == (ctx->start + target)) {
sys/dev/pci/drm/amd/amdgpu/atom.c
764
if (time_after(cjiffies, ctx->last_jump_jiffies)) {
sys/dev/pci/drm/amd/amdgpu/atom.c
765
cjiffies -= ctx->last_jump_jiffies;
sys/dev/pci/drm/amd/amdgpu/atom.c
769
ctx->abort = true;
sys/dev/pci/drm/amd/amdgpu/atom.c
773
ctx->last_jump_jiffies = jiffies;
sys/dev/pci/drm/amd/amdgpu/atom.c
776
ctx->last_jump = ctx->start + target;
sys/dev/pci/drm/amd/amdgpu/atom.c
777
ctx->last_jump_jiffies = jiffies;
sys/dev/pci/drm/amd/amdgpu/atom.c
779
*ptr = ctx->start + target;
sys/dev/pci/drm/amd/amdgpu/atom.c
783
static void atom_op_mask(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
789
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
790
mask = atom_get_src_direct(ctx, ((attr >> 3) & 7), ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
793
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
797
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
800
static void atom_op_move(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
806
atom_get_dst(ctx, arg, attr, ptr, &saved, 0);
sys/dev/pci/drm/amd/amdgpu/atom.c
808
atom_skip_dst(ctx, arg, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
812
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
814
atom_put_dst(ctx, arg, attr, &dptr, src, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
817
static void atom_op_mul(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
822
dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
824
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
825
ctx->ctx->divmul[0] = dst * src;
sys/dev/pci/drm/amd/amdgpu/atom.c
828
static void atom_op_mul32(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
834
dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
836
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
838
ctx->ctx->divmul[0] = lower_32_bits(val64);
sys/dev/pci/drm/amd/amdgpu/atom.c
839
ctx->ctx->divmul[1] = upper_32_bits(val64);
sys/dev/pci/drm/amd/amdgpu/atom.c
842
static void atom_op_nop(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
847
static void atom_op_or(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
853
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
855
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
858
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
861
static void atom_op_postcard(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
867
static void atom_op_repeat(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
872
static void atom_op_restorereg(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
877
static void atom_op_savereg(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
882
static void atom_op_setdatablock(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
888
ctx->ctx->data_block = 0;
sys/dev/pci/drm/amd/amdgpu/atom.c
890
ctx->ctx->data_block = ctx->start;
sys/dev/pci/drm/amd/amdgpu/atom.c
892
ctx->ctx->data_block = U16(ctx->ctx->data_table + 4 + 2 * idx);
sys/dev/pci/drm/amd/amdgpu/atom.c
893
SDEBUG(" base: 0x%04X\n", ctx->ctx->data_block);
sys/dev/pci/drm/amd/amdgpu/atom.c
896
static void atom_op_setfbbase(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
900
ctx->ctx->fb_base = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
903
static void atom_op_setport(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
914
ctx->ctx->io_mode = ATOM_IO_MM;
sys/dev/pci/drm/amd/amdgpu/atom.c
916
ctx->ctx->io_mode = ATOM_IO_IIO | port;
sys/dev/pci/drm/amd/amdgpu/atom.c
920
ctx->ctx->io_mode = ATOM_IO_PCI;
sys/dev/pci/drm/amd/amdgpu/atom.c
924
ctx->ctx->io_mode = ATOM_IO_SYSIO;
sys/dev/pci/drm/amd/amdgpu/atom.c
930
static void atom_op_setregblock(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
932
ctx->ctx->reg_block = U16(*ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
934
SDEBUG(" base: 0x%04X\n", ctx->ctx->reg_block);
sys/dev/pci/drm/amd/amdgpu/atom.c
937
static void atom_op_shift_left(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
945
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
946
shift = atom_get_src_direct(ctx, ATOM_SRC_BYTE0, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
950
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
953
static void atom_op_shift_right(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
961
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
962
shift = atom_get_src_direct(ctx, ATOM_SRC_BYTE0, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
966
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
969
static void atom_op_shl(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
976
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
979
shift = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.c
985
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/amd/amdgpu/atom.c
988
static void atom_op_shr(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/amd/amdgpu/atom.c
995
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/amd/amdgpu/atom.c
998
shift = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/amd/amdgpu/atom.h
161
int amdgpu_atom_execute_table(struct atom_context *ctx, int index, uint32_t *params, int params_size);
sys/dev/pci/drm/amd/amdgpu/atom.h
162
int amdgpu_atom_asic_init(struct atom_context *ctx);
sys/dev/pci/drm/amd/amdgpu/atom.h
163
void amdgpu_atom_destroy(struct atom_context *ctx);
sys/dev/pci/drm/amd/amdgpu/atom.h
164
bool amdgpu_atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size,
sys/dev/pci/drm/amd/amdgpu/atom.h
166
bool amdgpu_atom_parse_cmd_header(struct atom_context *ctx, int index,
sys/dev/pci/drm/amd/amdgpu/dce_v10_0.c
2464
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/amd/amdgpu/dce_v6_0.c
2436
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/amd/amdgpu/dce_v8_0.c
2383
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/amd/amdgpu/mes_userqueue.c
119
struct amdgpu_userq_obj *ctx = &queue->fw_obj;
sys/dev/pci/drm/amd/amdgpu/mes_userqueue.c
134
queue_input.process_context_addr = ctx->gpu_addr;
sys/dev/pci/drm/amd/amdgpu/mes_userqueue.c
135
queue_input.gang_context_addr = ctx->gpu_addr + AMDGPU_USERQ_PROC_CTX_SZ;
sys/dev/pci/drm/amd/amdgpu/mes_userqueue.c
165
struct amdgpu_userq_obj *ctx = &queue->fw_obj;
sys/dev/pci/drm/amd/amdgpu/mes_userqueue.c
170
queue_input.gang_context_addr = ctx->gpu_addr + AMDGPU_USERQ_PROC_CTX_SZ;
sys/dev/pci/drm/amd/amdgpu/mes_userqueue.c
184
struct amdgpu_userq_obj *ctx = &queue->fw_obj;
sys/dev/pci/drm/amd/amdgpu/mes_userqueue.c
193
r = amdgpu_userq_create_object(uq_mgr, ctx, size);
sys/dev/pci/drm/amd/amdgpu/mes_userqueue.c
423
struct amdgpu_userq_obj *ctx = &queue->fw_obj;
sys/dev/pci/drm/amd/amdgpu/mes_userqueue.c
441
queue_input.gang_context_addr = ctx->gpu_addr + AMDGPU_USERQ_PROC_CTX_SZ;
sys/dev/pci/drm/amd/amdgpu/mes_userqueue.c
469
struct amdgpu_userq_obj *ctx = &queue->fw_obj;
sys/dev/pci/drm/amd/amdgpu/mes_userqueue.c
478
queue_input.gang_context_addr = ctx->gpu_addr + AMDGPU_USERQ_PROC_CTX_SZ;
sys/dev/pci/drm/amd/amdgpu/psp_v11_0.c
464
struct psp_memory_training_context *ctx = &psp->mem_train_ctx;
sys/dev/pci/drm/amd/amdgpu/psp_v11_0.c
465
uint32_t *pcache = (uint32_t *)ctx->sys_cache;
sys/dev/pci/drm/amd/amdgpu/psp_v11_0.c
472
if (ctx->init == PSP_MEM_TRAIN_NOT_SUPPORT) {
sys/dev/pci/drm/amd/amdgpu/psp_v11_0.c
475
} else if (ctx->init != PSP_MEM_TRAIN_INIT_SUCCESS) {
sys/dev/pci/drm/amd/amdgpu/psp_v11_0.c
485
amdgpu_device_vram_access(adev, ctx->p2c_train_data_offset, p2c_header, sizeof(p2c_header), false);
sys/dev/pci/drm/amd/amdgpu/psp_v11_0.c
564
amdgpu_device_vram_access(psp->adev, ctx->p2c_train_data_offset, ctx->sys_cache, ctx->train_data_size, false);
sys/dev/pci/drm/amd/amdgpu/psp_v11_0.c
568
amdgpu_device_vram_access(psp->adev, ctx->c2p_train_data_offset, ctx->sys_cache, ctx->train_data_size, true);
sys/dev/pci/drm/amd/amdgpu/psp_v11_0.c
579
ctx->training_cnt++;
sys/dev/pci/drm/amd/amdgpu/psp_v13_0.c
553
struct psp_memory_training_context *ctx = &psp->mem_train_ctx;
sys/dev/pci/drm/amd/amdgpu/psp_v13_0.c
554
uint32_t *pcache = (uint32_t *)ctx->sys_cache;
sys/dev/pci/drm/amd/amdgpu/psp_v13_0.c
561
if (ctx->init == PSP_MEM_TRAIN_NOT_SUPPORT) {
sys/dev/pci/drm/amd/amdgpu/psp_v13_0.c
564
} else if (ctx->init != PSP_MEM_TRAIN_INIT_SUCCESS) {
sys/dev/pci/drm/amd/amdgpu/psp_v13_0.c
574
amdgpu_device_vram_access(adev, ctx->p2c_train_data_offset, p2c_header, sizeof(p2c_header), false);
sys/dev/pci/drm/amd/amdgpu/psp_v13_0.c
653
amdgpu_device_vram_access(psp->adev, ctx->p2c_train_data_offset, ctx->sys_cache, ctx->train_data_size, false);
sys/dev/pci/drm/amd/amdgpu/psp_v13_0.c
657
amdgpu_device_vram_access(psp->adev, ctx->c2p_train_data_offset, ctx->sys_cache, ctx->train_data_size, true);
sys/dev/pci/drm/amd/amdgpu/psp_v13_0.c
668
ctx->training_cnt++;
sys/dev/pci/drm/amd/amdgpu/psp_v14_0.c
418
struct psp_memory_training_context *ctx = &psp->mem_train_ctx;
sys/dev/pci/drm/amd/amdgpu/psp_v14_0.c
419
uint32_t *pcache = (uint32_t *)ctx->sys_cache;
sys/dev/pci/drm/amd/amdgpu/psp_v14_0.c
426
if (ctx->init == PSP_MEM_TRAIN_NOT_SUPPORT) {
sys/dev/pci/drm/amd/amdgpu/psp_v14_0.c
429
} else if (ctx->init != PSP_MEM_TRAIN_INIT_SUCCESS) {
sys/dev/pci/drm/amd/amdgpu/psp_v14_0.c
439
amdgpu_device_vram_access(adev, ctx->p2c_train_data_offset, p2c_header, sizeof(p2c_header), false);
sys/dev/pci/drm/amd/amdgpu/psp_v14_0.c
518
amdgpu_device_vram_access(psp->adev, ctx->p2c_train_data_offset, ctx->sys_cache, ctx->train_data_size, false);
sys/dev/pci/drm/amd/amdgpu/psp_v14_0.c
522
amdgpu_device_vram_access(psp->adev, ctx->c2p_train_data_offset, ctx->sys_cache, ctx->train_data_size, true);
sys/dev/pci/drm/amd/amdgpu/psp_v14_0.c
533
ctx->training_cnt++;
sys/dev/pci/drm/amd/amdgpu/vcn_v1_0.c
2060
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/vcn_v1_0.c
2082
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/vcn_v3_0.c
1894
fence = amdgpu_ctx_get_fence(p->ctx, job->base.entity, ~0ull);
sys/dev/pci/drm/amd/amdgpu/vcn_v3_0.c
1909
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/vcn_v3_0.c
1934
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdgpu/vcn_v4_0.c
1811
fence = amdgpu_ctx_get_fence(p->ctx, job->base.entity, ~0ull);
sys/dev/pci/drm/amd/amdgpu/vcn_v4_0.c
1826
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdgpu/vcn_v4_0.c
1851
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1542
static int svm_range_reserve_bos(struct svm_validate_context *ctx, bool intr)
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1549
drm_exec_init(&ctx->exec, intr ? DRM_EXEC_INTERRUPTIBLE_WAIT: 0, 0);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1550
drm_exec_until_all_locked(&ctx->exec) {
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1551
for_each_set_bit(gpuidx, ctx->bitmap, MAX_GPU_INSTANCE) {
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1552
pdd = kfd_process_device_from_gpuidx(ctx->process, gpuidx);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1560
r = amdgpu_vm_lock_pd(vm, &ctx->exec, 2);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1561
drm_exec_retry_on_contention(&ctx->exec);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1569
for_each_set_bit(gpuidx, ctx->bitmap, MAX_GPU_INSTANCE) {
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1570
pdd = kfd_process_device_from_gpuidx(ctx->process, gpuidx);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1589
drm_exec_fini(&ctx->exec);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1593
static void svm_range_unreserve_bos(struct svm_validate_context *ctx)
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1595
drm_exec_fini(&ctx->exec);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1638
struct svm_validate_context *ctx;
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1645
ctx = kzalloc(sizeof(struct svm_validate_context), GFP_KERNEL);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1646
if (!ctx)
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1648
ctx->process = container_of(prange->svms, struct kfd_process, svms);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1649
ctx->prange = prange;
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1650
ctx->intr = intr;
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1653
bitmap_zero(ctx->bitmap, MAX_GPU_INSTANCE);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1654
bitmap_set(ctx->bitmap, gpuidx, 1);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1655
} else if (ctx->process->xnack_enabled) {
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1656
bitmap_copy(ctx->bitmap, prange->bitmap_aip, MAX_GPU_INSTANCE);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1663
gpuidx = kfd_process_gpuidx_from_gpuid(ctx->process,
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1672
bitmap_set(ctx->bitmap, gpuidx, 1);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1679
if (bitmap_empty(ctx->bitmap, MAX_GPU_INSTANCE)) {
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1682
bitmap_copy(ctx->bitmap, prange->bitmap_access, MAX_GPU_INSTANCE);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1685
bitmap_or(ctx->bitmap, prange->bitmap_access,
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1689
if (bitmap_empty(ctx->bitmap, MAX_GPU_INSTANCE)) {
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1703
r = svm_range_reserve_bos(ctx, intr);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1708
owner = kfd_svm_page_owner(p, find_first_bit(ctx->bitmap,
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1710
for_each_set_bit(idx, ctx->bitmap, MAX_GPU_INSTANCE) {
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1771
r = svm_range_dma_map(prange, ctx->bitmap, offset, npages,
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1800
ctx->bitmap, wait, flush_tlb);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1812
svm_range_unreserve_bos(ctx);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
1817
kfree(ctx);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
707
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
711
return ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
1105
adev->dm.dc->ctx->fbc_gpu_addr = compressor->gpu_addr;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
1259
struct dc_context *ctx = adev->dm.dc->ctx;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
12798
res = dc_wake_and_execute_dmub_cmd(dm->dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
1283
dmub_srv->hw_funcs.init_reg_offsets(dmub_srv, ctx);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13059
if (!adev->dm.freesync_module || !dc_supports_vrr(sink->ctx->dce_version))
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13157
if (dc->ctx->dmub_srv && !dc->ctx->dmub_srv->idle_exit_counter)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13161
void dm_write_reg_func(const struct dc_context *ctx, uint32_t address,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13166
drm_err(adev_to_drm(ctx->driver_context),
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13172
amdgpu_dm_exit_ips_for_hw_access(ctx->dc);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13173
cgs_write_register(ctx->cgs_device, address, value);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13174
trace_amdgpu_dc_wreg(&ctx->perf_trace->write_count, address, value);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13177
uint32_t dm_read_reg_func(const struct dc_context *ctx, uint32_t address,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13183
drm_err(adev_to_drm(ctx->driver_context),
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13189
if (ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13190
ctx->dmub_srv->reg_helper_offload.gather_in_progress &&
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13191
!ctx->dmub_srv->reg_helper_offload.should_burst_write) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13196
amdgpu_dm_exit_ips_for_hw_access(ctx->dc);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13198
value = cgs_read_register(ctx->cgs_device, address);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13200
trace_amdgpu_dc_rreg(&ctx->perf_trace->read_count, address, value);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13206
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13211
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13216
if (!dc_process_dmub_aux_transfer_async(ctx->dc, link_index, payload)) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13261
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13272
dm_execute_dmub_cmd(ctx, &command, DM_DMUB_WAIT_TYPE_NO_WAIT);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13277
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13290
const bool result = dm_execute_dmub_cmd_list(ctx, count, commands, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13312
abort_fused_io(ctx, &first->request);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13327
const bool result = execute_fused_io(dev, link->ctx, commands, count, timeout_us);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13334
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13339
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13344
is_cmd_complete = dc_process_dmub_set_config_async(ctx->dc,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13362
bool dm_execute_dmub_cmd(const struct dc_context *ctx, union dmub_rb_cmd *cmd, enum dm_dmub_wait_type wait_type)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13364
return dc_dmub_srv_cmd_run(ctx->dmub_srv, cmd, wait_type);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13367
bool dm_execute_dmub_cmd_list(const struct dc_context *ctx, unsigned int count, union dmub_rb_cmd *cmd, enum dm_dmub_wait_type wait_type)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13369
return dc_dmub_srv_cmd_run_list(ctx->dmub_srv, count, cmd, wait_type);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
13373
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
1405
if (!adev->dm.dc->ctx->dmub_srv)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
1406
adev->dm.dc->ctx->dmub_srv = dc_dmub_srv_create(adev->dm.dc, dmub_srv);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
1407
if (!adev->dm.dc->ctx->dmub_srv) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
2029
dce_version_to_string(adev->dm.dc->ctx->dce_version));
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
2273
dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
2430
static uint32_t amdgpu_dm_dmub_reg_read(void *ctx, uint32_t address)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
2432
struct amdgpu_device *adev = ctx;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
2434
return dm_read_reg(adev->dm.dc->ctx, address);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
2437
static void amdgpu_dm_dmub_reg_write(void *ctx, uint32_t address,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
2440
struct amdgpu_device *adev = ctx;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
2442
return dm_write_reg(adev->dm.dc->ctx, address, value);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
2702
ret = dm_helpers_dp_mst_stop_top_mgr(aconnector->dc_link->ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
2745
} else if (adev->dm.dc->ctx->dmub_srv) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3049
if (dc_supports_vrr(adev->dm.dc->ctx->dce_version)) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3240
dc_dmub_srv_set_power_state(dm->dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D3);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3269
struct dc_context *dc_ctx = link->ctx;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3338
link->ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3424
dc_dmub_srv_set_power_state(dm->dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D0);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3457
dc_dmub_srv_set_power_state(dm->dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D0);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3516
dc_dmub_srv_set_power_state(dm->dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D0);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3598
dm_helpers_dp_mst_start_top_mgr(aconnector->dc_link->ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3921
struct dc *dc = aconnector->dc_link->ctx->dc;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3929
if (dc->caps.ips_support && dc->ctx->dmub_srv->idle_allowed) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
3979
struct dc *dc = aconnector->dc_link->ctx->dc;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
4111
struct dc *dc = aconnector->dc_link->ctx->dc;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
4733
if (dc->ctx->dmub_srv) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5113
if (dm->dc->caps.ips_support && dm->dc->ctx->dmub_srv->idle_allowed) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5833
struct atom_context *ctx = mode_info->atom_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
5838
if (!amdgpu_atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset)) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
7019
dc_dsc_parse_dsc_dpcd(aconnector->dc_link->ctx->dc,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
7034
struct dc *dc = sink->ctx->dc;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
7095
struct dc *dc = sink->ctx->dc;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
7120
if (dc_dsc_compute_config(aconnector->dc_link->ctx->dc->res_pool->dscs[0],
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
7140
if (dc_dsc_compute_config(aconnector->dc_link->ctx->dc->res_pool->dscs[0],
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
8893
ddc_service->ctx->dc,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
8898
ddc_service->ctx->dc,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
8921
struct amdgpu_device *adev = ddc_service->ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.h
1071
int amdgpu_dm_process_dmub_aux_transfer_sync(struct dc_context *ctx, unsigned int link_index,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.h
1082
int amdgpu_dm_process_dmub_set_config_sync(struct dc_context *ctx, unsigned int link_index,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
1260
if (dc_plane_state->ctx && dc_plane_state->ctx->dc)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c
1261
color_caps = &dc_plane_state->ctx->dc->caps.color;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
518
if (!dc_stream_configure_crc(stream_state->ctx->dc,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
528
dc_stream_set_dyn_expansion(stream_state->ctx->dc, stream_state,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
533
dc_stream_set_dyn_expansion(stream_state->ctx->dc, stream_state,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
761
if (!dc_stream_get_crc(stream_state->ctx->dc, stream_state, 0,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
858
dc_stream_configure_crc(stream_state->ctx->dc, stream_state,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
873
if (!dc_stream_get_crc(stream_state->ctx->dc, stream_state, i,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
882
dc_stream_configure_crc(stream_state->ctx->dc, stream_state,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
330
if (dc_supports_vrr(dm->dc->ctx->dce_version)) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c
779
dm->adev->dm.dc->ctx->dce_version != DCN_VERSION_4_01) ?
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
1026
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
1029
if (dc->ctx->dmub_srv && dc->ctx->dmub_srv->dmub)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
1031
(bool)dc->ctx->dmub_srv->dmub->feature_caps.replay_supported;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
1365
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
1374
drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
1377
ret = drm_modeset_lock(&dev->mode_config.connection_mutex, &ctx);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
1380
ret = drm_modeset_backoff(&ctx);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
1409
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
1410
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
2687
dc_dmub_srv = dc->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
3247
struct dmub_srv *srv = adev->dm.dc->ctx->dmub_srv->dmub;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
3275
if (!dc_wake_and_execute_gpint(adev->dm.dc->ctx, cmd, res, NULL, DM_DMUB_WAIT_TYPE_WAIT))
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
3291
struct dmub_srv *srv = adev->dm.dc->ctx->dmub_srv->dmub;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
3303
if (!dc_wake_and_execute_gpint(adev->dm.dc->ctx, cmd, 0, &response, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY))
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
3400
dm_helpers_dp_read_dpcd(link->ctx, link, DP_SUPPORTED_LINK_RATES,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
49
return dm_helpers_submit_i2c(link->ctx, link, &cmd);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
62
return dm_helpers_submit_i2c(link->ctx, link, &cmd);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
70
return dm_helpers_dp_write_dpcd(link->ctx, link, address, data, size);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
773
if (dc->ctx->dce_version == DCN_VERSION_3_1 ||
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
774
dc->ctx->dce_version == DCN_VERSION_3_14 ||
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
775
dc->ctx->dce_version == DCN_VERSION_3_15 ||
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
776
dc->ctx->dce_version == DCN_VERSION_3_16 ||
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
777
dc->ctx->dce_version == DCN_VERSION_3_2 ||
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
778
dc->ctx->dce_version == DCN_VERSION_3_21 ||
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
779
dc->ctx->dce_version == DCN_VERSION_3_5 ||
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
78
return dm_helpers_dp_read_dpcd(link->ctx, link, address, data, size);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
780
dc->ctx->dce_version == DCN_VERSION_3_51 ||
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
781
dc->ctx->dce_version == DCN_VERSION_3_6 ||
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
782
dc->ctx->dce_version == DCN_VERSION_4_01)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1062
dm_helpers_dp_read_dpcd(ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1073
dm_helpers_dp_write_dpcd(ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1079
dm_helpers_dp_write_dpcd(ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1090
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1100
return amdgpu_dm_process_dmub_aux_transfer_sync(ctx, link->link_index, payload,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1104
int dm_helpers_dmub_set_config_sync(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1109
return amdgpu_dm_process_dmub_set_config_sync(ctx, link->link_index, payload,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1113
void dm_set_dcn_clocks(struct dc_context *ctx, struct dc_clocks *clks)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1118
void dm_helpers_smu_timeout(struct dc_context *ctx, unsigned int msg_id, unsigned int param, unsigned int timeout_us)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1125
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1143
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1152
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1157
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1163
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1167
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1172
bool dm_helpers_dmub_outbox_interrupt_control(struct dc_context *ctx, bool enable)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1179
ret = dc_interrupt_set(ctx->dc, irq_source, enable);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1196
if (!dm_helpers_dp_read_dpcd(link->ctx, link, DP_DOWNSPREAD_CTRL,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1206
dm_helpers_dp_write_dpcd(link->ctx, link, DP_DOWNSPREAD_CTRL,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1212
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1226
struct dc_state *dc_state = ctx->dc->current_state;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1227
struct clk_mgr *clk_mgr = ctx->dc->clk_mgr;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1333
ctx->dc->clk_mgr->funcs->update_clocks(
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1334
ctx->dc->clk_mgr,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1349
void dm_set_phyd32clk(struct dc_context *ctx, int freq_khz)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1354
void dm_helpers_enable_periodic_detection(struct dc_context *ctx, bool enable)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1356
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1366
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1408
bool dm_helpers_is_fullscreen(struct dc_context *ctx, struct dc_stream_state *stream)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
1414
bool dm_helpers_is_hdr_on(struct dc_context *ctx, struct dc_stream_state *stream)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
227
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
267
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
319
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
327
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
336
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
362
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
396
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
423
void dm_dtn_log_begin(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
433
dm_dtn_log_append_v(ctx, log_ctx, "%s", msg);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
437
void dm_dtn_log_append_v(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
498
void dm_dtn_log_end(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
508
dm_dtn_log_append_v(ctx, log_ctx, "%s", msg);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
512
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
546
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
568
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
585
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
601
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
636
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
643
struct amdgpu_device *dev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
827
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
894
ret = dm_helpers_dp_write_dpcd(ctx, stream->link, DP_DSC_ENABLE, &enable_dsc, 1);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
899
ret = dm_helpers_dp_write_dpcd(ctx, stream->link, DP_DSC_ENABLE, &enable_dsc, 1);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
909
bool dm_helpers_dp_write_hblank_reduction(struct dc_context *ctx, const struct dc_stream_state *stream)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
996
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
1248
stream->sink->ctx->dc->res_pool->dscs[0],
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
1249
stream->sink->ctx->dc->debug.dsc_min_slice_height_override,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
1500
res_pool = stream->ctx->dc->res_pool;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
1520
res_pool->funcs->remove_stream_from_ctx(stream->ctx->dc, dc_state, stream) != DC_OK)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
1542
if (dc_stream_add_dsc_to_resource(stream->ctx->dc, dc_state, stream) != DC_OK) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
1787
is_dsc_possible = dc_dsc_compute_bandwidth_range(stream->sink->ctx->dc->res_pool->dscs[0],
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
1788
stream->sink->ctx->dc->debug.dsc_min_slice_height_override,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
1948
if (dc_dsc_compute_config(stream->sink->ctx->dc->res_pool->dscs[0],
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
305
if (!dc_dsc_parse_dsc_dpcd(aconnector->dc_link->ctx->dc,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
512
struct drm_modeset_acquire_ctx *ctx, bool force)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
522
connection_status = drm_dp_mst_detect_port(connector, ctx, &master->mst_mgr,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
921
dc_dsc_get_default_config_option(params[i].sink->ctx->dc, &dsc_options);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
926
params[i].sink->ctx->dc->res_pool->dscs[0],
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
96
adev = ddc->ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
974
dc_dsc_get_default_config_option(param.sink->ctx->dc, &dsc_options);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
979
param.sink->ctx->dc->res_pool->dscs[0],
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
295
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
299
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
362
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
366
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
38
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
382
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
386
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
402
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
405
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
41
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
421
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
429
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
432
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
450
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
453
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
469
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
470
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
517
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
518
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
525
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
526
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
533
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
534
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
541
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
542
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
549
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
550
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
558
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
559
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
568
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
569
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
585
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
586
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
602
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
603
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
625
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
626
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
648
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
649
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
661
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
662
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
696
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
697
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
713
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
714
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
731
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
732
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
747
const struct dc_context *ctx = pp->dm;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
748
struct amdgpu_device *adev = ctx->driver_context;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
756
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
759
switch (ctx->dce_version) {
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
762
funcs->ctx.ver = PP_SMU_VER_RV;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
763
funcs->rv_funcs.pp_smu.dm = ctx;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
776
funcs->ctx.ver = PP_SMU_VER_NV;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
777
funcs->nv_funcs.pp_smu.dm = ctx;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
799
funcs->ctx.ver = PP_SMU_VER_RN;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c
800
funcs->rn_funcs.pp_smu.dm = ctx;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
110
dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
175
dc_stream_set_static_screen_params(link->ctx->dc,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
189
if (link->ctx->dc->caps.ips_support)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
190
dc_allow_idle_optimizations(link->ctx->dc, true);
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
35
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
40
if (dc->ctx->dce_version < DCN_VERSION_3_1)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c
108
link->ctx->dc->debug.visual_confirm == VISUAL_CONFIRM_REPLAY;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c
83
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c
98
if (!dc->ctx->dmub_srv || !dc->ctx->dmub_srv->dmub ||
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_replay.c
99
!dc->ctx->dmub_srv->dmub->feature_caps.replay_supported)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
40
dm_get_elapse_time_in_ns(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
47
void dm_perf_trace_timestamp(const char *func_name, unsigned int line, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
49
trace_amdgpu_dc_performance(ctx->perf_trace->read_count,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
50
ctx->perf_trace->write_count,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
51
&ctx->perf_trace->last_entry_read,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
52
&ctx->perf_trace->last_entry_write,
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
56
void dm_trace_smu_enter(uint32_t msg_id, uint32_t param_in, unsigned int delay, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
60
void dm_trace_smu_exit(bool success, uint32_t response, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/basics/calcs_logger.h
124
static void print_bw_calcs_vbios(struct dc_context *ctx, const struct bw_calcs_vbios *vbios)
sys/dev/pci/drm/amd/display/dc/basics/calcs_logger.h
183
static void print_bw_calcs_data(struct dc_context *ctx, struct bw_calcs_data *data)
sys/dev/pci/drm/amd/display/dc/basics/calcs_logger.h
28
#define DC_LOGGER ctx->logger
sys/dev/pci/drm/amd/display/dc/basics/calcs_logger.h
30
static void print_bw_calcs_dceip(struct dc_context *ctx, const struct bw_calcs_dceip *dceip)
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3041
bool bw_calcs(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3055
if (ctx->dc->config.multi_mon_pp_mclk_switch)
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3074
if (ctx->dc->debug.bandwidth_calcs_trace) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3075
print_bw_calcs_dceip(ctx, dceip);
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3076
print_bw_calcs_vbios(ctx, vbios);
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3077
print_bw_calcs_data(ctx, data);
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3124
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3154
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3182
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3210
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3245
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3275
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3303
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3331
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3365
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3394
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3421
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3448
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3496
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3524
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3552
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/dce_calcs.c
3580
if (ctx->dc->caps.max_slave_planes) {
sys/dev/pci/drm/amd/display/dc/basics/vector.c
103
vector, ctx, size, initial_value, struct_size))
sys/dev/pci/drm/amd/display/dc/basics/vector.c
112
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/basics/vector.c
121
if (dal_vector_construct(vector, ctx, capacity, struct_size))
sys/dev/pci/drm/amd/display/dc/basics/vector.c
254
vector->ctx,
sys/dev/pci/drm/amd/display/dc/basics/vector.c
263
vec_cloned = dal_vector_presized_create(vector->ctx, count,
sys/dev/pci/drm/amd/display/dc/basics/vector.c
31
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/basics/vector.c
49
vector->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/basics/vector.c
54
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/basics/vector.c
92
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/bios/bios_parser.c
2881
bp->base.ctx = init->ctx;
sys/dev/pci/drm/amd/display/dc/bios/bios_parser.c
52
bp->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/bios/bios_parser2.c
1424
if (dcb->ctx->dc->config.force_bios_enable_lttpr && *dce_caps == 0) {
sys/dev/pci/drm/amd/display/dc/bios/bios_parser2.c
3104
else if (bp->base.ctx->dc->config.force_bios_fixed_vs) {
sys/dev/pci/drm/amd/display/dc/bios/bios_parser2.c
3115
if (bp->base.ctx->dc->config.force_bios_fixed_vs && info->ext_disp_conn_info.fixdpvoltageswing == 0) {
sys/dev/pci/drm/amd/display/dc/bios/bios_parser2.c
3116
info->ext_disp_conn_info.fixdpvoltageswing = bp->base.ctx->dc->config.force_bios_fixed_vs & 0xF;
sys/dev/pci/drm/amd/display/dc/bios/bios_parser2.c
3714
bp->base.ctx = init->ctx;
sys/dev/pci/drm/amd/display/dc/bios/bios_parser2.c
48
bp->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/bios/bios_parser_helper.c
49
bios->ctx
sys/dev/pci/drm/amd/display/dc/bios/command_table.c
38
(amdgpu_atom_execute_table(((struct amdgpu_device *)bp->base.ctx->driver_context)->mode_info.atom_context, \
sys/dev/pci/drm/amd/display/dc/bios/command_table.c
43
amdgpu_atom_parse_cmd_header(((struct amdgpu_device *)bp->base.ctx->driver_context)->mode_info.atom_context, \
sys/dev/pci/drm/amd/display/dc/bios/command_table.c
47
bios_cmd_table_para_revision(bp->base.ctx->driver_context, \
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
1048
dc_wake_and_execute_dmub_cmd(dmcub->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
1059
if (bp->base.ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
1060
bp->base.ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
1061
enable_lvtma_control_dmcub(bp->base.ctx->dmub_srv,
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
125
dc_wake_and_execute_dmub_cmd(dmcub->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
180
if (bp->base.ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
181
bp->base.ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
182
encoder_control_dmcub(bp->base.ctx->dmub_srv, ¶ms);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
196
if (bp->base.ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
197
bp->base.ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
230
if (!BIOS_CMD_TABLE_REVISION(dig1transmittercontrol, frev, crev) && (bp->base.ctx->dc->ctx->dce_version <= DCN_VERSION_2_0))
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
262
dc_wake_and_execute_dmub_cmd(dmcub->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
296
if (bp->base.ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
297
bp->base.ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
298
transmitter_control_dmcub(bp->base.ctx->dmub_srv, &ps.param);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
324
dc_wake_and_execute_dmub_cmd(dmcub->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
378
if (bp->base.ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
379
bp->base.ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
381
struct dc_link *link = get_link_by_phy_id(bp->base.ctx->dc, dig_v1_7.phyid);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
404
dm_acpi_process_phy_transition_interlock(bp->base.ctx, process_phy_transition_init_params);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
406
transmitter_control_dmcub_v1_7(bp->base.ctx->dmub_srv, &dig_v1_7);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
410
dm_acpi_process_phy_transition_interlock(bp->base.ctx, process_phy_transition_init_params);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
425
if (bp->base.ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
426
bp->base.ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
44
bp->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
476
dc_wake_and_execute_dmub_cmd(dmcub->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
50
(amdgpu_atom_execute_table(((struct amdgpu_device *)bp->base.ctx->driver_context)->mode_info.atom_context, \
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
55
amdgpu_atom_parse_cmd_header(((struct amdgpu_device *)bp->base.ctx->driver_context)->mode_info.atom_context, \
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
553
if (bp->base.ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
554
bp->base.ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
555
set_pixel_clock_dmcub(bp->base.ctx->dmub_srv, &clk);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
569
if (bp->base.ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
570
bp->base.ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
59
bios_cmd_table_para_revision(bp->base.ctx->driver_context, \
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
840
dc_wake_and_execute_dmub_cmd(dmcub->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
862
if (bp->base.ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
863
bp->base.ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
864
enable_disp_power_gating_dmcub(bp->base.ctx->dmub_srv,
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
880
if (bp->base.ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/bios/command_table2.c
881
bp->base.ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
147
struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *pp_smu, struct dccg *dccg)
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
149
struct hw_asic_id asic_id = ctx->asic_id;
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
160
dce60_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
172
dce_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
182
dce110_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
194
dce_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
200
dce112_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
204
dce112_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
217
dce121_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
219
dce120_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
232
rn_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
237
rn_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
241
rv2_clk_mgr_construct(ctx, clk_mgr, pp_smu);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
246
rv1_clk_mgr_construct(ctx, clk_mgr, pp_smu);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
258
if (ctx->dce_version == DCN_VERSION_2_01) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
259
dcn201_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
263
dcn3_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
267
dcn3_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
271
dcn3_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
274
dcn20_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
285
vg_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
298
dcn31_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
310
dcn315_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
322
dcn316_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
333
dcn32_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
345
dcn314_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
357
if (ctx->dce_version == DCN_VERSION_3_51)
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
358
dcn351_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
360
dcn35_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
367
struct clk_mgr_internal *clk_mgr = dcn401_clk_mgr_construct(ctx, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
391
switch (clk_mgr_base->ctx->asic_id.chip_family) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
393
if (ASICREV_IS_SIENNA_CICHLID_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
395
} else if (ASICREV_IS_DIMGREY_CAVEFISH_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
398
if (ASICREV_IS_BEIGE_GOBY_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/clk_mgr.c
404
if (ASICREV_IS_VANGOGH(clk_mgr_base->ctx->asic_id.hw_internal_rev))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
235
struct dc_bios *bp = clk_mgr_base->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
237
struct dmcu *dmcu = clk_mgr_dce->base.ctx->dc->res_pool->dmcu;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
249
if (clk_mgr_base->ctx->dce_version == DCE_VERSION_6_0 ||
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
250
clk_mgr_base->ctx->dce_version == DCE_VERSION_6_4)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
279
struct dc_debug_options *debug = &clk_mgr_dce->base.ctx->dc->debug;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
280
struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
332
struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
382
if (clk_mgr_dce->base.ctx->dc->config.ignore_dpref_ss)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
397
dm_pp_apply_display_requirements(dc->ctx, pp_display_cfg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
414
if (dm_pp_apply_power_level_change_request(clk_mgr_base->ctx, &level_change_req))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
422
dce_pplib_apply_display_requirements(clk_mgr_base->ctx->dc, context);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
438
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
448
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.c
460
if (dm_pp_get_static_clocks(ctx, &static_clk_info))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce100/dce_clk_mgr.h
43
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c
123
struct dc *dc = context->clk_mgr->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c
221
if (dc->bw_vbios && (dc->ctx->asic_id.chip_family == FAMILY_AI) &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c
222
ASICREV_IS_VEGA20_P(dc->ctx->asic_id.hw_internal_rev) && (context->stream_count >= 2)) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c
252
dm_pp_apply_display_requirements(dc->ctx, pp_display_cfg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c
271
if (dm_pp_apply_power_level_change_request(clk_mgr_base->ctx, &level_change_req))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c
279
dce11_pplib_apply_display_requirements(clk_mgr_base->ctx->dc, context);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c
288
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c
291
dce_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.h
30
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
104
if (!((clk_mgr_base->ctx->asic_id.chip_family == FAMILY_AI) &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
105
ASICREV_IS_VEGA20_P(clk_mgr_base->ctx->asic_id.hw_internal_rev)))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
127
struct dc_bios *bp = clk_mgr->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
128
struct dc *dc = clk_mgr->base.ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
168
struct dc_bios *bp = clk_mgr->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
177
if (!((clk_mgr->base.ctx->asic_id.chip_family == FAMILY_AI) &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
178
ASICREV_IS_VEGA20_P(clk_mgr->base.ctx->asic_id.hw_internal_rev)))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
207
if (dm_pp_apply_power_level_change_request(clk_mgr_base->ctx, &level_change_req))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
215
dce11_pplib_apply_display_requirements(clk_mgr_base->ctx->dc, context);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
224
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
227
dce_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
74
struct dc_bios *bp = clk_mgr_base->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.c
75
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce112/dce112_clk_mgr.h
31
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c
109
dm_pp_apply_clock_for_voltage_request(clk_mgr_base->ctx, &clock_voltage_req);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c
117
dm_pp_apply_clock_for_voltage_request(clk_mgr_base->ctx, &clock_voltage_req);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c
119
dce11_pplib_apply_display_requirements(clk_mgr_base->ctx->dc, context);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c
128
void dce120_clk_mgr_construct(struct dc_context *ctx, struct clk_mgr_internal *clk_mgr)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c
130
dce_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c
140
void dce121_clk_mgr_construct(struct dc_context *ctx, struct clk_mgr_internal *clk_mgr)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c
142
dce120_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c
149
if (dce121_xgmi_enabled(ctx->dc->hwseq))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.c
60
struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.h
29
void dce120_clk_mgr_construct(struct dc_context *ctx, struct clk_mgr_internal *clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce120/dce120_clk_mgr.h
30
void dce121_clk_mgr_construct(struct dc_context *ctx, struct clk_mgr_internal *clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
106
dm_pp_apply_display_requirements(dc->ctx, pp_display_cfg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
123
if (dm_pp_apply_power_level_change_request(clk_mgr_base->ctx, &level_change_req))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
131
dce60_pplib_apply_display_requirements(clk_mgr_base->ctx->dc, context);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
147
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
152
dce_clk_mgr_construct(ctx, clk_mgr);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
86
struct dc_context *ctx = clk_mgr_base->ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
89
if (ASIC_REV_IS_TAHITI_P(ctx->asic_id.hw_internal_rev))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.c
90
dp_ref_clk_khz = ctx->dc_bios->fw_info.default_display_engine_pll_frequency;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dce60/dce60_clk_mgr.h
33
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c
192
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c
316
void rv1_clk_mgr_construct(struct dc_context *ctx, struct clk_mgr_internal *clk_mgr, struct pp_smu_funcs *pp_smu)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c
318
struct dc_debug_options *debug = &ctx->dc->debug;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c
319
struct dc_bios *bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.c
321
clk_mgr->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr.h
29
void rv1_clk_mgr_construct(struct dc_context *ctx, struct clk_mgr_internal *clk_mgr, struct pp_smu_funcs *pp_smu);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn10/rv1_clk_mgr_vbios_smu.c
128
struct dc *dc = clk_mgr->base.ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn10/rv2_clk_mgr.c
37
void rv2_clk_mgr_construct(struct dc_context *ctx, struct clk_mgr_internal *clk_mgr, struct pp_smu_funcs *pp_smu)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn10/rv2_clk_mgr.c
40
rv1_clk_mgr_construct(ctx, clk_mgr, pp_smu);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn10/rv2_clk_mgr.h
29
void rv2_clk_mgr_construct(struct dc_context *ctx, struct clk_mgr_internal *clk_mgr, struct pp_smu_funcs *pp_smu);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
110
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
152
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
155
struct dccg *dccg = clk_mgr->base.ctx->dc->res_pool->dccg;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
183
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
185
struct dccg *dccg = clk_mgr->base.ctx->dc->res_pool->dccg;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
222
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
229
struct dmcu *dmcu = clk_mgr_base->ctx->dc->res_pool->dmcu;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
400
dm_set_dcn_clocks(clk_mgr->ctx, &clk_mgr->clks);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
529
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
539
clk_mgr->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.h
41
void dcn20_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c
179
void dcn201_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c
184
struct dc_debug_options *debug = &ctx->dc->debug;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c
185
struct dc_bios *bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c
186
clk_mgr->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c
61
clk_mgr->base.ctx
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c
90
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.h
29
void dcn201_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
113
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
119
dpp_inst = clk_mgr->base.ctx->dc->res_pool->dpps[i]->inst;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
137
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
143
struct dmcu *dmcu = clk_mgr_base->ctx->dc->res_pool->dmcu;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
514
struct dc_debug_options *debug = &clk_mgr_base->ctx->dc->debug;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
701
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
706
struct dc_debug_options *debug = &ctx->dc->debug;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
712
is_green_sardine = ASICREV_IS_GREEN_SARDINE(ctx->asic_id.hw_internal_rev);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
714
clk_mgr->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
743
if (ctx->dc_bios->integrated_info->memory_type == LpDdr4MemType) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
756
if (ctx->dc->config.is_single_rank_dimm)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
775
ctx->dc_bios->integrated_info) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
776
rn_clk_mgr_helper_populate_bw_params (clk_mgr->base.bw_params, &clock_table, ctx->dc_bios->integrated_info);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
778
if (ctx->dc->config.is_asymmetric_memory)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
90
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.h
44
void rn_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c
146
struct dc *dc = clk_mgr->base.ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c
199
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c
206
struct dmcu *dmcu = clk_mgr_base->ctx->dc->res_pool->dmcu;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c
425
clk_mgr_base->ctx->dc->res_pool->funcs->update_bw_bounding_box(
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c
426
clk_mgr->base.ctx->dc, clk_mgr_base->bw_params);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c
521
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c
528
clk_mgr->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c
571
clk_mgr->wm_range_table = dm_helpers_allocate_gpu_mem(clk_mgr->base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c
585
dm_helpers_free_gpu_mem(clk_mgr->base.ctx, DC_MEM_ALLOC_TYPE_GART,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.h
91
void dcn3_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr_smu_msg.c
72
TRACE_SMU_MSG_DELAY(0, 0, delay_us * (initial_max_retries - max_retries), clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr_smu_msg.c
92
TRACE_SMU_MSG(msg_id, param_in, clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c
101
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c
678
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c
686
clk_mgr->base.base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c
700
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c
712
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c
736
if (ctx->dc_bios->integrated_info->memory_type == LpDdr5MemType) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c
750
if (ctx->dc_bios->integrated_info) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c
753
ctx->dc_bios->integrated_info,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c
758
dm_helpers_free_gpu_mem(clk_mgr->base.base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.c
767
dm_helpers_free_gpu_mem(clk_mgr_int->base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn301/vg_clk_mgr.h
45
void vg_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
116
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
141
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
158
dm_helpers_enable_periodic_detection(clk_mgr_base->ctx, true);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
184
dm_helpers_enable_periodic_detection(clk_mgr_base->ctx, false);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
257
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
58
clk_mgr->base.base.ctx->logger
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
637
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
674
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
682
clk_mgr->base.base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
696
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
708
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
728
if (ctx->dc_bios->integrated_info->memory_type == LpDdr5MemType) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
745
if (clk_mgr->base.base.ctx->dc->debug.pstate_enabled) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
789
if (ctx->dc_bios->integrated_info) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
792
ctx->dc_bios->integrated_info,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
798
dm_helpers_free_gpu_mem(clk_mgr->base.base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c
807
dm_helpers_free_gpu_mem(clk_mgr_int->base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.h
49
void dcn31_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c
193
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c
211
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c
242
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn31/dcn31_smu.c
327
if (!clk_mgr->base.ctx->dc->debug.enable_z9_disable_interface &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
1031
if (ctx->dc_bios->integrated_info && ctx->dc->config.use_default_clock_table == false) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
1034
ctx->dc_bios->integrated_info,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
1040
dm_helpers_free_gpu_mem(clk_mgr->base.base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
1049
dm_helpers_free_gpu_mem(clk_mgr_int->base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
214
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
280
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
299
dm_helpers_enable_periodic_detection(clk_mgr_base->ctx, true);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
324
dm_helpers_enable_periodic_detection(clk_mgr_base->ctx, false);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
406
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
79
clk_mgr->base.base.ctx->logger
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
916
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
924
clk_mgr->base.base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
938
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
950
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
970
if (ctx->dc_bios->integrated_info->memory_type == LpDdr5MemType)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.c
987
if (clk_mgr->base.base.ctx->dc->debug.pstate_enabled) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_clk_mgr.h
61
void dcn314_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c
212
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c
230
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c
261
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
102
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
132
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
244
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
47
clk_mgr->base.base.ctx->logger
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
604
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
612
clk_mgr->base.base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
626
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
638
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
655
if (ctx->dc_bios->integrated_info->memory_type == LpDdr5MemType) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
672
if (clk_mgr->base.base.ctx->dc->debug.pstate_enabled) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
716
if (ctx->dc_bios->integrated_info) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
719
ctx->dc_bios->integrated_info,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
725
dm_helpers_free_gpu_mem(clk_mgr->base.base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
734
dm_helpers_free_gpu_mem(clk_mgr_int->base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.h
42
void dcn315_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c
206
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c
224
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c
255
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn315/dcn315_smu.c
53
#define CTX clk_mgr->base.ctx
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
105
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
142
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
252
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
579
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
587
clk_mgr->base.base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
601
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
613
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
639
if (ctx->dc_bios->integrated_info->memory_type == LpDdr5MemType) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
657
if (clk_mgr->base.base.ctx->dc->debug.pstate_enabled) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
660
if (ctx->dc_bios->integrated_info) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
663
ctx->dc_bios->integrated_info,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
669
dm_helpers_free_gpu_mem(clk_mgr->base.base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
678
dm_helpers_free_gpu_mem(clk_mgr_int->base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.h
42
void dcn316_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
181
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
199
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn316/dcn316_smu.c
230
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
1064
clk_mgr_base->ctx->dc->res_pool->funcs->update_bw_bounding_box(
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
1065
clk_mgr->base.ctx->dc, clk_mgr_base->bw_params);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
1145
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
1152
clk_mgr->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
1154
if (ASICREV_IS_GC_11_0_2(clk_mgr->base.ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
1177
if (ctx->dc->debug.disable_dtb_ref_clk_switch) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
1179
if (ctx->dce_version == DCN_VERSION_3_21)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
1195
if (ctx->dc->debug.disable_dtb_ref_clk_switch &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
1216
clk_mgr->wm_range_table = dm_helpers_allocate_gpu_mem(clk_mgr->base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
1230
dm_helpers_free_gpu_mem(clk_mgr->base.ctx, DC_MEM_ALLOC_TYPE_GART,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
203
if (!clk_mgr->base.ctx->dc->debug.disable_dtb_ref_clk_switch) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
236
if (clk_mgr_base->ctx->dc->debug.min_disp_clk_khz) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
239
< khz_to_mhz_ceil(clk_mgr_base->ctx->dc->debug.min_disp_clk_khz))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
241
= khz_to_mhz_ceil(clk_mgr_base->ctx->dc->debug.min_disp_clk_khz);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
247
if (clk_mgr_base->ctx->dc->debug.min_dpp_clk_khz) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
250
< khz_to_mhz_ceil(clk_mgr_base->ctx->dc->debug.min_dpp_clk_khz))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
252
= khz_to_mhz_ceil(clk_mgr_base->ctx->dc->debug.min_dpp_clk_khz);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
274
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
320
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
357
struct dc *dc = clk_mgr->base.ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
371
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
374
struct dccg *dccg = clk_mgr->base.ctx->dc->res_pool->dccg;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
425
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
427
struct dccg *dccg = clk_mgr->base.ctx->dc->res_pool->dccg;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
627
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
633
struct dmcu *dmcu = clk_mgr_base->ctx->dc->res_pool->dmcu;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
670
if (clk_mgr_base->ctx->dce_version != DCN_VERSION_3_21 && clk_mgr_base->clks.fclk_p_state_change_support) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
739
if (clk_mgr_base->ctx->dce_version != DCN_VERSION_3_21 && !clk_mgr_base->clks.fclk_p_state_change_support && update_fclk &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
854
if (ASICREV_IS_GC_11_0_2(clk_mgr->base.ctx->asic_id.hw_internal_rev))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
883
if (ASICREV_IS_GC_11_0_2(clk_mgr->base.ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c
940
struct dc_bios *bp = clk_mgr->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.h
30
void dcn32_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c
124
TRACE_SMU_MSG_DELAY(0, 0, *total_delay_us, clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c
146
TRACE_SMU_MSG(msg_id, param_in, clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c
196
if (ASICREV_IS_GC_11_0_0(clk_mgr->base.ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c
199
} else if (ASICREV_IS_GC_11_0_2(clk_mgr->base.ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c
66
TRACE_SMU_MSG_DELAY(0, 0, delay_us * (initial_max_retries - max_retries), clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr_smu_msg.c
86
TRACE_SMU_MSG(msg_id, param_in, clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn351_clk_mgr.c
127
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn351_clk_mgr.c
137
dcn35_clk_mgr_construct(ctx, clk_mgr, pp_smu, dccg);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1195
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1292
dm_set_dcn_clocks(clk_mgr->ctx, &clk_mgr->clks);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1370
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1377
clk_mgr->base.base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1389
if (ctx->dce_version != DCN_VERSION_3_51) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1397
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1409
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1419
if (ctx->dce_version == DCN_VERSION_3_51) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1421
clk_mgr->base.base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1439
if (ctx->dc_bios->integrated_info->memory_type == LpDdr5MemType) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1457
if (clk_mgr->base.base.ctx->dc->debug.pstate_enabled) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1459
if (ctx->dce_version == DCN_VERSION_3_51) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1512
if (ctx->dc_bios->integrated_info && ctx->dc->config.use_default_clock_table == false) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1515
ctx->dc_bios->integrated_info,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1521
dm_helpers_free_gpu_mem(clk_mgr->base.base.ctx, DC_MEM_ALLOC_TYPE_GART,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1525
dm_helpers_free_gpu_mem(clk_mgr->base.base.ctx, DC_MEM_ALLOC_TYPE_GART,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1528
if (ctx->dc->config.disable_ips != DMUB_IPS_DISABLE_ALL) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1534
ctx->dc->debug.ignore_pg = false;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1535
ctx->dc->debug.disable_dpp_power_gate = false;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1536
ctx->dc->debug.disable_hubp_power_gate = false;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1537
ctx->dc->debug.disable_dsc_power_gate = false;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1540
if (ctx->dc->config.disable_ips == DMUB_IPS_ENABLE &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1541
ctx->dce_version != DCN_VERSION_3_51 &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1543
ctx->dc->config.disable_ips = DMUB_IPS_RCG_IN_ACTIVE_IPS2_IN_OFF;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1546
ctx->dc->config.disable_ips = DMUB_IPS_DISABLE_ALL; /*pmfw not support it, disable it all*/
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
1556
dm_helpers_free_gpu_mem(clk_mgr_int->base.ctx, DC_MEM_ALLOC_TYPE_FRAME_BUFFER,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
192
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
195
if (dc->ctx->dce_environment == DCE_ENV_DIAG)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
233
has_active_hpo = dccg->ctx->dc->link_srv->dp_is_128b_132b_signal(old_pipe) &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
234
dccg->ctx->dc->link_srv->dp_is_128b_132b_signal(new_pipe);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
240
!dccg->ctx->dc->link_srv->dp_is_128b_132b_signal(pipe)) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
262
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
288
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
316
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
317
struct dpp *old_dpp = clk_mgr->base.ctx->dc->current_state->res_ctx.pipe_ctx[i].plane_res.dpp;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
384
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
408
dm_helpers_enable_periodic_detection(clk_mgr_base->ctx, true);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
413
if (clk_mgr->base.ctx->dc->config.allow_0_dtb_clk)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
428
dm_helpers_enable_periodic_detection(clk_mgr_base->ctx, false);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
52
clk_mgr->base.base.ctx->logger
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
532
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
650
if (clk_mgr->base.base.ctx->dc->debug.pstate_enabled) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
712
if (clk_mgr_base->ctx->dce_version == DCN_VERSION_3_51) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.h
56
void dcn35_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.h
63
void dcn351_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_smu.c
129
if (clk_mgr->base.ctx->dc->debug.disable_timeout)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn35/dcn35_smu.c
280
if (!clk_mgr->base.ctx->dc->debug.pstate_enabled)
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1085
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1086
struct dmcu *dmcu = clk_mgr_base->ctx->dc->res_pool->dmcu;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1222
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
127
if (ASICREV_IS_GC_12_0_0_A0(clk_mgr->base.ctx->asic_id.hw_internal_rev) &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1273
struct dc_bios *bp = clk_mgr->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
130
} else if (ASICREV_IS_GC_12_0_1_A0(clk_mgr->base.ctx->asic_id.hw_internal_rev) &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1330
const struct dc *dc = clk_mgr->base.ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1364
return clk_mgr->base.ctx->dc->current_state->bw_ctx.bw.dcn.clk.dramclk_khz;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1371
return clk_mgr->base.ctx->dc->current_state->bw_ctx.bw.dcn.clk.fclk_khz;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1415
if (clk_mgr_base->ctx->dc_bios) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1418
clk_mgr_base->bw_params->num_channels = clk_mgr_base->ctx->dc_bios->vram_info.num_chans;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1420
clk_mgr_base->bw_params->dram_channel_width_bytes = clk_mgr_base->ctx->dc_bios->vram_info.dram_channel_width_bytes;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1424
clk_mgr_base->ctx->dc->res_pool->funcs->update_bw_bounding_box(
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1425
clk_mgr->base.ctx->dc, clk_mgr_base->bw_params);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
148
if (ASICREV_IS_GC_12_0_1_A0(clk_mgr->base.ctx->asic_id.hw_internal_rev) &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
150
is_df_throttle_opt_enabled = !clk_mgr->base.ctx->dc->debug.force_subvp_df_throttle;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1548
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1559
clk_mgr->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1588
if (ctx->dc->debug.disable_dtb_ref_clk_switch &&
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1610
clk_mgr->wm_range_table = dm_helpers_allocate_gpu_mem(clk_mgr->base.ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
1628
dm_helpers_free_gpu_mem(clk_mgr->base.ctx, DC_MEM_ALLOC_TYPE_GART,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
201
if (clk_mgr->ctx->dc->bb_overrides.dummy_clock_change_latency_ns != 0x7FFFFFFF) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
262
if (!clk_mgr->base.ctx->dc->debug.disable_dtb_ref_clk_switch) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
291
if (clk_mgr_base->ctx->dc->debug.min_disp_clk_khz) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
294
< khz_to_mhz_ceil(clk_mgr_base->ctx->dc->debug.min_disp_clk_khz))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
296
= khz_to_mhz_ceil(clk_mgr_base->ctx->dc->debug.min_disp_clk_khz);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
299
if (clk_mgr_base->ctx->dc->debug.min_dpp_clk_khz) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
302
< khz_to_mhz_ceil(clk_mgr_base->ctx->dc->debug.min_dpp_clk_khz))
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
304
= khz_to_mhz_ceil(clk_mgr_base->ctx->dc->debug.min_dpp_clk_khz);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
542
use_hpo_encoder = dccg->ctx->dc->link_srv->dp_is_128b_132b_signal(otg_master);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
550
dccg->ctx->dc->link_srv->dp_get_encoding_format(
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
562
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
620
struct dc *dc = clk_mgr->base.ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.c
772
struct dc *dc = clk_mgr_base->ctx->dc;
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr.h
110
struct clk_mgr_internal *dcn401_clk_mgr_construct(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c
120
TRACE_SMU_MSG_ENTER(msg_id, param_in, clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c
137
TRACE_SMU_MSG_EXIT(true, param_out ? *param_out : 0, clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c
142
TRACE_SMU_MSG_EXIT(false, 0, clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c
60
TRACE_SMU_MSG_ENTER(msg_id, param_in, clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c
76
TRACE_SMU_MSG_EXIT(true, param_out ? *param_out : 0, clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/clk_mgr/dcn401/dcn401_clk_mgr_smu_msg.c
80
TRACE_SMU_MSG_EXIT(false, 0, clk_mgr->base.ctx);
sys/dev/pci/drm/amd/display/dc/core/dc.c
1031
dc->ctx = dc_ctx;
sys/dev/pci/drm/amd/display/dc/core/dc.c
1101
dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc.c
1112
bp_init_data.ctx = dc_ctx;
sys/dev/pci/drm/amd/display/dc/core/dc.c
1148
dc->clk_mgr = dc_clk_mgr_create(dc->ctx, dc->res_pool->pp_smu, dc->res_pool->dccg);
sys/dev/pci/drm/amd/display/dc/core/dc.c
1234
if (dc->ctx->dce_version >= DCN_VERSION_1_0) {
sys/dev/pci/drm/amd/display/dc/core/dc.c
1248
if (dc->ctx->dce_version < DCN_VERSION_2_0)
sys/dev/pci/drm/amd/display/dc/core/dc.c
1252
if (dc->ctx->dce_version >= DCN_VERSION_2_0) {
sys/dev/pci/drm/amd/display/dc/core/dc.c
1289
memcpy(color, &dc->ctx->dmub_srv->dmub->visual_confirm_color, sizeof(struct tg_color));
sys/dev/pci/drm/amd/display/dc/core/dc.c
1564
if (dc->ctx->dce_environment != DCE_ENV_VIRTUAL_HW)
sys/dev/pci/drm/amd/display/dc/core/dc.c
1566
dc_dmub_srv_notify_fw_dc_power_state(dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D0);
sys/dev/pci/drm/amd/display/dc/core/dc.c
1572
dc->ctx->cp_psp = init_params->cp_psp;
sys/dev/pci/drm/amd/display/dc/core/dc.c
1577
memset(&dc->ctx->cp_psp, 0, sizeof(dc->ctx->cp_psp));
sys/dev/pci/drm/amd/display/dc/core/dc.c
1589
struct dc_state *ctx)
sys/dev/pci/drm/amd/display/dc/core/dc.c
1596
if (!ctx->res_ctx.pipe_ctx[i].stream ||
sys/dev/pci/drm/amd/display/dc/core/dc.c
1597
!ctx->res_ctx.pipe_ctx[i].stream->triggered_crtc_reset.enabled)
sys/dev/pci/drm/amd/display/dc/core/dc.c
1599
if (ctx->res_ctx.pipe_ctx[i].stream == ctx->res_ctx.pipe_ctx[i].stream->triggered_crtc_reset.event_source)
sys/dev/pci/drm/amd/display/dc/core/dc.c
1601
multisync_pipes[multisync_count] = &ctx->res_ctx.pipe_ctx[i];
sys/dev/pci/drm/amd/display/dc/core/dc.c
1613
struct dc_state *ctx)
sys/dev/pci/drm/amd/display/dc/core/dc.c
1622
if (!ctx->res_ctx.pipe_ctx[i].stream
sys/dev/pci/drm/amd/display/dc/core/dc.c
1623
|| ctx->res_ctx.pipe_ctx[i].top_pipe
sys/dev/pci/drm/amd/display/dc/core/dc.c
1624
|| ctx->res_ctx.pipe_ctx[i].prev_odm_pipe)
sys/dev/pci/drm/amd/display/dc/core/dc.c
1627
unsynced_pipes[i] = &ctx->res_ctx.pipe_ctx[i];
sys/dev/pci/drm/amd/display/dc/core/dc.c
1689
struct dc_stream_status *status = dc_state_get_stream_status(ctx, pipe_set[k]->stream);
sys/dev/pci/drm/amd/display/dc/core/dc.c
1737
dc, ctx, group_index, group_size, pipe_set);
sys/dev/pci/drm/amd/display/dc/core/dc.c
181
static int get_seamless_boot_stream_count(struct dc_state *ctx)
sys/dev/pci/drm/amd/display/dc/core/dc.c
186
for (i = 0; i < ctx->stream_count; i++)
sys/dev/pci/drm/amd/display/dc/core/dc.c
187
if (ctx->streams[i]->apply_seamless_boot_optimization)
sys/dev/pci/drm/amd/display/dc/core/dc.c
199
struct dc_bios *bios = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/core/dc.c
2112
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/core/dc.c
2296
if (dc->ctx->dce_version >= DCE_VERSION_MAX)
sys/dev/pci/drm/amd/display/dc/core/dc.c
2304
dc_dmub_srv_notify_stream_mask(dc->ctx->dmub_srv, context->stream_mask);
sys/dev/pci/drm/amd/display/dc/core/dc.c
2351
if (dc->ctx->dce_environment == DCE_ENV_VIRTUAL_HW)
sys/dev/pci/drm/amd/display/dc/core/dc.c
241
link_init_params.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc.c
2556
if (dc->ctx->dce_version < DCE_VERSION_MAX)
sys/dev/pci/drm/amd/display/dc/core/dc.c
263
link_init_params.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc.c
293
link->ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc.c
3064
struct dc_state *ctx,
sys/dev/pci/drm/amd/display/dc/core/dc.c
3069
for (i = 0; i < ctx->stream_count; i++) {
sys/dev/pci/drm/amd/display/dc/core/dc.c
3070
if (stream == ctx->streams[i]) {
sys/dev/pci/drm/amd/display/dc/core/dc.c
3071
return &ctx->stream_status[i];
sys/dev/pci/drm/amd/display/dc/core/dc.c
309
enc_init.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc.c
3227
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc.c
3462
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc.c
354
link_enc = dc->res_pool->funcs->link_enc_create_minimal(dc->ctx,
sys/dev/pci/drm/amd/display/dc/core/dc.c
3741
&& stream->ctx->dce_version >= DCN_VERSION_3_1)
sys/dev/pci/drm/amd/display/dc/core/dc.c
3747
if (stream->ctx->dce_version >= DCN_VERSION_3_5 && stream->abm_level)
sys/dev/pci/drm/amd/display/dc/core/dc.c
3801
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_NO_WAIT);
sys/dev/pci/drm/amd/display/dc/core/dc.c
4159
dmub_hw_lock_mgr_cmd(dc->ctx->dmub_srv,
sys/dev/pci/drm/amd/display/dc/core/dc.c
4341
cur_pipe->plane_res.hubp, dc->ctx,
sys/dev/pci/drm/amd/display/dc/core/dc.c
4429
dmub_hw_lock_mgr_cmd(dc->ctx->dmub_srv,
sys/dev/pci/drm/amd/display/dc/core/dc.c
4499
dc_dmub_srv_notify_stream_mask(dc->ctx->dmub_srv, current_stream_mask);
sys/dev/pci/drm/amd/display/dc/core/dc.c
462
if (dc->ctx->dce_version > DCE_VERSION_MAX) {
sys/dev/pci/drm/amd/display/dc/core/dc.c
5353
if (dc->ctx->dce_version >= DCN_VERSION_4_01)
sys/dev/pci/drm/amd/display/dc/core/dc.c
5359
if (ret && (dc->ctx->dce_version >= DCN_VERSION_3_2 ||
sys/dev/pci/drm/amd/display/dc/core/dc.c
5360
dc->ctx->dce_version == DCN_VERSION_3_01))
sys/dev/pci/drm/amd/display/dc/core/dc.c
5381
if (dc->ctx->dce_version >= DCN_VERSION_4_01) {
sys/dev/pci/drm/amd/display/dc/core/dc.c
5389
if (ret && dc->ctx->dce_version >= DCN_VERSION_3_2)
sys/dev/pci/drm/amd/display/dc/core/dc.c
5432
if (dc->ctx->dce_environment != DCE_ENV_VIRTUAL_HW &&
sys/dev/pci/drm/amd/display/dc/core/dc.c
5453
dc_dmub_srv_notify_fw_dc_power_state(dc->ctx->dmub_srv, power_state);
sys/dev/pci/drm/amd/display/dc/core/dc.c
5464
dc_dmub_srv_notify_fw_dc_power_state(dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D3);
sys/dev/pci/drm/amd/display/dc/core/dc.c
5473
dc_dmub_srv_notify_fw_dc_power_state(dc->ctx->dmub_srv, power_state);
sys/dev/pci/drm/amd/display/dc/core/dc.c
5648
if (!dc->ctx->dmub_srv)
sys/dev/pci/drm/amd/display/dc/core/dc.c
5651
return dc->ctx->dmub_srv->idle_allowed;
sys/dev/pci/drm/amd/display/dc/core/dc.c
567
dc_wake_and_execute_dmub_cmd(dmub_srv->ctx, &cmd, DM_DMUB_WAIT_TYPE_NO_WAIT);
sys/dev/pci/drm/amd/display/dc/core/dc.c
5815
switch (dc->ctx->asic_id.chip_family) {
sys/dev/pci/drm/amd/display/dc/core/dc.c
5819
if (dc->ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0 &&
sys/dev/pci/drm/amd/display/dc/core/dc.c
5865
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc.c
589
struct dc *dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc.c
5933
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/core/dc.c
5987
if (!dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY)) {
sys/dev/pci/drm/amd/display/dc/core/dc.c
6030
if (!dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY))
sys/dev/pci/drm/amd/display/dc/core/dc.c
605
dmub_srv = dc->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/core/dc.c
6070
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/core/dc.c
6089
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/core/dc.c
6103
dc_dmub_srv_log_diagnostic_data(dc->ctx->dmub_srv);
sys/dev/pci/drm/amd/display/dc/core/dc.c
6112
bios_set_scratch_acc_mode_change(dc->ctx->dc_bios, 0);
sys/dev/pci/drm/amd/display/dc/core/dc.c
6282
if (!context->clk_mgr || !context->clk_mgr->ctx || !context->clk_mgr->ctx->dc)
sys/dev/pci/drm/amd/display/dc/core/dc.c
6284
struct dc *dc = context->clk_mgr->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc.c
6302
struct dc *dc = context->clk_mgr->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc.c
6328
dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc.c
644
dc_wake_and_execute_dmub_cmd(dmub_srv->ctx, &cmd, DM_DMUB_WAIT_TYPE_NO_WAIT);
sys/dev/pci/drm/amd/display/dc/core/dc.c
655
struct dc *dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc.c
670
dmub_srv = dc->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/core/dc.c
841
dc_exit_ips_for_hw_access(stream->ctx->dc);
sys/dev/pci/drm/amd/display/dc/core/dc.c
93
dc->ctx
sys/dev/pci/drm/amd/display/dc/core/dc.c
959
if (dc->ctx) {
sys/dev/pci/drm/amd/display/dc/core/dc.c
96
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/core/dc.c
960
if (dc->ctx->gpio_service)
sys/dev/pci/drm/amd/display/dc/core/dc.c
961
dal_gpio_service_destroy(&dc->ctx->gpio_service);
sys/dev/pci/drm/amd/display/dc/core/dc.c
963
if (dc->ctx->created_bios)
sys/dev/pci/drm/amd/display/dc/core/dc.c
964
dal_bios_parser_destroy(&dc->ctx->dc_bios);
sys/dev/pci/drm/amd/display/dc/core/dc.c
965
kfree(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc.c
966
dc_perf_trace_destroy(&dc->ctx->perf_trace);
sys/dev/pci/drm/amd/display/dc/core/dc.c
968
kfree(dc->ctx);
sys/dev/pci/drm/amd/display/dc/core/dc.c
969
dc->ctx = NULL;
sys/dev/pci/drm/amd/display/dc/core/dc_debug.c
178
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_debug.c
188
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_debug.c
40
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/core/dc_debug.c
60
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_hw_sequencer.c
1016
struct dc_context *ctx = params->send_dmcub_cmd_params.ctx;
sys/dev/pci/drm/amd/display/dc/core/dc_hw_sequencer.c
1020
dc_wake_and_execute_dmub_cmd(ctx, cmd, wait_type);
sys/dev/pci/drm/amd/display/dc/core/dc_hw_sequencer.c
597
if (dc->ctx->dce_version < DCN_VERSION_4_01) {
sys/dev/pci/drm/amd/display/dc/core/dc_hw_sequencer.c
638
if (!dc->ctx || !dc->ctx->dmub_srv || !pipe_ctx || !vba)
sys/dev/pci/drm/amd/display/dc/core/dc_hw_sequencer.c
711
if (!dc->ctx || !dc->ctx->dmub_srv || !pipe_ctx || !context || !dc->debug.fams2_config.bits.enable)
sys/dev/pci/drm/amd/display/dc/core/dc_hw_sequencer.c
774
block_sequence[*num_steps].params.send_dmcub_cmd_params.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc_hw_sequencer.c
802
block_sequence[*num_steps].params.subvp_save_surf_addr.dc_dmub_srv = dc->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/core/dc_link_enc_cfg.c
147
stream->link_enc = stream->ctx->dc->res_pool->link_encoders[eng_idx];
sys/dev/pci/drm/amd/display/dc/core/dc_link_enc_cfg.c
159
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/core/dc_link_enc_cfg.c
168
for (i = 0; i < ctx->dc->res_pool->res_cap->num_dig_link_enc; i++) {
sys/dev/pci/drm/amd/display/dc/core/dc_link_enc_cfg.c
177
for (i = 0; i < ctx->dc->res_pool->res_cap->num_dig_link_enc; i++) {
sys/dev/pci/drm/amd/display/dc/core/dc_link_enc_cfg.c
29
#define DC_LOGGER dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/core/dc_link_enc_cfg.c
388
eng_id = find_first_avail_link_enc(stream->ctx, state, eng_id_req);
sys/dev/pci/drm/amd/display/dc/core/dc_link_enc_cfg.c
40
for (i = 0; i < stream->ctx->dc->res_pool->res_cap->num_dig_link_enc; i++) {
sys/dev/pci/drm/amd/display/dc/core/dc_link_enc_cfg.c
41
link_enc = stream->ctx->dc->res_pool->link_encoders[i];
sys/dev/pci/drm/amd/display/dc/core/dc_link_enc_cfg.c
560
link_enc = link_enc_cfg_get_link_enc_used_by_link(link->ctx->dc, link);
sys/dev/pci/drm/amd/display/dc/core/dc_link_enc_cfg.c
563
link->ctx->dc);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
1451
DC_LOGGER_INIT(pipe_ctx->stream->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
1478
if ((pipe_ctx->stream->ctx->dc->config.use_spl) && (!pipe_ctx->stream->ctx->dc->debug.disable_spl)) {
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
1482
if (plane_state->ctx->dce_version > DCE_VERSION_MAX)
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
1524
if (plane_state->ctx->dce_version > DCE_VERSION_MAX)
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
1971
struct dc *dc = otg_master->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
1974
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
2308
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
2360
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
2414
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
2843
struct dc *dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
2867
if (stream->ctx->dc->link_srv->dp_is_128b_132b_signal(otg_master)) {
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
2876
if (stream->ctx->dc->config.unify_link_enc_assignment)
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
2892
stream->ctx->dc, context, stream);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
343
if (dc->ctx->dc_bios->fw_info_valid) {
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
345
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
3748
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
3750
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
3867
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
406
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
4091
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
413
create_funcs->read_dce_straps(dc->ctx, &straps);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
426
struct audio *aud = create_funcs->create_audio(ctx, i);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
444
pool->stream_enc[i] = create_funcs->create_stream_encoder(i, ctx);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
454
pool->hpo_dp_stream_enc[i] = create_funcs->create_hpo_dp_stream_encoder(i+ENGINE_ID_HPO_DP_0, ctx);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
465
pool->hpo_dp_link_enc[i] = create_funcs->create_hpo_dp_link_encoder(i, ctx);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
4803
if (pipe_ctx->stream->ctx->dc->res_pool->funcs->get_vstartup_for_pipe)
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
4804
vstartup_start = pipe_ctx->stream->ctx->dc->res_pool->funcs->get_vstartup_for_pipe(pipe_ctx);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
488
ctx, ctx->dc_bios);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
4921
if (pipe_ctx_old->stream->ctx->dc->config.unify_link_enc_assignment) {
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
4924
} else if (pipe_ctx_old->stream->ctx->dc->res_pool->funcs->link_encs_assign) {
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
4926
struct dc *dc = pipe_ctx_old->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
496
dc->hwseq = create_funcs->create_hwseq(ctx);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
5339
if (dc->ctx->dce_version == DCN_VERSION_3_1 &&
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
5340
dc->ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0) {
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
5537
if (context->clk_mgr->ctx->dc->res_pool->funcs->program_mcache_pipe_config)
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
5538
context->clk_mgr->ctx->dc->res_pool->funcs->program_mcache_pipe_config(context, mcache_params);
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
567
if (stream1->ctx->dc->config.vblank_alignment_dto_params &&
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
568
stream1->ctx->dc->config.vblank_alignment_max_frame_time_diff > 0 &&
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
594
if (diff < stream1->ctx->dc->config.vblank_alignment_max_frame_time_diff)
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
647
if (stream1->ctx->dc->caps.disable_dp_clk_share)
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
938
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
96
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/core/dc_sink.c
44
sink->ctx = link->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc_sink.c
48
sink->sink_id = init_params->link->ctx->dc_sink_id_count;
sys/dev/pci/drm/amd/display/dc/core/dc_sink.c
51
init_params->link->ctx->dc_sink_id_count++;
sys/dev/pci/drm/amd/display/dc/core/dc_stat.c
55
struct dmub_srv *dmub = dc->ctx->dmub_srv->dmub;
sys/dev/pci/drm/amd/display/dc/core/dc_stat.c
85
struct dmub_srv *dmub = dc->ctx->dmub_srv->dmub;
sys/dev/pci/drm/amd/display/dc/core/dc_state.c
380
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_state.c
43
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/core/dc_state.c
716
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_state.c
739
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_state.c
755
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_state.c
774
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
140
stream->stream_id = stream->ctx->dc_stream_id_count;
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
141
stream->ctx->dc_stream_id_count++;
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
204
if (new_stream->ctx->dc->res_pool->funcs->link_encs_assign &&
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
205
!new_stream->ctx->dc->config.unify_link_enc_assignment)
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
223
struct dc *dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
254
if (dc->ctx->dmub_srv)
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
293
dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
322
if (dc_stream_check_cursor_attributes(stream, stream->ctx->dc->current_state, attributes)) {
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
340
dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
37
#define DC_LOGGER dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
391
if (dc->ctx->dmub_srv)
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
431
dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
56
if (stream->ctx->dc->caps.dual_link_dvi &&
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
645
struct dc *dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
676
dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
711
if (!stream->ctx)
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
714
dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
73
stream->ctx = dc_sink_data->ctx;
sys/dev/pci/drm/amd/display/dc/core/dc_stream.c
819
struct pipe_ctx *pipe = &stream->ctx->dc->current_state->res_ctx.pipe_ctx[i];
sys/dev/pci/drm/amd/display/dc/core/dc_surface.c
120
!plane_state->ctx ||
sys/dev/pci/drm/amd/display/dc/core/dc_surface.c
121
!plane_state->ctx->dc) {
sys/dev/pci/drm/amd/display/dc/core/dc_surface.c
127
dc = plane_state->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_surface.c
284
dc = plane_state->ctx->dc;
sys/dev/pci/drm/amd/display/dc/core/dc_surface.c
40
void dc_plane_construct(struct dc_context *ctx, struct dc_plane_state *plane_state)
sys/dev/pci/drm/amd/display/dc/core/dc_surface.c
42
plane_state->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/core/dc_surface.c
73
for (i = 0; i < plane_state->ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/core/dc_surface.c
95
dc_plane_construct(dc->ctx, plane_state);
sys/dev/pci/drm/amd/display/dc/dc.h
1470
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dc.h
1633
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dc.h
1709
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dc.h
2577
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dc.h
728
dm_get_timestamp(dc->ctx) : 0
sys/dev/pci/drm/amd/display/dc/dc.h
737
voltage_level_tick = dm_get_timestamp(dc->ctx); \
sys/dev/pci/drm/amd/display/dc/dc.h
743
voltage_level_tick = dm_get_timestamp(dc->ctx)
sys/dev/pci/drm/amd/display/dc/dc.h
747
watermark_tick = dm_get_timestamp(dc->ctx)
sys/dev/pci/drm/amd/display/dc/dc.h
751
end_tick = dm_get_timestamp(dc->ctx); \
sys/dev/pci/drm/amd/display/dc/dc_bios_types.h
180
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dc_ddc_types.h
141
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dc_ddc_types.h
190
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
101
struct dc_context *dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1017
pipe_ctx->stream->ctx->dce_version >= DCN_VERSION_3_1)
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1033
if (!dc_get_edp_link_panel_inst(hubp->ctx->dc,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1137
dc_wake_and_execute_dmub_cmd_list(pCtx->stream->ctx, 2, cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
114
struct dc_context *dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1150
struct dc_dmub_srv *dc_dmub_srv = dc->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1157
if (!dc_wake_and_execute_gpint(dc->ctx, DMUB_GPINT__SET_TRACE_BUFFER_MASK_WORD1,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1163
if (!dc_wake_and_execute_gpint(dc->ctx, DMUB_GPINT__UPDATE_TRACE_BUFFER_MASK,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1185
if (dc_dmub_srv->ctx->dc->debug.dmcub_emulation)
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1188
dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1191
if (dc_dmub_srv->ctx->dc->debug.disable_timeout) {
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1231
if (!dc->ctx->dmub_srv || !dc->ctx->dmub_srv->dmub)
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1234
dc_dmub_srv = dc->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1260
dc_dmub_srv_wait_for_idle(dc->ctx->dmub_srv, DM_DMUB_WAIT_TYPE_WAIT, NULL);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
128
struct dc_context *dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1337
dm_execute_dmub_cmd(dc->ctx, &cmd, allow_idle ? DM_DMUB_WAIT_TYPE_NO_WAIT : DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1352
if (!dc->ctx->dmub_srv || !dc->ctx->dmub_srv->dmub)
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1355
dc_dmub_srv = dc->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1439
if (!dc_dmub_srv_is_hw_pwr_up(dc->ctx->dmub_srv, true))
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1447
dmub_srv_sync_inboxes(dc->ctx->dmub_srv->dmub);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1470
if (!dc_dmub_srv_is_hw_pwr_up(dc->ctx->dmub_srv, true))
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
150
dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1519
dc_wake_and_execute_dmub_cmd(dc_dmub_srv->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1538
dc_dmub_srv_apply_idle_power_optimizations(dc_dmub_srv->ctx->dc, false);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1546
!dc_dmub_srv->ctx->dc->debug.disable_dmub_reallow_idle)
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1547
dc_dmub_srv_apply_idle_power_optimizations(dc_dmub_srv->ctx->dc, true);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1554
struct dc_dmub_srv *dc_dmub_srv = dc->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
157
} while (dc_dmub_srv->ctx->dc->debug.disable_timeout && status != DMUB_STATUS_OK);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1602
bool dc_wake_and_execute_dmub_cmd(const struct dc_context *ctx, union dmub_rb_cmd *cmd,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1605
return dc_wake_and_execute_dmub_cmd_list(ctx, 1, cmd, wait_type);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1608
bool dc_wake_and_execute_dmub_cmd_list(const struct dc_context *ctx, unsigned int count,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1611
struct dc_dmub_srv *dc_dmub_srv = ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1621
dc_dmub_srv_apply_idle_power_optimizations(ctx->dc, false);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1630
result = dm_execute_dmub_cmd_list(ctx, count, cmd, wait_type);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1632
result = dm_execute_dmub_cmd(ctx, cmd, wait_type);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1635
!ctx->dc->debug.disable_dmub_reallow_idle)
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1636
dc_dmub_srv_apply_idle_power_optimizations(ctx->dc, true);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1641
static bool dc_dmub_execute_gpint(const struct dc_context *ctx, enum dmub_gpint_command command_code,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1644
struct dc_dmub_srv *dc_dmub_srv = ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1668
bool dc_wake_and_execute_gpint(const struct dc_context *ctx, enum dmub_gpint_command command_code,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1671
struct dc_dmub_srv *dc_dmub_srv = ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1678
dc_dmub_srv_apply_idle_power_optimizations(ctx->dc, false);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1682
result = dc_dmub_execute_gpint(ctx, command_code, param, response, wait_type);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1685
!ctx->dc->debug.disable_dmub_reallow_idle)
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1686
dc_dmub_srv_apply_idle_power_optimizations(ctx->dc, true);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1754
dm_execute_dmub_cmd_list(dc->ctx, num_cmds, cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1761
struct dmub_fams2_config_v2 *config = (struct dmub_fams2_config_v2 *)dc->ctx->dmub_srv->dmub->ib_mem_gart.cpu_addr;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1771
cmd.ib_fams2_config.ib_data.src.quad_part = dc->ctx->dmub_srv->dmub->ib_mem_gart.gpu_addr;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1801
dm_execute_dmub_cmd_list(dc->ctx, 1, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1836
dm_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
192
dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1935
dm_execute_dmub_cmd_list(dc->ctx, num_cmds, cmds, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1940
bool dc_dmub_srv_ips_residency_cntl(const struct dc_context *ctx, uint8_t panel_inst, bool start_measurement)
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1954
if (!dc_wake_and_execute_dmub_cmd(ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY))
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1960
bool dc_dmub_srv_ips_query_residency_info(const struct dc_context *ctx, uint8_t panel_inst, struct dmub_ips_residency_info *driver_info,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1966
dmub_flush_buffer_mem(&ctx->dmub_srv->dmub->scratch_mem_fb);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1973
cmd.ips_query_residency_info.info_data.dest.quad_part = ctx->dmub_srv->dmub->scratch_mem_fb.gpu_addr;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1978
if (!dc_wake_and_execute_dmub_cmd(ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY) ||
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1983
memcpy(driver_info, ctx->dmub_srv->dmub->scratch_mem_fb.cpu_addr, bytes);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
1990
struct dc_context *dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
2020
struct dc_context *dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
2051
struct dc_context *dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
2095
struct dc_context *dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
212
} while (dc_dmub_srv->ctx->dc->debug.disable_timeout && status != DMUB_STATUS_OK);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
2149
struct dc_context *dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
2183
struct dc_context *dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
2211
struct dc_context *dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
2236
struct dc_dmub_srv *dc_dmub_srv = dc->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
2249
dm_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
275
} while (dc_dmub_srv->ctx->dc->debug.disable_timeout && status != DMUB_STATUS_OK);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
283
dmub->debug.timeout_info.timestamp = dm_get_timestamp(dc_dmub_srv->ctx);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
322
dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
339
return dc_wake_and_execute_gpint(dc_dmub_srv->ctx, DMUB_GPINT__IDLE_OPT_NOTIFY_STREAM_MASK,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
354
dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
367
struct dmub_srv *dmub = dc->ctx->dmub_srv->dmub;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
373
dm_helpers_dmub_outbox_interrupt_control(dc->ctx, enable);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
389
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
40
#define CTX dc_dmub_srv->ctx
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
403
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
48
dc_srv->ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
502
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
511
if (dc_dmub_srv->ctx->dc->debug.dmcub_emulation)
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
523
if (dc_wake_and_execute_dmub_cmd(dc_dmub_srv->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY) &&
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
550
if (dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY) &&
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
552
memcpy(&dc->ctx->dmub_srv->dmub->visual_confirm_color,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
83
dc_ctx = dc_dmub_srv->ctx;
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
88
} while (dc_dmub_srv->ctx->dc->debug.disable_timeout && status != DMUB_STATUS_OK);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.c
941
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.h
158
bool dc_wake_and_execute_dmub_cmd(const struct dc_context *ctx, union dmub_rb_cmd *cmd,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.h
181
bool dc_wake_and_execute_dmub_cmd_list(const struct dc_context *ctx, unsigned int count,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.h
193
bool dc_wake_and_execute_gpint(const struct dc_context *ctx, enum dmub_gpint_command command_code,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.h
322
bool dc_dmub_srv_ips_residency_cntl(const struct dc_context *ctx, uint8_t panel_inst, bool start_measurement);
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.h
324
bool dc_dmub_srv_ips_query_residency_info(const struct dc_context *ctx, uint8_t panel_inst,
sys/dev/pci/drm/amd/display/dc/dc_dmub_srv.h
52
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dc_dsc.h
44
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dc_fused_io.c
87
if (!dm_helpers_execute_fused_io(link->ctx, link, commands, count, timeout_us))
sys/dev/pci/drm/amd/display/dc/dc_helper.c
131
const struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dc_helper.c
133
submit_dmub_read_modify_write(offload, ctx);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
138
const struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dc_helper.c
140
submit_dmub_burst_write(offload, ctx);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
143
static bool dmub_reg_value_burst_set_pack(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
146
struct dc_reg_helper_state *offload = &ctx->dmub_srv->reg_helper_offload;
sys/dev/pci/drm/amd/display/dc/dc_helper.c
151
dmub_flush_burst_write_buffer_execute(offload, ctx);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
155
dmub_flush_burst_write_buffer_execute(offload, ctx);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
168
static uint32_t dmub_reg_value_pack(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
171
struct dc_reg_helper_state *offload = &ctx->dmub_srv->reg_helper_offload;
sys/dev/pci/drm/amd/display/dc/dc_helper.c
178
dmub_flush_buffer_execute(offload, ctx);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
181
if (dmub_reg_value_burst_set_pack(ctx, addr, field_value_mask->value))
sys/dev/pci/drm/amd/display/dc/dc_helper.c
207
static void dmub_reg_wait_done_pack(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
210
struct dc_reg_helper_state *offload = &ctx->dmub_srv->reg_helper_offload;
sys/dev/pci/drm/amd/display/dc/dc_helper.c
221
uint32_t generic_reg_update_ex(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
237
if (ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/dc_helper.c
238
ctx->dmub_srv->reg_helper_offload.gather_in_progress)
sys/dev/pci/drm/amd/display/dc/dc_helper.c
239
return dmub_reg_value_pack(ctx, addr, &field_value_mask);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
243
reg_val = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
245
dm_write_reg(ctx, addr, reg_val);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
249
uint32_t generic_reg_set_ex(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
267
if (ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/dc_helper.c
268
ctx->dmub_srv->reg_helper_offload.gather_in_progress) {
sys/dev/pci/drm/amd/display/dc/dc_helper.c
269
return dmub_reg_value_burst_set_pack(ctx, addr, reg_val);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
273
dm_write_reg(ctx, addr, reg_val);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
277
uint32_t generic_reg_get(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
280
uint32_t reg_val = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
285
uint32_t generic_reg_get2(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
289
uint32_t reg_val = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
295
uint32_t generic_reg_get3(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
300
uint32_t reg_val = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
307
uint32_t generic_reg_get4(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
313
uint32_t reg_val = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
321
uint32_t generic_reg_get5(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
328
uint32_t reg_val = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
337
uint32_t generic_reg_get6(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
345
uint32_t reg_val = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
355
uint32_t generic_reg_get7(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
364
uint32_t reg_val = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
375
uint32_t generic_reg_get8(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
385
uint32_t reg_val = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
40
ctx->logger
sys/dev/pci/drm/amd/display/dc/dc_helper.c
427
void generic_reg_wait(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
436
if (ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/dc_helper.c
437
ctx->dmub_srv->reg_helper_offload.gather_in_progress) {
sys/dev/pci/drm/amd/display/dc/dc_helper.c
438
dmub_reg_wait_done_pack(ctx, addr, mask, shift, condition_value,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
44
const struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dc_helper.c
459
reg_val = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
479
void generic_write_indirect_reg(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
483
dm_write_reg(ctx, addr_index, index);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
484
dm_write_reg(ctx, addr_data, data);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
487
uint32_t generic_read_indirect_reg(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
494
if (ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/dc_helper.c
495
ctx->dmub_srv->reg_helper_offload.gather_in_progress) {
sys/dev/pci/drm/amd/display/dc/dc_helper.c
499
dm_write_reg(ctx, addr_index, index);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
500
value = dm_read_reg(ctx, addr_data);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
505
uint32_t generic_indirect_reg_get(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
519
value = generic_read_indirect_reg(ctx, addr_index, addr_data, index);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
53
dc_wake_and_execute_dmub_cmd(ctx, &offload->cmd_data, DM_DMUB_WAIT_TYPE_NO_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
536
uint32_t generic_indirect_reg_update_ex(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
560
generic_write_indirect_reg(ctx, addr_index, addr_data, index, reg_val);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
567
uint32_t generic_indirect_reg_update_ex_sync(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
590
dm_write_index_reg(ctx, CGS_IND_REG__PCIE, index, reg_val);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
596
uint32_t generic_indirect_reg_get_sync(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dc_helper.c
609
value = dm_read_index_reg(ctx, CGS_IND_REG__PCIE, index);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
626
void reg_sequence_start_gather(const struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dc_helper.c
63
const struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dc_helper.c
633
if (ctx->dmub_srv && ctx->dc->debug.dmub_offload_enabled) {
sys/dev/pci/drm/amd/display/dc/dc_helper.c
635
&ctx->dmub_srv->reg_helper_offload;
sys/dev/pci/drm/amd/display/dc/dc_helper.c
644
void reg_sequence_start_execute(const struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dc_helper.c
648
if (!ctx->dmub_srv)
sys/dev/pci/drm/amd/display/dc/dc_helper.c
651
offload = &ctx->dmub_srv->reg_helper_offload;
sys/dev/pci/drm/amd/display/dc/dc_helper.c
658
submit_dmub_read_modify_write(offload, ctx);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
661
submit_dmub_reg_wait(offload, ctx);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
664
submit_dmub_burst_write(offload, ctx);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
672
void reg_sequence_wait_done(const struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dc_helper.c
677
if (!ctx->dmub_srv)
sys/dev/pci/drm/amd/display/dc/dc_helper.c
680
offload = &ctx->dmub_srv->reg_helper_offload;
sys/dev/pci/drm/amd/display/dc/dc_helper.c
683
ctx->dc->debug.dmub_offload_enabled &&
sys/dev/pci/drm/amd/display/dc/dc_helper.c
684
!ctx->dc->debug.dmcub_emulation) {
sys/dev/pci/drm/amd/display/dc/dc_helper.c
685
dc_dmub_srv_wait_for_idle(ctx->dmub_srv, DM_DMUB_WAIT_TYPE_WAIT, NULL);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
70
dc_wake_and_execute_dmub_cmd(ctx, &offload->cmd_data, DM_DMUB_WAIT_TYPE_NO_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_helper.c
79
const struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dc_helper.c
83
dc_wake_and_execute_dmub_cmd(ctx, &offload->cmd_data, DM_DMUB_WAIT_TYPE_NO_WAIT);
sys/dev/pci/drm/amd/display/dc/dc_hw_types.h
548
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dc_plane_priv.h
31
void dc_plane_construct(struct dc_context *ctx, struct dc_plane_state *plane_state);
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
136
pipe_ctx->stream->ctx->dc->debug.max_downscale_src_width;
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
137
spl_in->basic_out.always_scale = pipe_ctx->stream->ctx->dc->debug.always_scale;
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
144
spl_in->prefer_easf = pipe_ctx->stream->ctx->dc->config.prefer_easf;
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
146
if (pipe_ctx->stream->ctx->dc->debug.force_easf == 1)
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
148
else if (pipe_ctx->stream->ctx->dc->debug.force_easf == 2)
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
151
unsigned int sharpness_setting = pipe_ctx->stream->ctx->dc->debug.force_sharpness;
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
152
unsigned int force_sharpness_level = pipe_ctx->stream->ctx->dc->debug.force_sharpness_level;
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
184
if (pipe_ctx->stream->ctx->dc->debug.force_lls > 0)
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
185
spl_in->lls_pref = pipe_ctx->stream->ctx->dc->debug.force_lls;
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
189
if (pipe_ctx->stream->ctx->dc->debug.force_cositing)
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
190
spl_in->basic_in.cositing = pipe_ctx->stream->ctx->dc->debug.force_cositing - 1;
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
202
(enum scale_to_sharpness_policy)pipe_ctx->stream->ctx->dc->debug.scale_to_sharpness_policy;
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
208
spl_in->is_hdr_on = dm_helpers_is_hdr_on(pipe_ctx->stream->ctx, pipe_ctx->stream);
sys/dev/pci/drm/amd/display/dc/dc_spl_translate.c
84
switch (plane_state->ctx->dce_version) {
sys/dev/pci/drm/amd/display/dc/dc_stream.h
260
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.c
146
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.c
160
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.c
43
dccg_dcn->base.ctx
sys/dev/pci/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.c
45
dccg->ctx->logger
sys/dev/pci/drm/amd/display/dc/dccg/dcn20/dcn20_dccg.h
457
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn201/dcn201_dccg.c
42
dccg_dcn->base.ctx
sys/dev/pci/drm/amd/display/dc/dccg/dcn201/dcn201_dccg.c
45
dccg->ctx->logger
sys/dev/pci/drm/amd/display/dc/dccg/dcn201/dcn201_dccg.c
63
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn201/dcn201_dccg.c
77
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn201/dcn201_dccg.h
32
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn21/dcn21_dccg.c
110
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn21/dcn21_dccg.c
124
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn21/dcn21_dccg.c
42
dccg_dcn->base.ctx
sys/dev/pci/drm/amd/display/dc/dccg/dcn21/dcn21_dccg.c
44
dccg->ctx->logger
sys/dev/pci/drm/amd/display/dc/dccg/dcn21/dcn21_dccg.h
30
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c
41
dccg_dcn->base.ctx
sys/dev/pci/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c
43
dccg->ctx->logger
sys/dev/pci/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c
56
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c
70
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c
81
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.c
95
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.h
55
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn30/dcn30_dccg.h
61
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.c
41
dccg_dcn->base.ctx
sys/dev/pci/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.c
43
dccg->ctx->logger
sys/dev/pci/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.c
55
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.c
69
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn301/dcn301_dccg.h
54
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
123
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
133
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
185
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
194
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
203
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
212
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
238
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
247
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
256
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
265
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
334
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
358
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.dsc)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
402
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.dsc)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
42
dccg_dcn->base.ctx
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
44
dccg->ctx->logger
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
457
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
464
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
474
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
481
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
491
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
498
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
508
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
515
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
525
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
532
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
678
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
685
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
733
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
747
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
87
if (dccg_dcn->base.ctx->asic_id.chip_family == FAMILY_YELLOW_CARP &&
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.c
88
dccg_dcn->base.ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn31/dcn31_dccg.h
163
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c
299
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le)
sys/dev/pci/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c
303
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c
308
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c
384
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c
398
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c
44
dccg_dcn->base.ctx
sys/dev/pci/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.c
46
dccg->ctx->logger
sys/dev/pci/drm/amd/display/dc/dccg/dcn314/dcn314_dccg.h
201
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c
353
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c
367
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c
41
dccg_dcn->base.ctx
sys/dev/pci/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.c
43
dccg->ctx->logger
sys/dev/pci/drm/amd/display/dc/dccg/dcn32/dcn32_dccg.h
120
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1188
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.dpp && !disallow_rcg)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
141
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.dsc && allow_rcg)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1460
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1466
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1472
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1478
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1499
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1505
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1511
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1517
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1539
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1704
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1715
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1726
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1737
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
174
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se && enable)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1766
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1779
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1859
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dsc)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1867
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dsc)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1875
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dsc)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1883
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dsc)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1902
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1908
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1914
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1920
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1926
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1936
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1943
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1950
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1957
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
1964
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
213
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le && enable)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
240
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk && enable)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
2444
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
2462
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
277
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.symclk_fe && enable)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
326
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.symclk_fe && enable)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
371
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.dpp && enable)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
397
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.dpp && allow_rcg)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
41
dccg_dcn->base.ctx
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
430
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream && enable)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
44
dccg->ctx->logger
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.c
467
if (!dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se && enable)
sys/dev/pci/drm/amd/display/dc/dccg/dcn35/dcn35_dccg.h
236
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
282
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
289
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
299
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
306
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
316
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
323
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
333
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
340
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
391
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
400
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
409
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
418
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
444
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
453
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
462
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
471
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
489
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
498
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
507
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
51
dccg_dcn->base.ctx
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
516
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
528
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
53
dccg->ctx->logger
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
542
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
550
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
558
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
566
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
708
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_le) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
715
if (dccg->ctx->dc->debug.root_clock_optimization.bits.dpstream) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
722
if (dccg->ctx->dc->debug.root_clock_optimization.bits.physymclk) {
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
810
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
817
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
824
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
831
if (dccg->ctx->dc->debug.root_clock_optimization.bits.symclk32_se)
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
892
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.c
906
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dccg/dcn401/dcn401_dccg.h
238
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_abm.c
264
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_abm.c
271
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_abm.c
281
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_abm.c
293
dce_abm_construct(abm_dce, ctx, regs, abm_shift, abm_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_abm.c
48
abm->ctx->logger
sys/dev/pci/drm/amd/display/dc/dce/dce_abm.c
50
abm_dce->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_abm.h
385
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_audio.c
1326
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_audio.c
1340
audio->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_audio.c
1352
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_audio.c
1366
audio->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_audio.c
35
aud->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_audio.h
148
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_audio.h
156
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.c
35
aux110->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.c
40
engine->ctx->logger
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.c
443
struct dce_aux *aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en];
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.c
508
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.c
517
aux_engine110->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.c
577
aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en];
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.c
623
struct dce_aux *aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en];
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.c
632
return dm_helper_dmub_aux_transfer_sync(ddc->ctx, ddc->link, payload, operation_result);
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.c
716
aux_engine = ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en];
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.c
744
if (ddc->ctx->dc->debug.enable_dmub_aux_for_legacy_ddc
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.h
244
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.h
283
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_aux.h
288
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
252
struct dc_bios *bp = clk_mgr->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
254
struct dmcu *dmcu = clk_mgr_dce->base.ctx->dc->res_pool->dmcu;
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
292
struct dc_bios *bp = clk_mgr->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
293
struct dc *core_dc = clk_mgr->ctx->dc;
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
321
if (!((clk_mgr->ctx->asic_id.chip_family == FAMILY_AI) &&
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
322
ASICREV_IS_VEGA20_P(clk_mgr->ctx->asic_id.hw_internal_rev)))
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
331
if (!IS_FPGA_MAXIMUS_DC(core_dc->ctx->dce_environment)) {
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
345
struct dc_debug_options *debug = &clk_mgr_dce->base.ctx->dc->debug;
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
346
struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
403
struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
453
if (clk_mgr_dce->base.ctx->dc->debug.ignore_dpref_ss)
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
46
clk_mgr_dce->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
473
struct dc_bios *bp = clk_mgr_dce->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
48
clk_mgr->ctx->logger
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
609
dm_pp_apply_display_requirements(dc->ctx, pp_display_cfg);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
669
dm_pp_apply_display_requirements(dc->ctx, pp_display_cfg);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
688
if (dm_pp_apply_power_level_change_request(clk_mgr->ctx, &level_change_req))
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
696
dce_pplib_apply_display_requirements(clk_mgr->ctx->dc, context);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
715
if (dm_pp_apply_power_level_change_request(clk_mgr->ctx, &level_change_req))
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
723
dce11_pplib_apply_display_requirements(clk_mgr->ctx->dc, context);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
742
if (dm_pp_apply_power_level_change_request(clk_mgr->ctx, &level_change_req))
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
750
dce11_pplib_apply_display_requirements(clk_mgr->ctx->dc, context);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
778
dm_pp_apply_clock_for_voltage_request(clk_mgr->ctx, &clock_voltage_req);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
786
dm_pp_apply_clock_for_voltage_request(clk_mgr->ctx, &clock_voltage_req);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
788
dce11_pplib_apply_display_requirements(clk_mgr->ctx->dc, context);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
813
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
821
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
835
if (dm_pp_get_static_clocks(ctx, &static_clk_info))
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
846
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
863
clk_mgr_dce, ctx, regs, clk_shift, clk_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
869
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
886
clk_mgr_dce, ctx, regs, clk_shift, clk_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
894
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
911
clk_mgr_dce, ctx, regs, clk_shift, clk_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
918
struct clk_mgr *dce120_clk_mgr_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
932
clk_mgr_dce, ctx, NULL, NULL, NULL);
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
940
struct clk_mgr *dce121_clk_mgr_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce/dce_clk_mgr.c
953
dce_clk_mgr_construct(clk_mgr_dce, ctx, NULL, NULL, NULL);
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1088
dtbclk_p_src_clk_khz = clock_source->ctx->dc->clk_mgr->dprefclk_khz;
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1104
clock_source->ctx->dc->res_pool->dccg->funcs->set_dp_dto(
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1105
clock_source->ctx->dc->res_pool->dccg,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1113
clock_source->ctx->dc->res_pool->dccg->funcs->set_dp_dto(
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1114
clock_source->ctx->dc->res_pool->dccg,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1200
unsigned int dp_dto_ref_khz = clock_source->ctx->dc->clk_mgr->dprefclk_khz;
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1205
if (clock_source->ctx->dc->hwss.enable_vblanks_synchronization &&
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1206
clock_source->ctx->dc->config.vblank_alignment_max_frame_time_diff > 0) {
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1292
if (clock_source->ctx->dc->hwss.enable_vblanks_synchronization &&
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1293
clock_source->ctx->dc->config.vblank_alignment_max_frame_time_diff > 0) {
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1299
clock_source->ctx->dc->clk_mgr->dprefclk_khz*1000);
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1335
unsigned int dp_dto_ref_khz = clock_source->ctx->dc->clk_mgr->dprefclk_khz;
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1606
calc_pll_cs->ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1670
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1680
clk_src->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1713
calc_pll_cs_init_data.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1732
calc_pll_cs_init_data_hdmi.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1770
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1777
clk_src->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1798
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1805
bool ret = dce112_clk_src_construct(clk_src, ctx, bios, id, regs, cs_shift, cs_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1814
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1821
bool ret = dce112_clk_src_construct(clk_src, ctx, bios, id, regs, cs_shift, cs_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1830
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1837
bool ret = dce112_clk_src_construct(clk_src, ctx, bios, id, regs, cs_shift, cs_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1846
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1853
bool ret = dce112_clk_src_construct(clk_src, ctx, bios, id, regs, cs_shift, cs_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1861
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
1868
bool ret = dce112_clk_src_construct(clk_src, ctx, bios, id, regs, cs_shift, cs_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
45
clk_src->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
48
calc_pll_cs->ctx->logger
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
859
clock_source->ctx->dce_version <= DCE_VERSION_11_0)
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
933
clock_source->ctx->dce_version <= DCE_VERSION_11_0)
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
973
unsigned int dp_dto_ref_khz = clock_source->ctx->dc->clk_mgr->dprefclk_khz;
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
980
if (clock_source->ctx->dc->clk_mgr->dp_dto_source_clock_in_khz != 0 &&
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c
983
dp_dto_ref_khz = clock_source->ctx->dc->clk_mgr->dp_dto_source_clock_in_khz;
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.h
258
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.h
267
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.h
276
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.h
285
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.h
294
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.h
303
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.h
312
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1001
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG1),
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1070
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1077
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1088
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1095
dce_dmcu_construct(dmcu_dce, ctx, regs, dmcu_shift, dmcu_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1097
psp_version = dm_read_reg(ctx, mmMP0_SMN_C2PMSG_58);
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1103
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1116
dmcu_dce, ctx, regs, dmcu_shift, dmcu_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1124
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1137
dmcu_dce, ctx, regs, dmcu_shift, dmcu_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1145
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1158
dmcu_dce, ctx, regs, dmcu_shift, dmcu_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1166
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
1179
dmcu_dce, ctx, regs, dmcu_shift, dmcu_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
250
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG1),
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
262
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG2),
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
267
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG3),
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
315
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG1), masterCmdData1.u32);
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
382
const struct dc_config *config = &dmcu->ctx->dc->config;
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
384
struct dc_context *ctx = dmcu->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
398
for (i = 0; i < ctx->dc->link_count; i++) {
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
399
if (ctx->dc->links[i]->link_enc->features.flags.bits.DP_IS_USB_C) {
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
400
if (ctx->dc->links[i]->link_enc->transmitter >= TRANSMITTER_UNIPHY_A &&
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
401
ctx->dc->links[i]->link_enc->transmitter <= TRANSMITTER_UNIPHY_F) {
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
402
tx_interrupt_mask |= 1 << ctx->dc->links[i]->link_enc->transmitter;
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
45
dmcu_dce->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
689
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG1),
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
701
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG2),
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
706
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG3),
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
741
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG1), masterCmdData1.u32);
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
963
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG1),
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
966
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG2),
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.c
969
dm_write_reg(dmcu->ctx, REG(MASTER_COMM_DATA_REG3),
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.h
306
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.h
312
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.h
318
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_dmcu.h
324
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c.c
34
struct dc *dc = ddc->ctx->dc;
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c.c
35
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c.c
39
if (!dc->ctx->dc_bios->fw_info.oem_i2c_present)
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c.c
42
id.id = dc->ctx->dc_bios->fw_info.oem_i2c_obj_id;
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c.c
77
dce_i2c_sw.ctx = ddc->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
32
dce_i2c_hw->ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
327
if (dce_i2c_hw->ctx->dc->debug.enable_mem_low_power.bits.i2c) {
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
342
set_speed(dce_i2c_hw, dce_i2c_hw->ctx->dc->caps.i2c_speed_in_khz);
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
431
set_speed(dce_i2c_hw, dce_i2c_hw->ctx->dc->caps.i2c_speed_in_khz_hdcp);
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
436
if (dce_i2c_hw->ctx->dc->debug.enable_mem_low_power.bits.i2c) {
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
667
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
673
dce_i2c_hw->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
675
dce_i2c_hw->reference_frequency = (ctx->dc_bios->fw_info.pll_info.crystal_frequency) >> 1;
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
690
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
697
ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
707
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
714
ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
724
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
731
ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
741
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
748
ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.c
754
if (ctx->dc->debug.scl_reset_length10)
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.h
298
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.h
307
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.h
315
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.h
323
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.h
331
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_hw.h
339
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
115
if (!wait_for_scl_high_sw(ctx, ddc_handle, clock_delay_div_4))
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
136
if (!wait_for_scl_high_sw(ctx, ddc_handle, clock_delay_div_4))
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
153
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
170
if (!wait_for_scl_high_sw(ctx, ddc_handle, clock_delay_div_4))
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
199
if (!wait_for_scl_high_sw(ctx, ddc_handle, clock_delay_div_4))
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
213
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
233
if (!wait_for_scl_high_sw(ctx, ddc_handle, clock_delay_div_4))
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
250
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
259
if (!write_byte_sw(ctx, ddc_handle, clock_delay_div_4, address))
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
263
if (!write_byte_sw(ctx, ddc_handle, clock_delay_div_4, data[i]))
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
272
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
281
if (!write_byte_sw(ctx, ddc_handle, clock_delay_div_4, address))
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
285
if (!read_byte_sw(ctx, ddc_handle, clock_delay_div_4, data + i,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
297
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
323
if (!wait_for_scl_high_sw(ctx, ddc_handle, clock_delay_div_4))
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
34
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
36
dce_i2c_sw->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
404
bool result = start_sync_sw(engine->ctx, ddc, clock_delay_div_4);
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
412
result = i2c_write_sw(engine->ctx, ddc, clock_delay_div_4,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
417
result = i2c_read_sw(engine->ctx, ddc, clock_delay_div_4,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
431
if (!stop_sync_sw(engine->ctx, ddc, clock_delay_div_4))
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
75
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.c
96
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.h
37
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_i2c_sw.h
44
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dce/dce_ipp.c
273
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_ipp.c
279
ipp_dce->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_ipp.c
291
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_ipp.c
297
ipp_dce->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_ipp.c
38
ipp_dce->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_ipp.h
270
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_ipp.h
278
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
127
struct dc_bios *bp = enc110->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
1644
struct dc_context *ctx = enc110->base.ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
1647
uint32_t value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
1658
struct dc_context *ctx = enc110->base.ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
1660
uint32_t value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
1718
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
1722
enc110->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
1797
result = bp_funcs->get_encoder_cap_info(enc110->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
1812
if (enc110->base.ctx->dc->debug.hdmi20_disable) {
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
299
struct dc_context *ctx = enc110->base.ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
302
if (ctx->dc->caps.psp_setup_panel_mode)
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
57
enc110->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
59
enc110->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
627
struct dc_context *ctx = enc110->base.ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
630
uint32_t value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
634
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
637
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
642
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
788
enc110->base.ctx->dc->debug.hdmi20_disable) &&
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
791
if (enc110->base.ctx->dc->debug.hdmi20_disable &&
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
816
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
820
enc110->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
895
result = bp_funcs->get_encoder_cap_info(enc110->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dce/dce_link_encoder.c
910
if (enc110->base.ctx->dc->debug.hdmi20_disable) {
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
1004
dce_mem_input_construct(dce_mi, ctx, inst, regs, mi_shift, mi_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
31
dce_mi->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
321
uint32_t stutter_en = mi->ctx->dc->debug.disable_stutter ? 0 : 1;
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
348
uint32_t stutter_en = mi->ctx->dc->debug.disable_stutter ? 0 : 1;
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
374
uint32_t stutter_en = mi->ctx->dc->debug.disable_stutter ? 0 : 1;
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
407
uint32_t stutter_en = mi->ctx->dc->debug.disable_stutter ? 0 : 1;
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
954
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
960
dce_mi->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
973
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
979
dce_mem_input_construct(dce_mi, ctx, inst, regs, mi_shift, mi_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
986
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
992
dce_mem_input_construct(dce_mi, ctx, inst, regs, mi_shift, mi_mask);
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.c
998
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.h
435
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.h
444
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.h
453
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_mem_input.h
461
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_opp.c
41
opp110->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_opp.c
725
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_opp.c
733
opp110->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_opp.c
744
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_opp.c
752
opp110->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_opp.h
315
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_opp.h
323
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_panel_cntl.c
291
dce_panel_cntl->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_panel_cntl.c
37
dce_panel_cntl->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_panel_cntl.c
40
dce_panel_cntl->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dce/dce_stream_encoder.c
1555
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_stream_encoder.c
1563
enc110->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_stream_encoder.c
32
enc110->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dce/dce_stream_encoder.c
60
enc110->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_stream_encoder.h
704
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_transform.c
1635
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_transform.c
1641
xfm_dce->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_transform.c
1664
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_transform.c
1670
xfm_dce->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dce_transform.c
188
if (xfm_dce->base.ctx->dc->debug.visual_confirm != VISUAL_CONFIRM_DISABLE) {
sys/dev/pci/drm/amd/display/dc/dce/dce_transform.c
40
xfm_dce->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dce_transform.c
42
xfm_dce->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dce/dce_transform.h
659
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dce_transform.h
667
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm.c
144
struct dc_context *dc = abm->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm.c
202
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm.c
209
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm.c
219
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm.c
224
if (ctx->dc->caps.dmcub_support) {
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm.c
232
dmub_abm_construct(abm_dce, ctx, regs, abm_shift, abm_mask);
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm.c
42
struct dc_context *dc = abm->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm.c
69
dc_allow_idle_optimizations(abm->ctx->dc, false);
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm.c
76
dc_allow_idle_optimizations(abm->ctx->dc, false);
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm.h
33
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm_lcd.c
116
dmub_abm_enable_fractional_pwm(abm->ctx);
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm_lcd.c
144
struct dc_context *dc = abm->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm_lcd.c
165
struct dc_context *dc = abm->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm_lcd.c
192
struct dc_context *dc = abm->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm_lcd.c
261
struct dc_context *dc = abm->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm_lcd.c
285
struct dc_context *dc = abm->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm_lcd.c
305
struct dc_context *dc = abm->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_abm_lcd.c
50
dce_abm->base.ctx
sys/dev/pci/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c
50
dc_wake_and_execute_dmub_cmd(dmub_srv->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c
67
if (!link->ctx->dmub_srv)
sys/dev/pci/drm/amd/display/dc/dce/dmub_outbox.c
51
dc_wake_and_execute_dmub_cmd(dmub_srv->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
115
if (dc_wake_and_execute_gpint(dmub->ctx, DMUB_GPINT__GET_PSR_STATE, panel_inst, &raw_state,
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
143
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
182
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
199
dc_wake_and_execute_dmub_cmd(dc->dmub_srv->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
234
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
258
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
276
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
298
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
302
struct resource_context *res_ctx = &link->ctx->dc->current_state->res_ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
357
copy_settings_data->use_phy_fsm = link->ctx->dc->debug.psr_power_use_phy_fsm;
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
438
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
462
dc_wake_and_execute_gpint(dmub->ctx, DMUB_GPINT__PSR_RESIDENCY, param, residency,
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
480
static void dmub_psr_construct(struct dmub_psr *psr, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
482
psr->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
489
struct dmub_psr *dmub_psr_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.c
498
dmub_psr_construct(psr, ctx);
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.h
35
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_psr.h
56
struct dmub_psr *dmub_psr_create(struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
100
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
121
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
125
struct resource_context *res_ctx = &link->ctx->dc->current_state->res_ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
219
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
271
if (dc_wake_and_execute_gpint(dmub->ctx, DMUB_GPINT__REPLAY_RESIDENCY, param,
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
289
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
30
if (!dc_wake_and_execute_gpint(dmub->ctx, DMUB_GPINT__GET_REPLAY_STATE, panel_inst,
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
315
struct dc_context *ctx = NULL;
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
320
ctx = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
321
if (ctx != NULL) {
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
410
dc_wake_and_execute_dmub_cmd(ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
427
static void dmub_replay_construct(struct dmub_replay *replay, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
429
replay->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
436
struct dmub_replay *dmub_replay_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
445
dmub_replay_construct(replay, ctx);
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.c
50
struct dc_context *dc = dmub->ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.h
14
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dce/dmub_replay.h
37
struct dmub_replay *dmub_replay_create(struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
103
value = dm_read_reg(compressor->ctx, DCP_REG(mmLB_SYNC_RESET_SEL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
106
dm_write_reg(compressor->ctx, DCP_REG(mmLB_SYNC_RESET_SEL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
119
value = dm_read_reg(cp110->base.ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
145
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
157
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
160
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
164
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
167
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
169
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
175
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
179
dm_write_reg(compressor->ctx, mmFBC_IND_LUT0, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
182
dm_write_reg(compressor->ctx, mmFBC_IND_LUT1, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
198
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
205
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
216
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
219
misc_value = dm_read_reg(compressor->ctx, mmFBC_MISC);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
228
dm_write_reg(compressor->ctx, mmFBC_MISC, misc_value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
232
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
247
reg_data = dm_read_reg(compressor->ctx, mmFBC_CNTL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
249
dm_write_reg(compressor->ctx, mmFBC_CNTL, reg_data);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
272
value = dm_read_reg(compressor->ctx, mmFBC_STATUS);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
279
value = dm_read_reg(compressor->ctx, mmFBC_MISC);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
281
value = dm_read_reg(compressor->ctx, mmFBC_CNTL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
308
compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
311
dm_write_reg(compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
315
dm_write_reg(compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
318
dm_write_reg(compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
331
dm_write_reg(compressor->ctx, DCP_REG(mmGRPH_COMPRESS_PITCH), 0);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
339
dm_write_reg(compressor->ctx, DCP_REG(mmGRPH_COMPRESS_PITCH), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
351
uint32_t value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
358
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
38
cp110->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
385
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
391
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
394
struct compressor *dce110_compressor_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
402
dce110_compressor_construct(cp110, ctx);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
423
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
441
compressor->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
444
compressor->base.memory_bus_width = ctx->asic_id.vram_width;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
80
status_pos = dm_read_reg(compressor->ctx, DCP_REG(mmCRTC_STATUS_POSITION));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
84
if (status_pos != dm_read_reg(compressor->ctx, DCP_REG(mmCRTC_STATUS_POSITION))) {
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
86
value = dm_read_reg(compressor->ctx, DCP_REG(mmLB_SYNC_RESET_SEL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
89
dm_write_reg(compressor->ctx, DCP_REG(mmLB_SYNC_RESET_SEL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
91
frame_count = dm_read_reg(compressor->ctx, DCP_REG(mmCRTC_STATUS_FRAME_COUNT));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.c
95
if (frame_count != dm_read_reg(compressor->ctx, DCP_REG(mmCRTC_STATUS_FRAME_COUNT)))
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.h
43
struct compressor *dce110_compressor_create(struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_compressor.h
46
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
1003
dm_write_reg(mi->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
1036
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
1039
dce_mi->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
110
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
123
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
156
value = dm_read_reg(mem_input110->base.ctx, mmUNP_GRPH_ENABLE);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
158
dm_write_reg(mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
201
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
223
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
254
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
262
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
270
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
278
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
286
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
294
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
303
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
312
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
321
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
330
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
355
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
370
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
418
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
423
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
433
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
443
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
46
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
465
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
476
value = dm_read_reg(mem_input110->base.ctx, mmUNP_GRPH_UPDATE);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
54
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
607
value = dm_read_reg(mem_input110->base.ctx, mmUNP_PIPE_OUTSTANDING_REQUEST_LIMIT);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
611
dm_write_reg(mem_input110->base.ctx, mmUNP_PIPE_OUTSTANDING_REQUEST_LIMIT, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
613
value = dm_read_reg(mem_input110->base.ctx, mmUNP_DVMM_PTE_CONTROL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
617
dm_write_reg(mem_input110->base.ctx, mmUNP_DVMM_PTE_CONTROL, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
619
value = dm_read_reg(mem_input110->base.ctx, mmUNP_DVMM_PTE_ARB_CONTROL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
622
dm_write_reg(mem_input110->base.ctx, mmUNP_DVMM_PTE_ARB_CONTROL, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
624
value = dm_read_reg(mem_input110->base.ctx, mmUNP_DVMM_PTE_CONTROL_C);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
628
dm_write_reg(mem_input110->base.ctx, mmUNP_DVMM_PTE_CONTROL_C, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
630
value = dm_read_reg(mem_input110->base.ctx, mmUNP_DVMM_PTE_ARB_CONTROL_C);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
633
dm_write_reg(mem_input110->base.ctx, mmUNP_DVMM_PTE_ARB_CONTROL_C, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
654
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
665
wm_mask_cntl = dm_read_reg(ctx, wm_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
670
dm_write_reg(ctx, wm_addr, wm_mask_cntl);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
672
urgency_cntl = dm_read_reg(ctx, urgency_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
685
dm_write_reg(ctx, urgency_addr, urgency_cntl);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
688
wm_mask_cntl = dm_read_reg(ctx, wm_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
693
dm_write_reg(ctx, wm_addr, wm_mask_cntl);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
695
urgency_cntl = dm_read_reg(ctx, urgency_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
707
dm_write_reg(ctx, urgency_addr, urgency_cntl);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
711
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
716
ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
724
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
729
ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
737
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
748
wm_mask_cntl = dm_read_reg(ctx, wm_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
75
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
753
dm_write_reg(ctx, wm_addr, wm_mask_cntl);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
755
stutter_cntl = dm_read_reg(ctx, stutter_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
757
if (ctx->dc->debug.disable_stutter) {
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
779
dm_write_reg(ctx, stutter_addr, stutter_cntl);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
782
wm_mask_cntl = dm_read_reg(ctx, wm_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
787
dm_write_reg(ctx, wm_addr, wm_mask_cntl);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
789
stutter_cntl = dm_read_reg(ctx, stutter_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
795
dm_write_reg(ctx, stutter_addr, stutter_cntl);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
799
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
802
program_stutter_watermark(ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
809
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
812
program_stutter_watermark(ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
819
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
828
value = dm_read_reg(ctx, wm_mask_ctrl_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
835
dm_write_reg(ctx, wm_mask_ctrl_addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
837
value = dm_read_reg(ctx, nbp_pstate_ctrl_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
854
dm_write_reg(ctx, nbp_pstate_ctrl_addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
857
value = dm_read_reg(ctx, nbp_pstate_ctrl_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
863
dm_write_reg(ctx, nbp_pstate_ctrl_addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
866
value = dm_read_reg(ctx, wm_mask_ctrl_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
872
dm_write_reg(ctx, wm_mask_ctrl_addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
874
value = dm_read_reg(ctx, nbp_pstate_ctrl_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
88
mem_input110->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
890
dm_write_reg(ctx, nbp_pstate_ctrl_addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
893
value = dm_read_reg(ctx, nbp_pstate_ctrl_addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
899
dm_write_reg(ctx, nbp_pstate_ctrl_addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
903
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
906
program_nbp_watermark(ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
913
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
916
program_nbp_watermark(ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
931
mem_input->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
936
mem_input->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
940
mem_input->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
953
mem_input->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
958
mem_input->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
962
mem_input->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
978
value = dm_read_reg(mi->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
985
dm_write_reg(mi->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
988
value = dm_read_reg(mi->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
995
dm_write_reg(mi->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.c
999
dm_write_reg(mi->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_mem_input_v.h
33
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
113
struct dc_context *ctx = xfm_dce->base.ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
114
uint32_t cntl_value = dm_read_reg(ctx, mmCOL_MAN_OUTPUT_CSC_CONTROL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
142
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
160
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
178
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
196
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
214
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
232
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
256
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
274
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
292
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
310
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
328
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
346
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
355
dm_write_reg(ctx, mmCOL_MAN_OUTPUT_CSC_CONTROL, cntl_value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
364
struct dc_context *ctx = xfm_dce->base.ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
366
uint32_t value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
456
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
465
uint32_t value = dm_read_reg(xfm->ctx, mmDENORM_CLAMP_CONTROL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
503
dm_write_reg(xfm->ctx, mmDENORM_CLAMP_CONTROL, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
535
struct dc_context *ctx = xfm->ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
555
value = dm_read_reg(ctx, mmCOL_MAN_INPUT_CSC_CONTROL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
566
dm_write_reg(ctx, mmINPUT_CSC_C11_C12_A, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
573
dm_write_reg(ctx, mmINPUT_CSC_C13_C14_A, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
580
dm_write_reg(ctx, mmINPUT_CSC_C21_C22_A, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
587
dm_write_reg(ctx, mmINPUT_CSC_C23_C24_A, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
594
dm_write_reg(ctx, mmINPUT_CSC_C31_C32_A, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
601
dm_write_reg(ctx, mmINPUT_CSC_C33_C34_A, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
609
dm_write_reg(ctx, mmINPUT_CSC_C11_C12_B, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
616
dm_write_reg(ctx, mmINPUT_CSC_C13_C14_B, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
623
dm_write_reg(ctx, mmINPUT_CSC_C21_C22_B, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
630
dm_write_reg(ctx, mmINPUT_CSC_C23_C24_B, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
637
dm_write_reg(ctx, mmINPUT_CSC_C31_C32_B, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
644
dm_write_reg(ctx, mmINPUT_CSC_C33_C34_B, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_csc_v.c
668
dm_write_reg(ctx, mmCOL_MAN_INPUT_CSC_CONTROL, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
111
dm_write_reg(xfm_dce->base.ctx, mmGAMMA_CORR_CONTROL, 0);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
149
dm_write_reg(xfm_dce->base.ctx, mmGAMMA_CORR_CNTLA_START_CNTL,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
160
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
171
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
188
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
221
xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
253
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
285
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
317
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
349
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
37
uint32_t value = dm_read_reg(xfm->ctx, mmDCFEV_MEM_PWR_CTRL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
381
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
413
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
445
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
462
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
465
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
476
dm_write_reg(xfm_dce->base.ctx, addr, rgb->red_reg);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
477
dm_write_reg(xfm_dce->base.ctx, addr, rgb->green_reg);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
478
dm_write_reg(xfm_dce->base.ctx, addr, rgb->blue_reg);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
480
dm_write_reg(xfm_dce->base.ctx, addr,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
482
dm_write_reg(xfm_dce->base.ctx, addr,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
484
dm_write_reg(xfm_dce->base.ctx, addr,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
521
uint32_t value = dm_read_reg(xfm->ctx, mmDCFEV_MEM_PWR_CTRL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
547
dm_write_reg(xfm->ctx, mmDCFEV_MEM_PWR_CTRL, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
68
dm_write_reg(xfm->ctx, mmDCFEV_MEM_PWR_CTRL, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
71
value = dm_read_reg(xfm->ctx, mmDCFEV_MEM_PWR_CTRL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
88
value = dm_read_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
97
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_v.c
48
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_v.c
52
opp110->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_opp_v.h
33
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
100
value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1057
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1061
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1091
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1097
dm_write_reg(ctx, CRTC_REG(mmCRTC_TEST_PATTERN_CONTROL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1098
dm_write_reg(ctx, CRTC_REG(mmCRTC_TEST_PATTERN_COLOR), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1099
dm_write_reg(ctx, CRTC_REG(mmCRTC_TEST_PATTERN_PARAMETERS),
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
113
regval = dm_read_reg(tg->ctx, address);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
116
dm_write_reg(tg->ctx, address, regval);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1226
value = dm_read_reg(tg->ctx, address);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1251
dm_write_reg(tg->ctx, CRTC_REG(mmDCP_GSL_CONTROL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1269
dm_write_reg(tg->ctx, CRTC_REG(mmDCIO_GSL0_CNTL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1275
value_crtc_vtotal = dm_read_reg(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1288
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_GSL_WINDOW), 0);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1296
dm_write_reg(tg->ctx, address, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1301
value = dm_read_reg(tg->ctx, address);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1312
dm_write_reg(tg->ctx, address, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1352
dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_V_TOTAL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1365
dm_write_reg(tg->ctx, address, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1381
dm_write_reg(tg->ctx, address, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
140
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_MASTER_UPDATE_MODE), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1416
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
144
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_MASTER_UPDATE_LOCK), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1468
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1475
struct dc_context *ctx = tg->ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1478
uint32_t value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1486
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1501
uint32_t pol_value = dm_read_reg(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1515
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_TRIGB_CNTL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1554
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_TRIGB_CNTL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1558
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_FORCE_COUNT_NOW_CNTL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
157
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1575
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_FORCE_COUNT_NOW_CNTL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1599
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_TRIGB_CNTL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1626
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_TRIGB_CNTL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1632
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_FORCE_COUNT_NOW_CNTL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1649
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_FORCE_COUNT_NOW_CNTL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1651
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_VERT_SYNC_CONTROL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1666
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_VERT_SYNC_CONTROL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1678
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_VERT_SYNC_CONTROL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1680
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_FORCE_COUNT_NOW_CNTL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1697
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_FORCE_COUNT_NOW_CNTL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1701
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_MASTER_UPDATE_MODE));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1708
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_MASTER_UPDATE_MODE), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1716
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_FORCE_COUNT_NOW_CNTL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1728
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_FORCE_COUNT_NOW_CNTL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1730
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_VERT_SYNC_CONTROL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1742
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_VERT_SYNC_CONTROL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1745
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_TRIGB_CNTL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
175
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1762
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_TRIGB_CNTL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1778
uint32_t value = dm_read_reg(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1780
uint32_t value1 = dm_read_reg(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1827
value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1835
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1849
struct dc_context *ctx = tg->ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1873
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1875
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1881
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1898
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1916
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1919
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1925
struct dc_context *ctx = tg->ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1949
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1971
uint32_t value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_BLANK_CONTROL));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
199
value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
1997
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_DOUBLE_BUFFER_CONTROL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2007
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_BLANK_CONTROL), value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2010
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_BLANK_CONTROL), 0);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2097
dm_write_reg(tg->ctx, CRTC_REG(mmCRTC_VERTICAL_INTERRUPT0_POSITION), val);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2110
value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2132
dm_write_reg(tg->ctx, cntl_addr, 0);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2149
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2160
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2171
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2182
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2191
dm_write_reg(tg->ctx, cntl_addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2203
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2214
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
222
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2225
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2236
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2245
dm_write_reg(tg->ctx, cntl_addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
225
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2263
value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2273
value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2278
value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2283
value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2288
value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2342
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2353
tg110->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
2354
tg110->base.bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
261
regval = dm_read_reg(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
271
dm_write_reg(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
378
v_total_min = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
381
v_total_max = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
384
v_total_cntl = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
460
dm_write_reg(tg->ctx, addr, v_total_min);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
463
dm_write_reg(tg->ctx, addr, v_total_max);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
466
dm_write_reg(tg->ctx, addr, v_total_cntl);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
483
static_screen_cntl = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
495
dm_write_reg(tg->ctx, addr, static_screen_cntl);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
516
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
539
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_STATUS_POSITION));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
551
value = dm_read_reg(tg->ctx, CRTC_REG(mmCRTC_NOM_VERT_POSITION));
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
579
uint32_t value = dm_read_reg(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
613
struct dc_context *ctx = tg->ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
619
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
625
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
628
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
634
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
640
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
646
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
649
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
655
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
658
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
678
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
681
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
700
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
711
struct dc_context *ctx = tg->ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
776
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
803
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
848
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
888
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
901
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.c
931
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator.h
122
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
102
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
116
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
122
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
136
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
147
value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
160
value = dm_read_reg(tg->ctx, mmCRTCV_STATUS_POSITION);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
172
value = dm_read_reg(tg->ctx, mmCRTCV_STATUS_POSITION);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
253
struct dc_context *ctx = tg->ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
259
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
265
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
268
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
274
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
277
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
297
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
300
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
319
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
328
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
331
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
345
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
354
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
357
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
371
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
374
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
380
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
389
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
42
tg->ctx->logger
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
423
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
456
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
474
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
481
struct dc_context *ctx = tg->ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
504
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
506
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
512
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
527
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
545
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
548
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
554
struct dc_context *ctx = tg->ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
577
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
597
regval = dm_read_reg(tg->ctx, address);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
600
dm_write_reg(tg->ctx, address, regval);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
606
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
64
dm_write_reg(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
69
dm_write_reg(tg->ctx, mmCRTCV_MASTER_UPDATE_MODE, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
692
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
698
tg110->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
699
tg110->base.bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
74
dm_write_reg(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
84
value = dm_read_reg(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
90
dm_write_reg(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_timing_generator_v.h
31
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
113
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
129
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
143
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
162
struct dc_context *ctx = xfm_dce->base.ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
173
dm_write_reg(ctx, mmSCLV_TAP_CONTROL, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
204
dm_write_reg(ctx, mmSCLV_MODE, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
213
dm_write_reg(ctx, mmSCLV_CONTROL, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
237
if (xfm_dce->base.ctx->dc->debug.visual_confirm != VISUAL_CONFIRM_DISABLE) {
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
263
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
267
dm_write_reg(xfm_dce->base.ctx,
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
277
value = dm_read_reg(xfm_dce->base.ctx, mmSCLV_UPDATE);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
279
dm_write_reg(xfm_dce->base.ctx, mmSCLV_UPDATE, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
288
struct dc_context *ctx = xfm_dce->base.ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
301
power_ctl = dm_read_reg(ctx, mmDCFEV_MEM_PWR_CTRL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
304
dm_write_reg(ctx, mmDCFEV_MEM_PWR_CTRL, power_ctl_off);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
309
dm_read_reg(ctx, mmDCFEV_MEM_PWR_STATUS),
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
329
dm_write_reg(ctx, mmSCLV_COEF_RAM_SELECT, select);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
34
xfm->ctx->logger
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
359
dm_write_reg(ctx, mmSCLV_COEF_RAM_TAP_DATA, data);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
364
dm_write_reg(ctx, mmDCFEV_MEM_PWR_CTRL, power_ctl);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
393
struct dc_context *ctx = xfm_dce->base.ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
402
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
411
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
420
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
429
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
443
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
457
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
471
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
485
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
508
value = dm_read_reg(xfm_dce->base.ctx, mmLBV_MEMORY_CTRL);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
516
dm_write_reg(xfm_dce->base.ctx, mmLBV_MEMORY_CTRL, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
669
dm_write_reg(xfm->ctx, mmLBV_DATA_FORMAT, reg_data);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
700
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
702
xfm_dce->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
82
struct dc_context *ctx = xfm_dce->base.ctx;
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.c
99
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce110/dce110_transform_v.h
35
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
299
value = dm_read_reg(cp110->base.ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
322
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
334
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
337
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
341
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
344
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
346
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
352
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
356
dm_write_reg(compressor->ctx, mmFBC_IND_LUT0, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
359
dm_write_reg(compressor->ctx, mmFBC_IND_LUT1, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
37
cp110->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
391
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
397
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
406
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
408
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
422
reg_data = dm_read_reg(compressor->ctx, mmFBC_CNTL);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
424
dm_write_reg(compressor->ctx, mmFBC_CNTL, reg_data);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
446
value = dm_read_reg(compressor->ctx, mmFBC_STATUS);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
453
value = dm_read_reg(compressor->ctx, mmFBC_MISC);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
455
value = dm_read_reg(compressor->ctx, mmFBC_CNTL);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
470
uint32_t value = dm_read_reg(compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
491
compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
494
dm_write_reg(compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
509
dm_write_reg(compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
512
dm_write_reg(compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
528
dm_write_reg(compressor->ctx, DCP_REG(mmGRPH_COMPRESS_PITCH), 0);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
536
dm_write_reg(compressor->ctx, DCP_REG(mmGRPH_COMPRESS_PITCH), value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
551
compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
559
compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
565
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
571
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
575
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
581
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
585
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
591
dm_write_reg(compressor->ctx, mmGMCON_LPT_TARGET, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
603
value = dm_read_reg(compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
610
dm_write_reg(compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
615
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
621
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
627
value_control = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
633
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
640
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
644
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
650
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
667
lpt_control = dm_read_reg(compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
722
dm_write_reg(compressor->ctx,
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
738
uint32_t value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
745
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
772
value = dm_read_reg(compressor->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
784
dm_write_reg(compressor->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
788
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
790
struct dc_bios *bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
807
compressor->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
810
compressor->base.memory_bus_width = ctx->asic_id.vram_width;
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
831
struct compressor *dce112_compressor_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.c
839
dce112_compressor_construct(cp110, ctx);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.h
43
struct compressor *dce112_compressor_create(struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dce112/dce112_compressor.h
46
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1030
dm_write_reg_soc15(ctx, mmCRTC0_CRTC_TEST_PATTERN_COLOR, tg110->offsets.crtc, 0);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1033
dm_write_reg_soc15(ctx, mmCRTC0_CRTC_TEST_PATTERN_CONTROL, tg110->offsets.crtc, 0);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1045
dm_write_reg_soc15(ctx, mmCRTC0_CRTC_TEST_PATTERN_CONTROL, tg110->offsets.crtc, value);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1046
dm_write_reg_soc15(ctx, mmCRTC0_CRTC_TEST_PATTERN_COLOR, tg110->offsets.crtc, value);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1047
dm_write_reg_soc15(ctx, mmCRTC0_CRTC_TEST_PATTERN_PARAMETERS, tg110->offsets.crtc, value);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1086
value = dm_read_reg_soc15(tg->ctx, mmCRTC0_CRTC_CONTROL,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1105
dm_write_reg_soc15(tg->ctx, mmCRTC0_CRTC_CRC_CNTL,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1180
value = dm_read_reg_soc15(tg->ctx, mmCRTC0_CRTC_CRC_CNTL,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1190
value = dm_read_reg_soc15(tg->ctx, mmCRTC0_CRTC_CRC0_DATA_RG,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1195
value = dm_read_reg_soc15(tg->ctx, mmCRTC0_CRTC_CRC0_DATA_B,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1200
value = dm_read_reg_soc15(tg->ctx, mmCRTC0_CRTC_CRC1_DATA_RG,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1205
value = dm_read_reg_soc15(tg->ctx, mmCRTC0_CRTC_CRC1_DATA_B,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1257
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1268
tg110->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
1269
tg110->base.bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
174
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
190
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
201
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
251
dm_read_reg_soc15(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
261
dm_write_reg_soc15(tg->ctx, mmCRTC0_CRTC_GSL_WINDOW, tg110->offsets.crtc, 0);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
313
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
375
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
416
value = dm_read_reg_soc15(tg->ctx, mmD1VGA_CONTROL, offset);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
424
dm_write_reg_soc15(tg->ctx, mmD1VGA_CONTROL, offset, value);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
43
generic_reg_update_soc15(tg110->base.ctx, tg110->offsets.crtc, reg_name, n, __VA_ARGS__)
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
46
generic_reg_set_soc15(tg110->base.ctx, tg110->offsets.crtc, reg_name, n, __VA_ARGS__)
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
514
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
519
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
529
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
603
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
631
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
653
dm_write_reg_soc15(tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
672
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
676
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
714
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
743
dm_write_reg_soc15(tg->ctx, mmCRTC0_CRTC_BLANK_CONTROL,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
802
struct dc_context *ctx = tg->ctx;
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
904
dm_write_reg_soc15(ctx, mmCRTC0_CRTC_TEST_PATTERN_PARAMETERS, tg110->offsets.crtc, 0);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
91
tg->ctx,
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
943
dm_write_reg_soc15(ctx, mmCRTC0_CRTC_TEST_PATTERN_COLOR, tg110->offsets.crtc, value);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.c
956
dm_write_reg_soc15(ctx, mmCRTC0_CRTC_TEST_PATTERN_COLOR, tg110->offsets.crtc, value);
sys/dev/pci/drm/amd/display/dc/dce120/dce120_timing_generator.h
36
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce60/dce60_timing_generator.c
105
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce60/dce60_timing_generator.c
131
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce60/dce60_timing_generator.c
134
uint32_t value2 = dm_read_reg(tg->ctx, addr2);
sys/dev/pci/drm/amd/display/dc/dce60/dce60_timing_generator.c
175
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce60/dce60_timing_generator.c
176
dm_write_reg(tg->ctx, addr2, value2);
sys/dev/pci/drm/amd/display/dc/dce60/dce60_timing_generator.c
187
value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce60/dce60_timing_generator.c
247
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce60/dce60_timing_generator.c
258
tg110->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce60/dce60_timing_generator.c
259
tg110->base.bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce60/dce60_timing_generator.c
92
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce60/dce60_timing_generator.h
35
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce80/dce80_timing_generator.c
105
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce80/dce80_timing_generator.c
131
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce80/dce80_timing_generator.c
183
dm_write_reg(tg->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/dce80/dce80_timing_generator.c
229
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dce80/dce80_timing_generator.c
240
tg110->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dce80/dce80_timing_generator.c
241
tg110->base.bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dce80/dce80_timing_generator.c
92
uint32_t value = dm_read_reg(tg->ctx, addr);
sys/dev/pci/drm/amd/display/dc/dce80/dce80_timing_generator.h
35
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.c
332
ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.c
334
bool cm_helper_translate_curve_to_hw_format(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.c
35
ctx
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.c
42
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.c
65
void cm_helper_read_color_matrices(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.c
86
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.h
109
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.h
117
void cm_helper_read_color_matrices(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.h
93
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_cm_common.h
98
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_dwb.c
115
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_dwb.c
121
dwbc10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_dwb.c
36
dwbc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_dwb.h
261
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_hw_sequencer_debug.c
112
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_hw_sequencer_debug.c
74
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_ipp.c
38
ippn10->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_ipp.c
60
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_ipp.c
66
ippn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_ipp.c
77
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_ipp.c
83
ippn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_ipp.h
210
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_ipp.h
217
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn20/dcn20_dwb.c
328
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn20/dcn20_dwb.c
334
dwbc20->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn20/dcn20_dwb.c
37
dwbc20->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn20/dcn20_dwb.c
40
dwbc20->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn20/dcn20_dwb.h
396
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c
40
dwbc20->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn20/dcn20_vmid.c
35
vmid->ctx
sys/dev/pci/drm/amd/display/dc/dcn20/dcn20_vmid.h
69
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_link_encoder.c
120
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_link_encoder.c
125
enc10->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_link_encoder.c
188
result = bp_funcs->get_encoder_cap_info(enc10->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_link_encoder.c
205
if (enc10->base.ctx->dc->debug.hdmi20_disable) {
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_link_encoder.c
37
enc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_link_encoder.c
40
enc10->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_mpc.c
104
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_mpc.c
112
mpc201->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_mpc.c
33
mpc201->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_mpc.c
36
mpc201->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_mpc.h
80
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_opp.c
38
oppn201->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_opp.c
61
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_opp.c
67
oppn201->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn201/dcn201_opp.h
67
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn21/dcn21_link_encoder.c
265
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dcn21/dcn21_link_encoder.c
341
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dcn21/dcn21_link_encoder.c
346
enc10->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dcn21/dcn21_link_encoder.c
39
enc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn21/dcn21_link_encoder.c
41
enc10->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn21/dcn21_link_encoder.c
423
result = bp_funcs->get_encoder_cap_info(enc10->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dcn21/dcn21_link_encoder.c
440
if (enc10->base.ctx->dc->debug.hdmi20_disable) {
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_afmt.c
201
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_afmt.c
207
afmt3->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_afmt.c
33
afmt3->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_afmt.c
44
afmt3->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_afmt.h
134
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_afmt.h
164
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_cm_common.c
109
ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_cm_common.c
111
bool cm3_helper_translate_curve_to_hw_format(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_cm_common.c
37
ctx //dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_cm_common.c
44
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_mmhubbub.c
225
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_mmhubbub.c
231
mcif_wb30->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_mmhubbub.c
37
mcif_wb30->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_mmhubbub.h
442
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_vpg.c
250
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_vpg.c
256
vpg3->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_vpg.c
32
vpg3->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_vpg.c
43
vpg3->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn30/dcn30_vpg.h
150
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn301/dcn301_panel_cntl.c
216
dcn301_panel_cntl->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dcn301/dcn301_panel_cntl.c
36
dcn301_panel_cntl->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn301/dcn301_panel_cntl.c
39
dcn301_panel_cntl->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_afmt.c
34
afmt31->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_afmt.c
45
afmt31->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_afmt.c
61
if (afmt->ctx->dc->debug.enable_mem_low_power.bits.afmt == false)
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_afmt.c
71
if (afmt->ctx->dc->debug.enable_mem_low_power.bits.afmt == false)
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_afmt.c
78
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_afmt.c
84
afmt31->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_afmt.h
120
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_apg.c
105
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_apg.c
111
apg31->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_apg.c
33
apg31->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_apg.c
44
apg31->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_apg.h
104
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_apg.h
73
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
101
uint32_t xtal = panel_cntl->ctx->dc->res_pool->ref_clocks.dccg_ref_clock_inKhz;
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
110
if (!dc_wake_and_execute_dmub_cmd(dc_dmub_srv->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY))
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
173
dcn31_panel_cntl->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
176
if (dcn31_panel_cntl->base.ctx->dc->config.support_edp0_on_dp1) {
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
36
dcn31_panel_cntl->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
39
dcn31_panel_cntl->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
44
struct dc_dmub_srv *dc_dmub_srv = panel_cntl->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
55
return dc_wake_and_execute_dmub_cmd(dc_dmub_srv->ctx, cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY);
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
71
struct dc_dmub_srv *dc_dmub_srv = panel_cntl->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
73
uint32_t freq_to_set = panel_cntl->ctx->dc->debug.pwm_freq;
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c
89
if (!dc_wake_and_execute_dmub_cmd(dc_dmub_srv->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY))
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_vpg.c
33
vpg31->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_vpg.c
44
vpg31->base.ctx
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_vpg.c
56
if (vpg->ctx->dc->debug.enable_mem_low_power.bits.vpg == false)
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_vpg.c
70
if (vpg->ctx->dc->debug.enable_mem_low_power.bits.vpg == false &&
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_vpg.c
78
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_vpg.c
84
vpg31->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dcn31/dcn31_vpg.h
157
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.c
37
enc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.c
39
enc10->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.c
646
enc10->base.ctx->dc->debug.hdmi20_disable) &&
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.c
649
if (enc10->base.ctx->dc->debug.hdmi20_disable &&
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.c
678
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.c
682
enc10->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.c
759
result = bp_funcs->get_encoder_cap_info(enc10->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.c
776
if (enc10->base.ctx->dc->debug.hdmi20_disable) {
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_link_encoder.c
98
struct dc_bios *bp = enc10->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.c
1611
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.c
1619
enc1->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.c
36
enc1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.c
55
enc1->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn10/dcn10_stream_encoder.h
630
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c
254
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c
334
if (enc->ctx->dc_bios->golden_table.dc_golden_table_ver > 0) {
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c
335
AUX_REG_WRITE(AUX_DPHY_RX_CONTROL0, enc->ctx->dc_bios->golden_table.aux_dphy_rx_control0_val);
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c
337
AUX_REG_WRITE(AUX_DPHY_TX_CONTROL, enc->ctx->dc_bios->golden_table.aux_dphy_tx_control_val);
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c
339
AUX_REG_WRITE(AUX_DPHY_RX_CONTROL1, enc->ctx->dc_bios->golden_table.aux_dphy_rx_control1_val);
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c
37
enc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c
39
enc10->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c
400
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c
405
enc10->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c
482
result = bp_funcs->get_encoder_cap_info(enc10->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_link_encoder.c
499
if (enc10->base.ctx->dc->debug.hdmi20_disable) {
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_stream_encoder.c
36
enc1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_stream_encoder.c
47
enc1->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_stream_encoder.c
645
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_stream_encoder.c
653
enc1->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn20/dcn20_stream_encoder.h
92
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_link_encoder.c
100
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_link_encoder.c
105
enc10->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_link_encoder.c
182
result = bp_funcs->get_encoder_cap_info(enc10->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_link_encoder.c
203
if (enc10->base.ctx->dc->debug.hdmi20_disable) {
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_link_encoder.c
36
enc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_link_encoder.c
38
enc10->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_stream_encoder.c
34
enc1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_stream_encoder.c
47
enc1->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_stream_encoder.c
535
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_stream_encoder.c
582
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_stream_encoder.c
879
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_stream_encoder.c
889
enc1->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn30/dcn30_dio_stream_encoder.h
279
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn301/dcn301_dio_link_encoder.c
171
result = bp_funcs->get_encoder_cap_info(enc10->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dio/dcn301/dcn301_dio_link_encoder.c
188
if (enc10->base.ctx->dc->debug.hdmi20_disable) {
sys/dev/pci/drm/amd/display/dc/dio/dcn301/dcn301_dio_link_encoder.c
36
enc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn301/dcn301_dio_link_encoder.c
38
enc10->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn301/dcn301_dio_link_encoder.c
89
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dio/dcn301/dcn301_dio_link_encoder.c
94
enc10->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
105
struct dc_dmub_srv *dc_dmub_srv = enc->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
107
if (enc->ctx->dce_version >= DCN_VERSION_3_15)
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
128
if (!dc_wake_and_execute_dmub_cmd(enc->ctx, cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY))
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
292
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
297
enc10->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
371
result = bp_funcs->get_encoder_cap_info(enc10->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
392
if (enc10->base.ctx->dc->debug.hdmi20_disable) {
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
399
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
407
enc10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
43
enc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
45
enc10->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
458
if (!link_enc_cfg_is_transmitter_mappable(enc->ctx->dc, enc)) {
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
468
link = link_enc_cfg_get_link_using_link_enc(enc->ctx->dc, enc->preferred_engine);
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
493
link_dpia_control(enc->ctx, &dpia_control);
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
505
if (!link_enc_cfg_is_transmitter_mappable(enc->ctx->dc, enc)) {
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
515
link = link_enc_cfg_get_link_using_link_enc(enc->ctx->dc, enc->preferred_engine);
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
540
link_dpia_control(enc->ctx, &dpia_control);
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
551
if (!link_enc_cfg_is_transmitter_mappable(enc->ctx->dc, enc)) {
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
564
link = link_enc_cfg_get_link_using_link_enc(enc->ctx->dc, enc->preferred_engine);
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
586
link_dpia_control(enc->ctx, &dpia_control);
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
614
if (enc->ctx->asic_id.hw_internal_rev != YELLOW_CARP_B0) {
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.c
665
if (enc->ctx->asic_id.hw_internal_rev != YELLOW_CARP_B0) {
sys/dev/pci/drm/amd/display/dc/dio/dcn31/dcn31_dio_link_encoder.h
246
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn314/dcn314_dio_stream_encoder.c
112
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn314/dcn314_dio_stream_encoder.c
153
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn314/dcn314_dio_stream_encoder.c
293
if (enc->ctx->dc->debug.dig_fifo_off_in_blank)
sys/dev/pci/drm/amd/display/dc/dio/dcn314/dcn314_dio_stream_encoder.c
37
enc1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn314/dcn314_dio_stream_encoder.c
486
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn314/dcn314_dio_stream_encoder.c
496
enc1->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn314/dcn314_dio_stream_encoder.c
50
enc1->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn314/dcn314_dio_stream_encoder.h
267
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_link_encoder.c
147
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_link_encoder.c
165
if (!dc_wake_and_execute_dmub_cmd(enc->ctx, cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY))
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_link_encoder.c
249
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_link_encoder.c
254
enc10->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_link_encoder.c
315
result = bp_funcs->get_connector_speed_cap_info(enc10->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_link_encoder.c
334
if (enc10->base.ctx->dc->debug.hdmi20_disable) {
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_link_encoder.c
45
enc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_link_encoder.c
47
enc10->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_stream_encoder.c
111
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_stream_encoder.c
36
enc1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_stream_encoder.c
473
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_stream_encoder.c
483
enc1->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_stream_encoder.c
49
enc1->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_stream_encoder.c
70
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn32/dcn32_dio_stream_encoder.h
189
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn321/dcn321_dio_link_encoder.c
105
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dio/dcn321/dcn321_dio_link_encoder.c
110
enc10->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn321/dcn321_dio_link_encoder.c
169
result = bp_funcs->get_connector_speed_cap_info(enc10->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dio/dcn321/dcn321_dio_link_encoder.c
188
if (enc10->base.ctx->dc->debug.hdmi20_disable)
sys/dev/pci/drm/amd/display/dc/dio/dcn321/dcn321_dio_link_encoder.c
42
enc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn321/dcn321_dio_link_encoder.c
44
enc10->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
123
dcn35_link_encoder_set_fgcg(enc, enc->ctx->dc->debug.enable_fine_grain_clock_gating.bits.dio);
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
178
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
183
enc10->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
247
result = bp_funcs->get_connector_speed_cap_info(enc10->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
267
if (enc10->base.ctx->dc->debug.hdmi20_disable)
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
307
if (!enc->ctx->dc->config.unify_link_enc_assignment)
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
322
if (!enc->ctx->dc->config.unify_link_enc_assignment)
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
33
enc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
336
if (!enc->ctx->dc->config.unify_link_enc_assignment)
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
35
enc10->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
368
link_dpia_control(enc->ctx, &dpia_control);
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_link_encoder.c
388
link_dpia_control(enc->ctx, &dpia_control);
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_stream_encoder.c
36
enc1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_stream_encoder.c
49
enc1->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_stream_encoder.c
500
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_stream_encoder.c
510
enc1->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_stream_encoder.c
58
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_stream_encoder.c
98
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn35/dcn35_dio_stream_encoder.h
277
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_link_encoder.c
117
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_link_encoder.c
231
const struct dc_vbios_funcs *bp_funcs = init_data->ctx->dc_bios->funcs;
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_link_encoder.c
236
enc10->base.ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_link_encoder.c
300
result = bp_funcs->get_connector_speed_cap_info(enc10->base.ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_link_encoder.c
319
if (enc10->base.ctx->dc->debug.hdmi20_disable) {
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_link_encoder.c
44
enc10->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_link_encoder.c
46
enc10->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.c
111
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.c
39
enc1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.c
52
enc1->base.ctx
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.c
70
if (!enc->ctx->dc->debug.avoid_vbios_exec_table) {
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.c
774
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.c
784
enc1->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dio/dcn401/dcn401_dio_stream_encoder.h
195
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
102
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
108
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
115
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
119
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
124
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
128
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
135
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
145
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
152
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
157
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
165
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
171
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
180
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
185
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
191
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
194
void dm_helpers_enable_periodic_detection(struct dc_context *ctx, bool enable);
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
196
void dm_set_phyd32clk(struct dc_context *ctx, int freq_khz);
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
198
bool dm_helpers_dmub_outbox_interrupt_control(struct dc_context *ctx, bool enable);
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
200
void dm_helpers_smu_timeout(struct dc_context *ctx, unsigned int msg_id, unsigned int param, unsigned int timeout_us);
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
206
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
210
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
213
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
218
int dm_helpers_dmub_set_config_sync(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
226
bool dm_helpers_is_fullscreen(struct dc_context *ctx, struct dc_stream_state *stream);
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
227
bool dm_helpers_is_hdr_on(struct dc_context *ctx, struct dc_stream_state *stream);
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
49
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
58
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
72
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
79
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
88
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_helpers.h
95
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_pp_smu.h
312
struct pp_smu ctx;
sys/dev/pci/drm/amd/display/dc/dm_services.h
119
uint32_t generic_reg_set_ex(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
123
uint32_t generic_reg_update_ex(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
130
void reg_sequence_start_gather(const struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dm_services.h
131
void reg_sequence_start_execute(const struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dm_services.h
132
void reg_sequence_wait_done(const struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dm_services.h
141
void generic_reg_wait(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
151
#define dm_write_reg_soc15(ctx, reg, inst_offset, value) \
sys/dev/pci/drm/amd/display/dc/dm_services.h
152
dm_write_reg_func(ctx, reg + DCE_BASE.instance[0].segment[reg##_BASE_IDX] + inst_offset, value, __func__)
sys/dev/pci/drm/amd/display/dc/dm_services.h
154
#define dm_read_reg_soc15(ctx, reg, inst_offset) \
sys/dev/pci/drm/amd/display/dc/dm_services.h
155
dm_read_reg_func(ctx, reg + DCE_BASE.instance[0].segment[reg##_BASE_IDX] + inst_offset, __func__)
sys/dev/pci/drm/amd/display/dc/dm_services.h
157
#define generic_reg_update_soc15(ctx, inst_offset, reg_name, n, ...)\
sys/dev/pci/drm/amd/display/dc/dm_services.h
158
generic_reg_update_ex(ctx, DCE_BASE.instance[0].segment[mm##reg_name##_BASE_IDX] + mm##reg_name + inst_offset, \
sys/dev/pci/drm/amd/display/dc/dm_services.h
161
#define generic_reg_set_soc15(ctx, inst_offset, reg_name, n, ...)\
sys/dev/pci/drm/amd/display/dc/dm_services.h
162
generic_reg_set_ex(ctx, DCE_BASE.instance[0].segment[mm##reg_name##_BASE_IDX] + mm##reg_name + inst_offset, 0, \
sys/dev/pci/drm/amd/display/dc/dm_services.h
191
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
196
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
201
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
206
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
209
void dm_pp_get_funcs(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
224
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
228
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
232
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
236
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
247
(struct dc_context *ctx, enum dm_acpi_display_type display,
sys/dev/pci/drm/amd/display/dc/dm_services.h
250
bool dm_dmcu_set_pipe(struct dc_context *ctx, unsigned int controller_id);
sys/dev/pci/drm/amd/display/dc/dm_services.h
260
static inline unsigned long long dm_get_timestamp(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/dm_services.h
265
unsigned long long dm_get_elapse_time_in_ns(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
272
void dm_perf_trace_timestamp(const char *func_name, unsigned int line, struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dm_services.h
280
void dm_trace_smu_enter(uint32_t msg_id, uint32_t param_in, unsigned int delay, struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dm_services.h
281
void dm_trace_smu_exit(bool success, uint32_t response, struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/dm_services.h
283
#define TRACE_SMU_MSG_DELAY(msg_id, param_in, delay, ctx) dm_trace_smu_enter(msg_id, param_in, delay, ctx)
sys/dev/pci/drm/amd/display/dc/dm_services.h
284
#define TRACE_SMU_MSG(msg_id, param_in, ctx) dm_trace_smu_enter(msg_id, param_in, 0, ctx)
sys/dev/pci/drm/amd/display/dc/dm_services.h
285
#define TRACE_SMU_MSG_ENTER(msg_id, param_in, ctx) dm_trace_smu_enter(msg_id, param_in, 0, ctx)
sys/dev/pci/drm/amd/display/dc/dm_services.h
286
#define TRACE_SMU_MSG_EXIT(success, response, ctx) dm_trace_smu_exit(success, response, ctx)
sys/dev/pci/drm/amd/display/dc/dm_services.h
291
bool dm_execute_dmub_cmd(const struct dc_context *ctx, union dmub_rb_cmd *cmd, enum dm_dmub_wait_type wait_type);
sys/dev/pci/drm/amd/display/dc/dm_services.h
292
bool dm_execute_dmub_cmd_list(const struct dc_context *ctx, unsigned int count, union dmub_rb_cmd *cmd, enum dm_dmub_wait_type wait_type);
sys/dev/pci/drm/amd/display/dc/dm_services.h
298
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
305
void dm_dtn_log_begin(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
307
void dm_dtn_log_append_v(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
310
void dm_dtn_log_end(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
46
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
56
uint32_t dm_read_reg_func(const struct dc_context *ctx, uint32_t address,
sys/dev/pci/drm/amd/display/dc/dm_services.h
62
void dm_write_reg_func(const struct dc_context *ctx, uint32_t address,
sys/dev/pci/drm/amd/display/dc/dm_services.h
65
#define dm_read_reg(ctx, address) \
sys/dev/pci/drm/amd/display/dc/dm_services.h
66
dm_read_reg_func(ctx, address, __func__)
sys/dev/pci/drm/amd/display/dc/dm_services.h
68
#define dm_write_reg(ctx, address, value) \
sys/dev/pci/drm/amd/display/dc/dm_services.h
69
dm_write_reg_func(ctx, address, value, __func__)
sys/dev/pci/drm/amd/display/dc/dm_services.h
72
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
76
return cgs_read_ind_register(ctx->cgs_device, addr_space, index);
sys/dev/pci/drm/amd/display/dc/dm_services.h
80
const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dm_services.h
85
cgs_write_ind_register(ctx->cgs_device, addr_space, index, value);
sys/dev/pci/drm/amd/display/dc/dml/calcs/dcn_calcs.c
318
if (pipe->plane_res.dpp->ctx->dc->debug.optimized_watermark) {
sys/dev/pci/drm/amd/display/dc/dml/calcs/dcn_calcs.c
333
input->src.dcc = pipe->plane_res.dpp->ctx->dc->res_pool->hubbub->funcs->
sys/dev/pci/drm/amd/display/dc/dml/calcs/dcn_calcs.c
40
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/dml/dcn10/dcn10_fpu.c
130
if (dc->ctx->dce_version == DCN_VERSION_1_01) {
sys/dev/pci/drm/amd/display/dc/dml/dcn10/dcn10_fpu.c
140
if (ASICREV_IS_RV1_F0(dc->ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/dml/dcn10/dcn10_fpu.c
146
dc->dcn_soc->number_of_channels = dc->ctx->asic_id.vram_width / ddr4_dram_width;
sys/dev/pci/drm/amd/display/dc/dml/dcn10/dcn10_fpu.c
156
if (ASICREV_IS_RV1_F0(dc->ctx->asic_id.hw_internal_rev))
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
1203
if (dc->ctx->dce_version < DCN_VERSION_3_1 &&
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
1231
if (dc->ctx->dce_version == DCN_VERSION_2_01)
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
1369
pipes[pipe_cnt].pipe.dest.use_maximum_vstartup = dc->ctx->dce_version == DCN_VERSION_2_01;
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
1867
if (ASICREV_IS_NAVI12_P(dc->ctx->asic_id.hw_internal_rev))
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
2038
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
2329
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
38
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
40
optc1->base.ctx
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
526
if (dc->ctx->dc_bios->vram_info.dram_channel_width_bytes)
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
527
dcn3_0_soc.dram_channel_width_bytes = dc->ctx->dc_bios->vram_info.dram_channel_width_bytes;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
661
double pstate_latency_us = base->ctx->dc->dml.soc.dram_clock_change_latency_us;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
662
double sr_exit_time_us = base->ctx->dc->dml.soc.sr_exit_time_us;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
663
double sr_enter_plus_exit_time_us = base->ctx->dc->dml.soc.sr_enter_plus_exit_time_us;
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
725
if (dc->ctx->dc_bios->funcs->get_soc_bb_info) {
sys/dev/pci/drm/amd/display/dc/dml/dcn30/dcn30_fpu.c
728
if (dc->ctx->dc_bios->funcs->get_soc_bb_info(dc->ctx->dc_bios, &bb_info) == BP_RESULT_OK) {
sys/dev/pci/drm/amd/display/dc/dml/dcn302/dcn302_fpu.c
211
if (dc->ctx->dc_bios->vram_info.num_chans)
sys/dev/pci/drm/amd/display/dc/dml/dcn302/dcn302_fpu.c
212
dcn3_02_soc.num_chans = dc->ctx->dc_bios->vram_info.num_chans;
sys/dev/pci/drm/amd/display/dc/dml/dcn302/dcn302_fpu.c
214
if (dc->ctx->dc_bios->vram_info.dram_channel_width_bytes)
sys/dev/pci/drm/amd/display/dc/dml/dcn302/dcn302_fpu.c
215
dcn3_02_soc.dram_channel_width_bytes = dc->ctx->dc_bios->vram_info.dram_channel_width_bytes;
sys/dev/pci/drm/amd/display/dc/dml/dcn303/dcn303_fpu.c
207
if (dc->ctx->dc_bios->vram_info.num_chans)
sys/dev/pci/drm/amd/display/dc/dml/dcn303/dcn303_fpu.c
208
dcn3_03_soc.num_chans = dc->ctx->dc_bios->vram_info.num_chans;
sys/dev/pci/drm/amd/display/dc/dml/dcn303/dcn303_fpu.c
210
if (dc->ctx->dc_bios->vram_info.dram_channel_width_bytes)
sys/dev/pci/drm/amd/display/dc/dml/dcn303/dcn303_fpu.c
211
dcn3_03_soc.dram_channel_width_bytes = dc->ctx->dc_bios->vram_info.dram_channel_width_bytes;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
1861
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
189
double pstate_latency_us = clk_mgr->base.ctx->dc->dml.soc.dram_clock_change_latency_us;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
190
double fclk_change_latency_us = clk_mgr->base.ctx->dc->dml.soc.fclk_change_latency_us;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
191
double sr_exit_time_us = clk_mgr->base.ctx->dc->dml.soc.sr_exit_time_us;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
192
double sr_enter_plus_exit_time_us = clk_mgr->base.ctx->dc->dml.soc.sr_enter_plus_exit_time_us;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
197
uint16_t dcfclk_mhz_for_the_second_state = clk_mgr->base.ctx->dc->dml.soc.clock_limits[2].dcfclk_mhz;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
235
if (clk_mgr->base.ctx->dc->bb_overrides.dummy_clock_change_latency_ns != 0x7FFFFFFF) {
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
3104
if (dc->ctx->dc_bios->funcs->get_soc_bb_info) {
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
3107
if (dc->ctx->dc_bios->funcs->get_soc_bb_info(dc->ctx->dc_bios, &bb_info) == BP_RESULT_OK) {
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
3126
if (dc->ctx->dc_bios->vram_info.num_chans) {
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
3128
dcn3_2_soc.num_chans = dc->ctx->dc_bios->vram_info.num_chans;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
3130
dc->ctx->dc_bios->vram_info.num_chans) * dc->caps.mall_size_per_mem_channel);
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
3133
if (dc->ctx->dc_bios->vram_info.dram_channel_width_bytes)
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
3135
dcn3_2_soc.dram_channel_width_bytes = dc->ctx->dc_bios->vram_info.dram_channel_width_bytes;
sys/dev/pci/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c
3146
dc->dml2_options.bbox_overrides.xtalclk_mhz = dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency / 1000.0;
sys/dev/pci/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c
662
if (dc->ctx->dc_bios->funcs->get_soc_bb_info) {
sys/dev/pci/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c
665
if (dc->ctx->dc_bios->funcs->get_soc_bb_info(dc->ctx->dc_bios, &bb_info) == BP_RESULT_OK) {
sys/dev/pci/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c
684
if (dc->ctx->dc_bios->vram_info.num_chans) {
sys/dev/pci/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c
686
dcn3_21_soc.num_chans = dc->ctx->dc_bios->vram_info.num_chans;
sys/dev/pci/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c
688
dc->ctx->dc_bios->vram_info.num_chans) * dc->caps.mall_size_per_mem_channel);
sys/dev/pci/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c
691
if (dc->ctx->dc_bios->vram_info.dram_channel_width_bytes)
sys/dev/pci/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c
693
dcn3_21_soc.dram_channel_width_bytes = dc->ctx->dc_bios->vram_info.dram_channel_width_bytes;
sys/dev/pci/drm/amd/display/dc/dml/dcn321/dcn321_fpu.c
704
dc->dml2_options.bbox_overrides.xtalclk_mhz = dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency / 1000.0;
sys/dev/pci/drm/amd/display/dc/dml/dcn35/dcn35_fpu.c
582
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
127
if (stream->ctx->dc->caps.max_v_total != 0) {
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
140
stream->ctx->dc->config.enable_fpo_flicker_detection == 1)
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
277
if (!stream->ctx->dc->debug.enable_single_display_2to1_odm_policy ||
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
280
stream_desc->overrides.disable_subvp = stream->ctx->dc->debug.force_disable_subvp ||
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
556
} else if ((plane_state->ctx->dc->config.use_spl == true) &&
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
568
if (plane_state->ctx->dc->debug.always_scale == true) {
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
61
dml_init->options.project_id = dml21_dcn_revision_to_dml2_project_id(in_dc->ctx->dce_version);
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
76
unsigned int max_hw_v_total = stream->ctx->dc->caps.max_v_total;
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
78
if (stream->ctx->dc->caps.vtotal_limited_by_fp2) {
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_utils.c
14
int dml21_helper_find_dml_pipe_idx_by_stream_id(struct dml2_context *ctx, unsigned int stream_id)
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_utils.c
18
if (ctx->v21.dml_to_dc_pipe_mapping.dml_pipe_idx_to_stream_id_valid[i] && ctx->v21.dml_to_dc_pipe_mapping.dml_pipe_idx_to_stream_id[i] == stream_id)
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_utils.c
236
bool sub_vp_enabled = is_sub_vp_enabled(pipe_ctx->stream->ctx->dc, context);
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_utils.c
25
int dml21_find_dml_pipe_idx_by_plane_id(struct dml2_context *ctx, unsigned int plane_id)
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_utils.c
29
if (ctx->v21.dml_to_dc_pipe_mapping.dml_pipe_idx_to_plane_id_valid[i] && ctx->v21.dml_to_dc_pipe_mapping.dml_pipe_idx_to_plane_id[i] == plane_id)
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_utils.h
18
int dml21_helper_find_dml_pipe_idx_by_stream_id(struct dml2_context *ctx, unsigned int stream_id);
sys/dev/pci/drm/amd/display/dc/dml2/dml21/dml21_utils.h
19
int dml21_find_dml_pipe_idx_by_plane_id(struct dml2_context *ctx, unsigned int plane_id);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1003
result &= ctx->config.callbacks.update_pipes_for_stream_with_slice_count(
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1006
ctx->config.callbacks.dc->res_pool,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1012
static bool map_dc_pipes_with_callbacks(struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1021
populate_odm_factors(ctx, disp_cfg, mapping, state, ctx->pipe_combine_scratch.odm_factors);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1023
populate_mpc_factors_for_stream(ctx, disp_cfg, mapping, state,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1024
i, ctx->pipe_combine_scratch.odm_factors[i], ctx->pipe_combine_scratch.mpc_factors[i]);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1026
result &= unmap_dc_pipes_for_stream(ctx, state, existing_state, state->streams[i],
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1027
&state->stream_status[i], ctx->pipe_combine_scratch.odm_factors[i], ctx->pipe_combine_scratch.mpc_factors[i]);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1029
result &= map_dc_pipes_for_stream(ctx, state, existing_state, state->streams[i],
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1030
&state->stream_status[i], ctx->pipe_combine_scratch.odm_factors[i], ctx->pipe_combine_scratch.mpc_factors[i]);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1035
bool dml2_map_dc_pipes(struct dml2_context *ctx, struct dc_state *state, const struct dml_display_cfg_st *disp_cfg, struct dml2_dml_to_dc_pipe_mapping *mapping, const struct dc_state *existing_state)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1050
if (ctx->config.map_dc_pipes_with_callbacks)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1052
ctx, state, disp_cfg, mapping, existing_state);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1054
if (ctx->architecture == dml2_architecture_21) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1062
odm_mode_array[i] = ctx->v21.mode_programming.programming->stream_programming[i].num_odms_required;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1063
dpp_per_surface_array[i] = ctx->v21.mode_programming.programming->plane_programming[i].num_dpps_required;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1083
if (ctx->architecture == dml2_architecture_20) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
109
static struct pipe_ctx *find_master_pipe_of_stream(struct dml2_context *ctx, struct dc_state *state, unsigned int stream_id)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1094
} else if (ctx->architecture == dml2_architecture_21) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1114
map_pipes_for_stream(ctx, state, state->streams[stream_index], &scratch, existing_state);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1119
if (get_plane_id(ctx, state, state->stream_status[stream_index].plane_states[plane_index],
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
113
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1144
map_pipes_for_plane(ctx, state, state->streams[stream_index],
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1154
if (!validate_pipe_assignment(ctx, state, disp_cfg, mapping))
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1157
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1161
if (!ctx->config.callbacks.build_scaling_params(pipe)) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1166
if (ctx->config.callbacks.build_test_pattern_params &&
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
1170
ctx->config.callbacks.build_test_pattern_params(&state->res_ctx, pipe);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
123
static struct pipe_ctx *find_master_pipe_of_plane(struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
129
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
130
if (state->res_ctx.pipe_ctx[i].plane_state && get_plane_id(ctx, state, state->res_ctx.pipe_ctx[i].plane_state,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
132
ctx->v20.scratch.dml_to_dc_pipe_mapping.dml_pipe_idx_to_plane_index[state->res_ctx.pipe_ctx[i].pipe_idx], &plane_id_assigned_to_pipe)) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
141
static unsigned int find_pipes_assigned_to_plane(struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
148
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
154
get_plane_id(ctx, state, pipe->plane_state, pipe->stream->stream_id,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
155
ctx->v20.scratch.dml_to_dc_pipe_mapping.dml_pipe_idx_to_plane_index[pipe->pipe_idx],
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
179
static bool validate_pipe_assignment(const struct dml2_context *ctx, const struct dc_state *state, const struct dml_display_cfg_st *disp_cfg, const struct dml2_dml_to_dc_pipe_mapping *mapping)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
340
static bool find_more_pipes_for_stream(struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
357
find_preferred_pipe_candidates(existing_state, ctx->config.dcn_pipe_count, stream_id, preferred_pipe_candidates);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
360
find_last_resort_pipe_candidates(existing_state, ctx->config.dcn_pipe_count, stream_id, last_resort_pipe_candidates);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
375
for (i = ctx->config.dcn_pipe_count - 1; pipes_needed > 0 && i >= 0; i--) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
406
static bool find_more_free_pipes(struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
423
find_preferred_pipe_candidates(existing_state, ctx->config.dcn_pipe_count, stream_id, preferred_pipe_candidates);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
426
find_last_resort_pipe_candidates(existing_state, ctx->config.dcn_pipe_count, stream_id, last_resort_pipe_candidates);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
441
for (i = ctx->config.dcn_pipe_count - 1; pipes_needed > 0 && i >= 0; i--) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
533
static void add_odm_slice_to_odm_tree(struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
557
static struct pipe_ctx *add_plane_to_blend_tree(struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
583
static unsigned int find_pipes_assigned_to_stream(struct dml2_context *ctx, struct dc_state *state, unsigned int stream_id, unsigned int *pipes)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
588
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
603
static struct pipe_ctx *assign_pipes_to_stream(struct dml2_context *ctx, struct dc_state *state,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
618
master_pipe = find_master_pipe_of_stream(ctx, state, stream->stream_id);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
621
pipes_assigned = find_pipes_assigned_to_stream(ctx, state, stream->stream_id, pipes);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
623
find_more_free_pipes(ctx, state, stream->stream_id, pipes, &pipes_assigned, pipes_needed - pipes_assigned, existing_state);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
637
static struct pipe_ctx *assign_pipes_to_plane(struct dml2_context *ctx, struct dc_state *state,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
654
if (!get_plane_id(ctx, state, plane, stream->stream_id, plane_index, &plane_id)) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
661
master_pipe = find_master_pipe_of_plane(ctx, state, plane_id);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
664
pipes_assigned = find_pipes_assigned_to_plane(ctx, state, plane_id, pipes);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
666
find_more_pipes_for_stream(ctx, state, stream->stream_id, pipes, &pipes_assigned, pipes_needed - pipes_assigned, existing_state);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
700
static void free_unused_pipes_for_plane(struct dml2_context *ctx, struct dc_state *state,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
704
bool is_plane_duplicate = ctx->v20.scratch.plane_duplicate_exists;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
706
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
710
ctx->v20.scratch.dml_to_dc_pipe_mapping.dml_pipe_idx_to_plane_index[state->res_ctx.pipe_ctx[i].pipe_idx] == plane_index) &&
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
717
static void remove_pipes_from_blend_trees(struct dml2_context *ctx, struct dc_state *state, struct dc_plane_pipe_pool *pipe_pool, unsigned int odm_slice)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
734
static void map_pipes_for_stream(struct dml2_context *ctx, struct dc_state *state, const struct dc_stream_state *stream,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
741
master_pipe = assign_pipes_to_stream(ctx, state, stream, scratch->odm_info.odm_factor, &scratch->pipe_pool, existing_state);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
745
remove_pipes_from_blend_trees(ctx, state, &scratch->pipe_pool, odm_slice_index);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
747
add_odm_slice_to_odm_tree(ctx, state, scratch, odm_slice_index);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
749
ctx->config.callbacks.acquire_secondary_pipe_for_mpc_odm(ctx->config.callbacks.dc, state,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
754
static void map_pipes_for_plane(struct dml2_context *ctx, struct dc_state *state, const struct dc_stream_state *stream, const struct dc_plane_state *plane,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
762
if (!get_plane_id(ctx, state, plane, stream->stream_id, plane_index, &plane_id)) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
767
master_pipe = assign_pipes_to_plane(ctx, state, stream, plane, scratch->odm_info.odm_factor,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
773
scratch->odm_info.next_higher_pipe_for_odm_slice[odm_slice_index] = add_plane_to_blend_tree(ctx, state,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
779
add_odm_slice_to_odm_tree(ctx, state, scratch, odm_slice_index);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
783
ctx->config.callbacks.acquire_secondary_pipe_for_mpc_odm(ctx->config.callbacks.dc, state,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
788
free_unused_pipes_for_plane(ctx, state, plane, &scratch->pipe_pool, stream->stream_id, plane_index);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
791
static unsigned int get_target_mpc_factor(struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
803
if (ctx->architecture == dml2_architecture_20) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
804
get_plane_id(ctx, state, status->plane_states[plane_idx],
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
808
} else if (ctx->architecture == dml2_architecture_21) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
809
if (ctx->config.svp_pstate.callbacks.get_stream_subvp_type(state, stream) == SUBVP_PHANTOM) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
814
main_stream = ctx->config.svp_pstate.callbacks.get_paired_subvp_stream(state, stream);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
820
main_stream_status = ctx->config.callbacks.get_stream_status(state, main_stream);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
827
get_plane_id(ctx, state, main_stream_status->plane_states[plane_idx],
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
830
get_plane_id(ctx, state, status->plane_states[plane_idx],
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
835
mpc_factor = ctx->v21.mode_programming.programming->plane_programming[cfg_idx].num_dpps_required;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
849
const struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
857
if (ctx->architecture == dml2_architecture_20) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
870
} else if (ctx->architecture == dml2_architecture_21) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
871
if (ctx->config.svp_pstate.callbacks.get_stream_subvp_type(state, stream) == SUBVP_PHANTOM) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
875
main_stream = ctx->config.svp_pstate.callbacks.get_paired_subvp_stream(state, stream);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
887
return ctx->v21.mode_programming.programming->stream_programming[cfg_idx].num_odms_required;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
895
static unsigned int get_source_odm_factor(const struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
899
struct pipe_ctx *otg_master = ctx->config.callbacks.get_otg_master_for_stream(&state->res_ctx, stream);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
904
return ctx->config.callbacks.get_odm_slice_count(otg_master);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
907
static unsigned int get_source_mpc_factor(const struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
912
int dpp_pipe_count = ctx->config.callbacks.get_dpp_pipes_for_plane(plane,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
916
return ctx->config.callbacks.get_mpc_slice_count(dpp_pipes[0]);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
921
struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
933
mpc_factors[i].source = get_source_mpc_factor(ctx, state, status->plane_states[i]);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
935
get_target_mpc_factor(ctx, state, disp_cfg, mapping, status, state->streams[stream_idx], i) : 1;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
939
static void populate_odm_factors(const struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
948
odm_factors[i].source = get_source_odm_factor(ctx, state, state->streams[i]);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
950
ctx, state, disp_cfg, mapping, state->streams[i]);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
954
static bool unmap_dc_pipes_for_stream(struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
967
result &= ctx->config.callbacks.update_pipes_for_plane_with_slice_count(
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
970
ctx->config.callbacks.dc->res_pool,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
974
result &= ctx->config.callbacks.update_pipes_for_stream_with_slice_count(
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
977
ctx->config.callbacks.dc->res_pool,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
983
static bool map_dc_pipes_for_stream(struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
996
result &= ctx->config.callbacks.update_pipes_for_plane_with_slice_count(
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c
999
ctx->config.callbacks.dc->res_pool,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.h
50
bool dml2_map_dc_pipes(struct dml2_context *ctx, struct dc_state *state, const struct dml_display_cfg_st *disp_cfg, struct dml2_dml_to_dc_pipe_mapping *mapping, const struct dc_state *existing_state);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
101
static void merge_pipes_for_subvp(struct dml2_context *ctx, struct dc_state *context)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
106
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
125
ctx->config.svp_pstate.callbacks.release_dsc(&context->res_ctx, ctx->config.svp_pstate.callbacks.dc->res_pool, &pipe->stream_res.dsc);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
146
static bool all_pipes_have_stream_and_plane(struct dml2_context *ctx, const struct dc_state *context)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
150
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
185
static unsigned int get_num_free_pipes(struct dml2_context *ctx, struct dc_state *state)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
191
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
202
free_pipes = ctx->config.dcn_pipe_count - num_pipes;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
228
static bool assign_subvp_pipe(struct dml2_context *ctx, struct dc_state *context, unsigned int *index)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
237
for (i = 0, pipe_idx = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
256
ctx->config.svp_pstate.callbacks.get_pipe_subvp_type(context, pipe) == SUBVP_NONE && refresh_rate < 120 &&
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
309
static bool enough_pipes_for_subvp(struct dml2_context *ctx, struct dc_state *state)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
312
unsigned int min_pipe_split = ctx->config.dcn_pipe_count + 1; // init as max number of pipes + 1
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
315
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
32
unsigned int dml2_helper_calculate_num_ways_for_subvp(struct dml2_context *ctx, struct dc_state *context)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
320
ctx->config.svp_pstate.callbacks.get_pipe_subvp_type(state, pipe) == SUBVP_NONE) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
332
free_pipes = get_num_free_pipes(ctx, state);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
336
if (free_pipes >= min_pipe_split && free_pipes < ctx->config.dcn_pipe_count)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
357
static bool subvp_subvp_schedulable(struct dml2_context *ctx, struct dc_state *context)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
367
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
375
ctx->config.svp_pstate.callbacks.get_pipe_subvp_type(context, pipe) == SUBVP_MAIN) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
376
phantom = ctx->config.svp_pstate.callbacks.get_paired_subvp_stream(context, pipe->stream);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
383
ctx->config.svp_pstate.subvp_prefetch_end_to_mall_start_us +
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
384
ctx->config.svp_pstate.subvp_fw_processing_delay_us + 1;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
431
bool dml2_svp_drr_schedulable(struct dml2_context *ctx, struct dc_state *context, struct dc_crtc_timing *drr_timing)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
448
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
457
if (ctx->config.svp_pstate.callbacks.get_pipe_subvp_type(context, pipe) == SUBVP_MAIN)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
461
phantom_stream = ctx->config.svp_pstate.callbacks.get_paired_subvp_stream(context, pipe->stream);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
466
ctx->config.svp_pstate.subvp_prefetch_end_to_mall_start_us;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
49
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
507
static bool subvp_vblank_schedulable(struct dml2_context *ctx, struct dc_state *context)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
533
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
535
pipe_mall_type = ctx->config.svp_pstate.callbacks.get_pipe_subvp_type(context, pipe);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
54
ctx->config.svp_pstate.callbacks.get_pipe_subvp_type(context, pipe) == SUBVP_PHANTOM) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
554
schedulable = dml2_svp_drr_schedulable(ctx, context, &context->res_ctx.pipe_ctx[vblank_index].stream->timing);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
556
phantom_stream = ctx->config.svp_pstate.callbacks.get_paired_subvp_stream(context, subvp_pipe->stream);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
56
mblk_width = ctx->config.mall_cfg.mblk_width_pixels;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
564
ctx->config.svp_pstate.subvp_prefetch_end_to_mall_start_us;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
57
mblk_height = bytes_per_pixel == 4 ? mblk_width = ctx->config.mall_cfg.mblk_height_4bpe_pixels : ctx->config.mall_cfg.mblk_height_8bpe_pixels;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
601
bool dml2_svp_validate_static_schedulability(struct dml2_context *ctx, struct dc_state *context, enum dml_dram_clock_change_support pstate_change_type)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
609
for (i = 0, pipe_idx = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
611
enum mall_stream_type pipe_mall_type = ctx->config.svp_pstate.callbacks.get_pipe_subvp_type(context, pipe);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
632
schedulable = subvp_subvp_schedulable(ctx, context);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
639
schedulable = subvp_vblank_schedulable(ctx, context);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
650
static void set_phantom_stream_timing(struct dml2_context *ctx, struct dc_state *state,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
664
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
675
pstate_width_fw_delay_lines = ((double)(ctx->config.svp_pstate.subvp_fw_processing_delay_us +
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
676
ctx->config.svp_pstate.subvp_pstate_allow_width_us) / 1000000) *
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
685
phantom_vactive = svp_height + pstate_width_fw_delay_lines + ctx->config.svp_pstate.subvp_swath_height_margin_lines;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
713
static struct dc_stream_state *enable_phantom_stream(struct dml2_context *ctx, struct dc_state *state, unsigned int dc_pipe_idx, unsigned int svp_height, unsigned int vstartup)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
716
struct dc_stream_state *phantom_stream = ctx->config.svp_pstate.callbacks.create_phantom_stream(
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
717
ctx->config.svp_pstate.callbacks.dc,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
725
set_phantom_stream_timing(ctx, state, ref_pipe, phantom_stream, dc_pipe_idx, svp_height, vstartup);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
727
ctx->config.svp_pstate.callbacks.add_phantom_stream(ctx->config.svp_pstate.callbacks.dc,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
734
static void enable_phantom_plane(struct dml2_context *ctx,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
747
phantom_plane = ctx->config.svp_pstate.callbacks.create_phantom_plane(
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
748
ctx->config.svp_pstate.callbacks.dc,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
775
ctx->config.svp_pstate.callbacks.add_phantom_plane(ctx->config.svp_pstate.callbacks.dc, phantom_stream, phantom_plane, state);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
782
static void add_phantom_pipes_for_main_pipe(struct dml2_context *ctx, struct dc_state *state, unsigned int main_pipe_idx, unsigned int svp_height, unsigned int vstartup)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
790
phantom_stream = enable_phantom_stream(ctx, state, main_pipe_idx, svp_height, vstartup);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
791
enable_phantom_plane(ctx, state, phantom_stream, main_pipe_idx);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
793
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
80
bytes_in_mall = num_mblks * ctx->config.mall_cfg.mblk_size_bytes;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
800
ctx->config.svp_pstate.callbacks.get_pipe_subvp_type(state, pipe) == SUBVP_PHANTOM) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
803
if (!ctx->config.svp_pstate.callbacks.build_scaling_params(pipe)) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
810
static bool remove_all_phantom_planes_for_stream(struct dml2_context *ctx, struct dc_stream_state *stream, struct dc_state *context)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
83
cache_lines_per_plane = bytes_in_mall / ctx->config.mall_cfg.cache_line_size_bytes + 2;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
832
if (!ctx->config.svp_pstate.callbacks.remove_phantom_plane(ctx->config.svp_pstate.callbacks.dc, stream, del_planes[i], context))
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
834
ctx->config.svp_pstate.callbacks.release_phantom_plane(ctx->config.svp_pstate.callbacks.dc, context, del_planes[i]);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
840
bool dml2_svp_remove_all_phantom_pipes(struct dml2_context *ctx, struct dc_state *state)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
846
for (i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
849
if (pipe->plane_state && pipe->stream && ctx->config.svp_pstate.callbacks.get_pipe_subvp_type(state, pipe) == SUBVP_PHANTOM) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
852
remove_all_phantom_planes_for_stream(ctx, phantom_stream, state);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
853
ctx->config.svp_pstate.callbacks.remove_phantom_stream(ctx->config.svp_pstate.callbacks.dc, state, phantom_stream);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
854
ctx->config.svp_pstate.callbacks.release_phantom_stream(ctx->config.svp_pstate.callbacks.dc, state, phantom_stream);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
874
bool dml2_svp_add_phantom_pipe_to_dc_state(struct dml2_context *ctx, struct dc_state *state, struct dml_mode_support_info_st *mode_support_info)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
879
if (ctx->config.svp_pstate.force_disable_subvp)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
882
if (!all_pipes_have_stream_and_plane(ctx, state))
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
888
merge_pipes_for_subvp(ctx, state);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
890
for (int i = 0; i < ctx->config.dcn_pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
896
ctx->config.svp_pstate.callbacks.build_scaling_params(pipe_ctx);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
899
if (enough_pipes_for_subvp(ctx, state) && assign_subvp_pipe(ctx, state, &dc_pipe_idx)) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
900
dml_pipe_idx = dml2_helper_find_dml_pipe_idx_by_stream_id(ctx, state->res_ctx.pipe_ctx[dc_pipe_idx].stream->stream_id);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
902
vstartup = dml_get_vstartup_calculated(&ctx->v20.dml_core_ctx, dml_pipe_idx);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
904
add_phantom_pipes_for_main_pipe(ctx, state, dc_pipe_idx, svp_height, vstartup);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
92
total_cache_lines = ctx->config.mall_cfg.max_cab_allocation_bytes / ctx->config.mall_cfg.cache_line_size_bytes;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.c
93
lines_per_way = total_cache_lines / ctx->config.mall_cfg.cache_num_ways;
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.h
42
unsigned int dml2_helper_calculate_num_ways_for_subvp(struct dml2_context *ctx, struct dc_state *context);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.h
44
bool dml2_svp_add_phantom_pipe_to_dc_state(struct dml2_context *ctx, struct dc_state *state, struct dml_mode_support_info_st *mode_support_info);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.h
46
bool dml2_svp_remove_all_phantom_pipes(struct dml2_context *ctx, struct dc_state *state);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.h
48
bool dml2_svp_validate_static_schedulability(struct dml2_context *ctx, struct dc_state *context, enum dml_dram_clock_change_support pstate_change_type);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_mall_phantom.h
50
bool dml2_svp_drr_schedulable(struct dml2_context *ctx, struct dc_state *context, struct dc_crtc_timing *drr_timing);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_utils.c
194
int dml2_helper_find_dml_pipe_idx_by_stream_id(struct dml2_context *ctx, unsigned int stream_id)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_utils.c
198
if (ctx->v20.scratch.dml_to_dc_pipe_mapping.dml_pipe_idx_to_stream_id_valid[i] && ctx->v20.scratch.dml_to_dc_pipe_mapping.dml_pipe_idx_to_stream_id[i] == stream_id)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_utils.c
205
static int find_dml_pipe_idx_by_plane_id(struct dml2_context *ctx, unsigned int plane_id)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_utils.c
209
if (ctx->v20.scratch.dml_to_dc_pipe_mapping.dml_pipe_idx_to_plane_id_valid[i] && ctx->v20.scratch.dml_to_dc_pipe_mapping.dml_pipe_idx_to_plane_id[i] == plane_id)
sys/dev/pci/drm/amd/display/dc/dml2/dml2_utils.h
44
int dml2_helper_find_dml_pipe_idx_by_stream_id(struct dml2_context *ctx, unsigned int stream_id);
sys/dev/pci/drm/amd/display/dc/dml2/dml2_wrapper.c
252
static bool does_configuration_meet_sw_policies(struct dml2_context *ctx, const struct dml_display_cfg_st *display_cfg,
sys/dev/pci/drm/amd/display/dc/dml2/dml2_wrapper.c
257
if (!ctx->config.enable_windowed_mpo_odm) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_wrapper.c
583
if ((in_dc->debug.using_dml21) && (in_dc->ctx->dce_version >= DCN_VERSION_4_01)) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_wrapper.c
591
switch (in_dc->ctx->dce_version) {
sys/dev/pci/drm/amd/display/dc/dml2/dml2_wrapper.c
629
if ((in_dc->debug.using_dml21) && (in_dc->ctx->dce_version >= DCN_VERSION_4_01))
sys/dev/pci/drm/amd/display/dc/dml2/dml2_wrapper.c
698
if ((in_dc->debug.using_dml21) && (in_dc->ctx->dce_version >= DCN_VERSION_4_01)) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c
137
dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c
138
scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c
174
if (!dpp->ctx->dc->debug.always_scale) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c
45
dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c
574
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.c
580
dpp->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp.h
1520
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
129
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
139
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
149
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
207
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
217
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
227
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
299
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
457
cm_helper_program_xfer_func(dpp->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
46
dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
486
cm_helper_program_xfer_func(dpp->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
556
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
611
cm_helper_program_xfer_func(dpp->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_cm.c
639
cm_helper_program_xfer_func(dpp->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_dscl.c
168
if (dpp->base.ctx->dc->debug.enable_mem_low_power.bits.dscl) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_dscl.c
169
dpp->base.ctx->dc->optimized_required = true;
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_dscl.c
468
if (dpp->base.ctx->dc->debug.use_max_lb) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_dscl.c
47
dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_dscl.c
619
dpp_base, scl_data, dpp_base->ctx->dc->debug.always_scale);
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_dscl.c
630
if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.dscl) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn10/dcn10_dpp_dscl.c
659
if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.dscl)
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp.c
408
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp.c
414
dpp->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp.c
45
dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp.h
776
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c
203
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c
259
cm_helper_read_color_matrices(dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c
267
cm_helper_read_color_matrices(dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c
357
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c
43
dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c
465
cm_helper_program_xfer_func(dpp->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c
493
cm_helper_program_xfer_func(dpp->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/dpp/dcn20/dcn20_dpp_cm.c
57
if (dpp_base->ctx->dc->debug.cm_in_bypass)
sys/dev/pci/drm/amd/display/dc/dpp/dcn201/dcn201_dpp.c
203
dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
sys/dev/pci/drm/amd/display/dc/dpp/dcn201/dcn201_dpp.c
204
scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
sys/dev/pci/drm/amd/display/dc/dpp/dcn201/dcn201_dpp.c
251
if (!dpp->ctx->dc->debug.always_scale) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn201/dcn201_dpp.c
299
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn201/dcn201_dpp.c
305
dpp->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dpp/dcn201/dcn201_dpp.c
38
dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn201/dcn201_dpp.h
77
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
1207
if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm)
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
1401
if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm)
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
1505
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
1511
dpp->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
152
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
37
dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
467
dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
468
scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
506
if (!dpp->ctx->dc->debug.always_scale) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
573
if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
578
dpp_base->ctx->dc->optimized_required = true;
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
590
if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
595
dpp_base->ctx->dc->optimized_required = true;
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
607
if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
612
dpp_base->ctx->dc->optimized_required = true;
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
719
cm_helper_program_gamcor_xfer_func(dpp->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c
747
cm_helper_program_gamcor_xfer_func(dpp->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h
581
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c
132
if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c
137
dpp_base->ctx->dc->optimized_required = true;
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c
227
if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.cm)
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c
293
cm_helper_program_gamcor_xfer_func(dpp_base->ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c
352
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c
362
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c
37
dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c
430
cm_helper_read_color_matrices(dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c
438
cm_helper_read_color_matrices(dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn30/dcn30_dpp_cm.c
51
if (dpp_base->ctx->dc->debug.cm_in_bypass)
sys/dev/pci/drm/amd/display/dc/dpp/dcn32/dcn32_dpp.c
148
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn32/dcn32_dpp.c
154
dpp->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dpp/dcn32/dcn32_dpp.h
32
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c
129
struct dcn3_dpp *dpp, struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c
134
bool ret = dpp32_construct(dpp, ctx, inst, tf_regs,
sys/dev/pci/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c
141
if (dpp->base.ctx->asic_id.hw_internal_rev < 0x40)
sys/dev/pci/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c
33
#define CTX dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.h
57
bool dpp35_construct(struct dcn3_dpp *dpp3, struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp.c
263
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp.c
269
dpp->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp.c
39
dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp.h
687
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c
213
dpp->base.ctx,
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_cm.c
46
dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
1065
dpp_base, scl_data, dpp_base->ctx->dc->debug.always_scale);
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
1094
if ((dpp->base.ctx->dc->config.use_spl) && (!dpp->base.ctx->dc->debug.disable_spl)) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
1104
if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.dscl) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
1133
if (dpp_base->ctx->dc->debug.enable_mem_low_power.bits.dscl)
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
1143
if (dpp->base.ctx->dc->config.prefer_easf)
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
1183
if (dpp->base.ctx->dc->config.prefer_easf)
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
160
if (dpp->base.ctx->dc->debug.enable_mem_low_power.bits.dscl) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
161
dpp->base.ctx->dc->optimized_required = true;
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
288
if ((dpp->base.ctx->dc->config.use_spl) && (!dpp->base.ctx->dc->debug.disable_spl)) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
47
dpp->base.ctx
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
474
if (dpp->base.ctx->dc->debug.use_max_lb) {
sys/dev/pci/drm/amd/display/dc/dpp/dcn401/dcn401_dpp_dscl.c
521
if ((dpp->base.ctx->dc->config.use_spl) && (!dpp->base.ctx->dc->debug.disable_spl)) {
sys/dev/pci/drm/amd/display/dc/dsc/dc_dsc.c
37
dsc->ctx->logger
sys/dev/pci/drm/amd/display/dc/dsc/dc_dsc.c
596
if (!dsc || !dsc->ctx || !dsc->ctx->dc || !dsc->funcs->dsc_get_single_enc_caps)
sys/dev/pci/drm/amd/display/dc/dsc/dc_dsc.c
599
dc = dsc->ctx->dc;
sys/dev/pci/drm/amd/display/dc/dsc/dc_dsc.c
644
if (dsc && dsc->ctx->dc) {
sys/dev/pci/drm/amd/display/dc/dsc/dc_dsc.c
645
if (dsc->ctx->dc->clk_mgr &&
sys/dev/pci/drm/amd/display/dc/dsc/dc_dsc.c
646
dsc->ctx->dc->clk_mgr->funcs->get_max_clock_khz) {
sys/dev/pci/drm/amd/display/dc/dsc/dc_dsc.c
648
max_dispclk_khz = dsc->ctx->dc->clk_mgr->funcs->get_max_clock_khz(dsc->ctx->dc->clk_mgr, CLK_TYPE_DISPCLK);
sys/dev/pci/drm/amd/display/dc/dsc/dc_dsc.c
674
if (!dsc || !dsc->ctx || !dsc->ctx->dc || dsc->ctx->dc->debug.disable_dsc)
sys/dev/pci/drm/amd/display/dc/dsc/dc_dsc.c
684
if (dsc->ctx->dc->debug.native422_support)
sys/dev/pci/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c
49
dsc20->base.ctx
sys/dev/pci/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c
58
dsc->ctx->logger
sys/dev/pci/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c
63
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.c
69
dsc->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dsc/dcn20/dcn20_dsc.h
595
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c
46
dsc20->base.ctx
sys/dev/pci/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c
57
dsc->ctx->logger
sys/dev/pci/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c
60
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.c
66
dsc->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dsc/dcn35/dcn35_dsc.h
51
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c
33
dsc401->base.ctx
sys/dev/pci/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c
42
dsc->ctx->logger
sys/dev/pci/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c
48
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.c
54
dsc->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dsc/dcn401/dcn401_dsc.h
329
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_cm_common.h
58
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_cm_common.h
62
bool cm3_helper_translate_curve_to_hw_format(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_dwb.c
258
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_dwb.c
264
dwbc30->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_dwb.c
37
dwbc30->base.ctx
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_dwb.c
44
dwbc30->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_dwb.h
878
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_dwb_cm.c
110
cm_helper_program_gamcor_xfer_func(dwbc30->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_dwb_cm.c
143
cm_helper_program_gamcor_xfer_func(dwbc30->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_dwb_cm.c
286
cm_helper_translate_curve_to_hw_format(dwbc->ctx,
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_dwb_cm.c
329
dwbc30->base.ctx,
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_dwb_cm.c
338
dwbc30->base.ctx,
sys/dev/pci/drm/amd/display/dc/dwb/dcn30/dcn30_dwb_cm.c
40
dwbc30->base.ctx
sys/dev/pci/drm/amd/display/dc/dwb/dcn35/dcn35_dwb.c
31
dwbc30->base.ctx
sys/dev/pci/drm/amd/display/dc/dwb/dcn35/dcn35_dwb.c
40
dwbc30->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/dwb/dcn35/dcn35_dwb.c
43
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/dwb/dcn35/dcn35_dwb.c
49
dcn30_dwbc_construct(dwbc30, ctx, dwbc_regs,
sys/dev/pci/drm/amd/display/dc/dwb/dcn35/dcn35_dwb.h
53
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/gpio/gpio_base.c
290
gpio->service->factory.funcs->init_ddc_data(&gpio->hw_container.ddc, service->ctx, id, en);
sys/dev/pci/drm/amd/display/dc/gpio/gpio_base.c
293
gpio->service->factory.funcs->init_ddc_data(&gpio->hw_container.ddc, service->ctx, id, en);
sys/dev/pci/drm/amd/display/dc/gpio/gpio_base.c
296
gpio->service->factory.funcs->init_generic(&gpio->hw_container.generic, service->ctx, id, en);
sys/dev/pci/drm/amd/display/dc/gpio/gpio_base.c
299
gpio->service->factory.funcs->init_hpd(&gpio->hw_container.hpd, service->ctx, id, en);
sys/dev/pci/drm/amd/display/dc/gpio/gpio_service.c
526
ddc->ctx = service->ctx;
sys/dev/pci/drm/amd/display/dc/gpio/gpio_service.c
56
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/gpio/gpio_service.c
83
service->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/gpio/gpio_service.h
33
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/gpio/hw_ddc.c
219
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/gpio/hw_ddc.c
221
dal_hw_gpio_construct(&ddc->base, id, en, ctx);
sys/dev/pci/drm/amd/display/dc/gpio/hw_ddc.c
227
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/gpio/hw_ddc.c
242
dal_hw_ddc_construct(*hw_ddc, id, en, ctx);
sys/dev/pci/drm/amd/display/dc/gpio/hw_ddc.c
42
ddc->base.base.ctx
sys/dev/pci/drm/amd/display/dc/gpio/hw_ddc.h
43
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/gpio/hw_factory.h
41
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/gpio/hw_factory.h
46
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/gpio/hw_factory.h
51
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/gpio/hw_generic.c
105
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/gpio/hw_generic.c
120
dal_hw_generic_construct(*hw_generic, id, en, ctx);
sys/dev/pci/drm/amd/display/dc/gpio/hw_generic.c
43
generic->base.base.ctx
sys/dev/pci/drm/amd/display/dc/gpio/hw_generic.c
97
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/gpio/hw_generic.c
99
dal_hw_gpio_construct(&pin->base, id, en, ctx);
sys/dev/pci/drm/amd/display/dc/gpio/hw_generic.h
44
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/gpio/hw_gpio.c
183
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/gpio/hw_gpio.c
185
pin->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/gpio/hw_gpio.c
38
gpio->base.ctx
sys/dev/pci/drm/amd/display/dc/gpio/hw_gpio.h
116
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/gpio/hw_gpio.h
45
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/gpio/hw_hpd.c
118
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/gpio/hw_hpd.c
120
dal_hw_gpio_construct(&pin->base, id, en, ctx);
sys/dev/pci/drm/amd/display/dc/gpio/hw_hpd.c
126
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/gpio/hw_hpd.c
141
dal_hw_hpd_construct(*hw_hpd, id, en, ctx);
sys/dev/pci/drm/amd/display/dc/gpio/hw_hpd.c
41
hpd->base.base.ctx
sys/dev/pci/drm/amd/display/dc/gpio/hw_hpd.h
43
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hdcp/hdcp_msg.c
178
i2c_command.speed = link->ddc->ctx->dc->caps.i2c_speed_in_khz;
sys/dev/pci/drm/amd/display/dc/hdcp/hdcp_msg.c
181
link->ctx,
sys/dev/pci/drm/amd/display/dc/hdcp/hdcp_msg.c
36
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_link_encoder.c
32
enc3->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_link_encoder.c
43
enc3->base.ctx
sys/dev/pci/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_link_encoder.c
499
struct dc_bios *bp = enc3->base.ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_link_encoder.c
612
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_link_encoder.c
618
enc31->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_link_encoder.h
184
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_stream_encoder.c
32
enc3->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_stream_encoder.c
42
enc3->base.ctx
sys/dev/pci/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_stream_encoder.c
760
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_stream_encoder.c
771
enc3->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hpo/dcn31/dcn31_hpo_dp_stream_encoder.h
234
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hpo/dcn32/dcn32_hpo_dp_link_encoder.c
32
enc3->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hpo/dcn32/dcn32_hpo_dp_link_encoder.c
42
enc3->base.ctx
sys/dev/pci/drm/amd/display/dc/hpo/dcn32/dcn32_hpo_dp_link_encoder.c
73
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hpo/dcn32/dcn32_hpo_dp_link_encoder.c
79
enc31->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hpo/dcn32/dcn32_hpo_dp_link_encoder.h
59
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
32
hubbub1->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
34
hubbub1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
609
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
830
struct dc *dc = hubbub1->base.ctx->dc;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
927
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
934
hubbub1->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.c
943
if (ctx->dce_version == DCN_VERSION_1_01)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn10/dcn10_hubbub.h
497
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c
221
struct dc *dc = hubbub->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c
35
hubbub1->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c
45
hubbub1->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c
615
if (hubbub1->base.ctx->dc->clk_mgr->clks.prev_p_state_change_support == true &&
sys/dev/pci/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c
616
hubbub1->base.ctx->dc->clk_mgr->clks.p_state_change_support == false)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c
626
hubbub->funcs->allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c
677
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.c
682
hubbub->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn20/dcn20_hubbub.h
103
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn201/dcn201_hubbub.c
34
hubbub1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hubbub/dcn201/dcn201_hubbub.c
37
hubbub1->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn201/dcn201_hubbub.c
47
hubbub1->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn201/dcn201_hubbub.c
73
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn201/dcn201_hubbub.c
92
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn201/dcn201_hubbub.c
97
hubbub->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn201/dcn201_hubbub.h
40
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
135
if (!hubbub1->base.ctx->dc->config.skip_riommu_prefetch_wa) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
34
hubbub1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
36
hubbub1->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
46
hubbub1->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
613
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
708
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.c
713
hubbub->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn21/dcn21_hubbub.h
153
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.c
132
if (safe_to_lower || hubbub->ctx->dc->debug.disable_stutter)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.c
133
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.c
280
struct dc *dc = hubbub->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.c
33
hubbub1->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.c
35
hubbub1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.c
382
uint32_t refclk_mhz = hubbub->ctx->dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.c
494
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.c
499
hubbub3->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn30/dcn30_hubbub.h
105
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn301/dcn301_hubbub.c
32
hubbub1->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hubbub/dcn301/dcn301_hubbub.c
34
hubbub1->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn301/dcn301_hubbub.c
44
hubbub1->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn301/dcn301_hubbub.c
71
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn301/dcn301_hubbub.c
76
hubbub3->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn301/dcn301_hubbub.h
54
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
1043
if (hubbub->ctx->dc->debug.disable_clock_gate) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
1079
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
1088
hubbub3_construct(hubbub31, ctx, hubbub_regs, hubbub_shift, hubbub_mask);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
34
hubbub2->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
36
hubbub2->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
753
if (safe_to_lower || hubbub->ctx->dc->debug.disable_stutter)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
754
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c
808
struct dc *dc = hubbub->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.h
139
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
1045
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
1053
hubbub2->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
35
hubbub2->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
37
hubbub2->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
766
struct dc *dc = hubbub->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
770
(ASICREV_IS_GC_11_0_0(dc->ctx->asic_id.hw_internal_rev) ||
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
771
ASICREV_IS_GC_11_0_3(dc->ctx->asic_id.hw_internal_rev))) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
813
(ASICREV_IS_GC_11_0_0(dc->ctx->asic_id.hw_internal_rev) ||
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
814
ASICREV_IS_GC_11_0_3(dc->ctx->asic_id.hw_internal_rev))) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
970
uint32_t refclk_mhz = hubbub->ctx->dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.c
994
if (hubbub->ctx->dc->debug.disable_clock_gate) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn32/dcn32_hubbub.h
152
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
329
if (safe_to_lower || hubbub->ctx->dc->debug.disable_stutter)
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
330
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
332
hubbub32_force_usr_retraining_allow(hubbub, hubbub->ctx->dc->debug.force_usr_allow);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
37
hubbub2->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
39
hubbub2->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
521
if (hubbub->ctx->dc->debug.disable_clock_gate) {
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
530
hubbub->ctx->dc->debug.enable_fine_grain_clock_gating
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
597
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.c
605
hubbub2->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn35/dcn35_hubbub.h
148
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c
1255
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c
1263
hubbub2->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c
34
hubbub2->base.ctx
sys/dev/pci/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c
36
hubbub2->base.ctx->logger
sys/dev/pci/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c
489
hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c
491
hubbub32_force_usr_retraining_allow(hubbub, hubbub->ctx->dc->debug.force_usr_allow);
sys/dev/pci/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c
831
struct dc *dc = hubbub->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.h
198
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c
1404
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c
1411
hubp1->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c
35
hubp1->base.ctx
sys/dev/pci/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.h
802
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c
1360
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c
1369
DC_LOGGER_INIT(ctx->logger);
sys/dev/pci/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c
1702
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c
1709
hubp2->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c
34
ctx->logger
sys/dev/pci/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.c
41
hubp2->base.ctx
sys/dev/pci/drm/amd/display/dc/hubp/dcn20/dcn20_hubp.h
309
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.c
140
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.c
147
hubp201->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.c
36
hubp201->base.ctx
sys/dev/pci/drm/amd/display/dc/hubp/dcn201/dcn201_hubp.h
126
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c
254
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c
263
DC_LOGGER_INIT(ctx->logger);
sys/dev/pci/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c
35
ctx->logger
sys/dev/pci/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c
42
hubp21->base.ctx
sys/dev/pci/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c
694
dc_wake_and_execute_dmub_cmd(hubp->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c
796
if (hubp->ctx->dc->debug.enable_dmcub_surface_flip && address->type == PLN_ADDR_TYPE_VIDEO_PROGRESSIVE)
sys/dev/pci/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c
848
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.c
855
hubp21->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubp/dcn21/dcn21_hubp.h
116
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c
39
hubp2->base.ctx
sys/dev/pci/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c
567
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.c
574
hubp2->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubp/dcn30/dcn30_hubp.h
251
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.c
120
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.c
127
hubp2->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.c
36
hubp2->base.ctx
sys/dev/pci/drm/amd/display/dc/hubp/dcn31/dcn31_hubp.h
238
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c
216
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c
223
hubp2->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.c
36
hubp2->base.ctx
sys/dev/pci/drm/amd/display/dc/hubp/dcn32/dcn32_hubp.h
64
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c
228
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c
235
hubp2->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c
34
hubp2->base.ctx
sys/dev/pci/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.c
52
hubp35_set_fgcg(hubp, hubp->ctx->dc->debug.enable_fine_grain_clock_gating.bits.dchub);
sys/dev/pci/drm/amd/display/dc/hubp/dcn35/dcn35_hubp.h
53
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c
1081
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c
1088
hubp2->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c
37
hubp2->base.ctx
sys/dev/pci/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.h
319
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dce/dce_hwseq.c
32
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dce100/dce100_hwseq.c
80
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce100/dce100_hwseq.c
97
dm_write_reg(ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1020
ctx->dc->link_srv->edp_receiver_ready_T7(link);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1029
if (ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1030
ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1032
ctx->dc_bios->funcs->enable_lvtma_control(ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1036
ctx->dc_bios->funcs->enable_lvtma_control(ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1041
link_transmitter_control(ctx->dc_bios, &cntl);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1053
ctx->dc->link_srv->edp_backlight_enable_aux(link, enable);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1065
ctx->dc->link_srv->edp_add_delay_for_T9(link);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1089
dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1125
dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1153
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1190
if (!(dc->ctx->dce_version >= DCN_VERSION_3_5)) {
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
132
static void dce110_init_pte(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
140
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
160
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
163
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1797
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1811
enable_display_pipe_clock_gating(ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1866
dc->ctx->dce_version < DCN_VERSION_3_15)
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1924
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
1937
if (edp_num && edp_stream_num && dc->ctx->dce_version > DCE_VERSION_10_0) {
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
195
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
201
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
2027
bios_set_scratch_acc_mode_change(dc->ctx->dc_bios, 1);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
215
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
2184
struct dc *dc = pipe_ctx[0]->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
2212
if (!dc->ctx->fbc_gpu_addr)
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
2279
compr->compr_surface_address.quad_part = dc->ctx->fbc_gpu_addr;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
241
dm_write_reg(ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
2456
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
247
dce110_init_pte(ctx);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
2494
dc, i, dc->ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
2686
struct dc_context *ctx = dc_ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
2728
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
2774
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
2819
bp = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
2831
dc->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
3083
dc, fe_idx, dc->ctx->dc_bios, PIPE_GATING_CONTROL_ENABLE);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
3126
.ref_clk_khz = pipe_ctx->stream->ctx->dc->res_pool->ref_clocks.xtalin_clock_inKhz,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
3190
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
3277
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
3341
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
713
struct dc_context *ctx = link->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
741
hpd = ctx->dc->link_srv->get_hpd_gpio(ctx->dc_bios, connector, ctx->gpio_service);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
786
struct dc_context *ctx = link->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
803
unsigned long long current_ts = dm_get_timestamp(ctx);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
806
ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
808
ctx->dc->link_srv->dp_trace_get_edp_poweroff_timestamp(link)), 1000000);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
811
ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
813
ctx->dc->link_srv->dp_trace_get_edp_poweron_timestamp(link)), 1000000);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
819
ctx->dc->link_srv->dp_trace_get_edp_poweroff_timestamp(link),
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
820
ctx->dc->link_srv->dp_trace_get_edp_poweron_timestamp(link),
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
835
if (ctx->dc->link_srv->dp_trace_get_edp_poweroff_timestamp(link) != 0) {
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
86
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
874
if (ctx->dc->ctx->dmub_srv &&
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
875
ctx->dc->debug.dmub_command_table) {
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
878
bp_result = ctx->dc_bios->funcs->enable_lvtma_control(ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
882
bp_result = ctx->dc_bios->funcs->enable_lvtma_control(ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
888
bp_result = link_transmitter_control(ctx->dc_bios, &cntl);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
89
ctx->logger
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
895
ctx->dc->link_srv->dp_trace_set_edp_power_timestamp(link, power_up);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
900
ctx->dc->link_srv->dp_trace_get_edp_poweroff_timestamp(link),
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
901
ctx->dc->link_srv->dp_trace_get_edp_poweron_timestamp(link));
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
91
struct dc_context *ctx = dc->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
917
struct dc_context *ctx = link->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
929
ctx->dc->link_srv->dp_trace_get_edp_poweroff_timestamp(link) != 0) {
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
931
unsigned long long current_ts = dm_get_timestamp(ctx);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
934
ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
936
ctx->dc->link_srv->dp_trace_get_edp_poweroff_timestamp(link)), 1000000);
sys/dev/pci/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
953
struct dc_context *ctx = link->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce112/dce112_hwseq.c
109
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/hwss/dce112/dce112_hwseq.c
121
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce112/dce112_hwseq.c
138
dm_write_reg(ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dce112/dce112_hwseq.c
144
dce112_init_pte(ctx);
sys/dev/pci/drm/amd/display/dc/hwss/dce112/dce112_hwseq.c
69
static void dce112_init_pte(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/hwss/dce112/dce112_hwseq.c
77
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c
114
value = dm_read_reg(ctx, addr);
sys/dev/pci/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c
146
dm_write_reg(ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c
161
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c
178
dm_write_reg(ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c
184
dce120_init_pte(ctx, controller_id);
sys/dev/pci/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c
42
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dce120/dce120_hwseq.c
84
static void dce120_init_pte(struct dc_context *ctx, uint8_t controller_id)
sys/dev/pci/drm/amd/display/dc/hwss/dce60/dce60_hwseq.c
129
compr->compr_surface_address.quad_part = dc->ctx->fbc_gpu_addr;
sys/dev/pci/drm/amd/display/dc/hwss/dce60/dce60_hwseq.c
63
if (!dc->ctx->fbc_gpu_addr)
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1011
DC_LOGGER_INIT(hws->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1086
struct dc_bios *bp = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1119
!dc->res_pool->hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1288
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1492
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1556
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1765
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1787
if (!dc_dmub_srv_optimized_init_done(dc->ctx->dmub_srv))
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1791
if (dc->ctx->dc_bios->fw_info_valid) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1793
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1798
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency,
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
1851
!dc->res_pool->hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
2043
if (!dpp_base->ctx->dc->debug.always_use_regamma
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
2084
static void log_tf(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
2129
else if (cm_helper_translate_curve_to_hw_format(dc->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
2138
if (stream->ctx) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
2139
log_tf(stream->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
2255
dmub_hw_lock_mgr_cmd(dc->ctx->dmub_srv,
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
2386
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
2397
dc->res_pool->dp_clock_source->ctx->dc->clk_mgr->dprefclk_khz*10;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
2479
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
254
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
2545
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
2626
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
268
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
296
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
3524
if (!dc_set_generic_gpio_for_stereo(true, dc->ctx->gpio_service))
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
3525
dc_set_generic_gpio_for_stereo(false, dc->ctx->gpio_service);
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
3527
dc_set_generic_gpio_for_stereo(false, dc->ctx->gpio_service);
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
3602
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
3637
struct hubbub *hubbub = hws->ctx->dc->res_pool->hubbub;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
3650
.ref_clk_khz = pipe_ctx->stream->ctx->dc->res_pool->ref_clocks.dchub_ref_clock_inKhz,
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
452
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
613
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
67
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
902
if (hws->ctx->dc->debug.disable_dpp_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
963
if (hws->ctx->dc->debug.disable_hubp_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
1033
struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
1050
cm_helper_translate_curve_to_hw_format(dc->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
1079
cm_helper_translate_curve_to_hw_format(plane_state->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
1099
cm_helper_translate_curve_to_hw_format(plane_state->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
1286
DC_LOGGER_INIT(hws->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
1470
dmub_hw_lock_mgr_cmd(dc->ctx->dmub_srv,
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
1862
params.subvp_save_surf_addr.dc_dmub_srv = dc->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
2054
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
2819
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
2879
&& dc->ctx->dce_version >= DCN_VERSION_3_5) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
3029
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
483
if (hws->ctx->dc->debug.disable_dsc_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
559
if (hws->ctx->dc->debug.disable_dpp_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
620
struct dpp *dpp5 = hws->ctx->dc->res_pool->dpps[dpp_inst];
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
641
if (hws->ctx->dc->debug.disable_hubp_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
66
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
755
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn20/dcn20_hwseq.c
77
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.c
239
if (dc->ctx->dc_bios->fw_info_valid) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.c
241
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
sys/dev/pci/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.c
245
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency,
sys/dev/pci/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.c
44
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.c
50
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.c
560
gpu_addr_to_uma(pipe_ctx->stream->ctx->dc->hwseq, &attributes->address);
sys/dev/pci/drm/amd/display/dc/hwss/dcn201/dcn201_hwseq.c
573
gpu_addr_to_uma(pipe_ctx->stream->ctx->dc->hwseq,
sys/dev/pci/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c
135
pipe_ctx->stream->ctx->dc->link_srv->set_dpms_on(context, pipe_ctx);
sys/dev/pci/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c
136
pipe_ctx->stream->ctx->dc->link_srv->set_dpms_off(pipe_ctx);
sys/dev/pci/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c
144
struct dc_context *dc = abm->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c
184
struct dmcu *dmcu = pipe_ctx->stream->ctx->dc->res_pool->dmcu;
sys/dev/pci/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c
217
struct dmcu *dmcu = pipe_ctx->stream->ctx->dc->res_pool->dmcu;
sys/dev/pci/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c
247
struct dc_context *dc = pipe_ctx->stream->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn21/dcn21_hwseq.c
43
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
1065
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
1081
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_NO_WAIT);
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
1098
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
241
result = cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
258
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
259
struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
270
cm_helper_translate_curve_to_hw_format(stream->ctx, stream->func_shaper,
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
336
cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
343
if (pipe_ctx->stream_res.opp && pipe_ctx->stream_res.opp->ctx) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
360
struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
396
struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
409
cm3_helper_translate_curve_to_hw_format(stream->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
61
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
642
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
65
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
679
if (dc->ctx->dc_bios->fw_info_valid) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
681
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
686
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency,
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
737
!dc->res_pool->hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
75
struct dc_context *dc_ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
825
dc_dmub_srv_query_caps_cmd(dc->ctx->dmub_srv);
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
826
dc->caps.dmub_caps.psr = dc->ctx->dmub_srv->dmub->feature_caps.psr;
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
827
dc->caps.dmub_caps.mclk_sw = dc->ctx->dmub_srv->dmub->feature_caps.fw_assisted_mclk_switch_ver;
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
918
if (!dc->ctx->dmub_srv)
sys/dev/pci/drm/amd/display/dc/hwss/dcn30/dcn30_hwseq.c
939
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_NO_WAIT);
sys/dev/pci/drm/amd/display/dc/hwss/dcn301/dcn301_hwseq.c
34
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn302/dcn302_hwseq.c
107
if (hws->ctx->dc->debug.disable_hubp_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn302/dcn302_hwseq.c
165
if (hws->ctx->dc->debug.disable_dsc_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn302/dcn302_hwseq.c
36
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn302/dcn302_hwseq.c
50
if (hws->ctx->dc->debug.disable_dpp_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn303/dcn303_hwseq.c
37
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
113
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
133
if (dc->ctx->dc_bios->fw_info_valid) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
135
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
140
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency,
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
216
!dc->res_pool->hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
276
dc_dmub_srv_query_caps_cmd(dc->ctx->dmub_srv);
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
277
dc->caps.dmub_caps.psr = dc->ctx->dmub_srv->dmub->feature_caps.psr;
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
278
dc->caps.dmub_caps.mclk_sw = dc->ctx->dmub_srv->dmub->feature_caps.fw_assisted_mclk_switch_ver;
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
290
if (hws->ctx->dc->debug.disable_dsc_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
293
if (hws->ctx->dc->debug.root_clock_optimization.bits.dsc &&
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
294
hws->ctx->dc->res_pool->dccg->funcs->enable_dsc &&
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
296
hws->ctx->dc->res_pool->dccg->funcs->enable_dsc(
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
297
hws->ctx->dc->res_pool->dccg, dsc_inst);
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
336
if (hws->ctx->dc->debug.root_clock_optimization.bits.dsc) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
337
if (hws->ctx->dc->res_pool->dccg->funcs->disable_dsc && !power_on)
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
338
hws->ctx->dc->res_pool->dccg->funcs->disable_dsc(
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
339
hws->ctx->dc->res_pool->dccg, dsc_inst);
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
352
if (enable && !hws->ctx->dc->debug.disable_hubp_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
366
if (enable && !hws->ctx->dc->debug.disable_dsc_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
398
else if (pipe_ctx->stream->ctx->dc->link_srv->dp_is_128b_132b_signal(pipe_ctx)) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
427
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
438
if (!dc_dmub_srv_is_restore_required(dc->ctx->dmub_srv))
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
445
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
453
if (hws->ctx->dc->debug.disable_hubp_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
518
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
59
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
63
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
662
if (hws->ctx->dc->debug.hpo_optimization)
sys/dev/pci/drm/amd/display/dc/hwss/dcn31/dcn31_hwseq.c
710
struct dc_context *dc = pipe_ctx->stream->ctx;
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
233
if (hws->ctx->dc->debug.disable_dsc_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
236
if (hws->ctx->dc->debug.root_clock_optimization.bits.dsc &&
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
237
hws->ctx->dc->res_pool->dccg->funcs->enable_dsc &&
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
239
hws->ctx->dc->res_pool->dccg->funcs->enable_dsc(
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
240
hws->ctx->dc->res_pool->dccg, dsc_inst);
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
287
if (hws->ctx->dc->debug.root_clock_optimization.bits.dsc) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
288
if (hws->ctx->dc->res_pool->dccg->funcs->disable_dsc && !power_on)
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
289
hws->ctx->dc->res_pool->dccg->funcs->disable_dsc(
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
290
hws->ctx->dc->res_pool->dccg, dsc_inst);
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
300
if (enable && !hws->ctx->dc->debug.disable_hubp_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
314
if (enable && !hws->ctx->dc->debug.disable_dsc_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
336
if (stream->ctx->dc->link_srv->dp_is_128b_132b_signal(pipe_ctx)) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
425
hws->ctx->dc->res_pool->dccg->funcs->trigger_dio_fifo_resync(hws->ctx->dc->res_pool->dccg);
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
457
if (!hws->ctx->dc->debug.root_clock_optimization.bits.dpp)
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
460
if (hws->ctx->dc->res_pool->dccg->funcs->dpp_root_clock_control)
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
461
hws->ctx->dc->res_pool->dccg->funcs->dpp_root_clock_control(
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
462
hws->ctx->dc->res_pool->dccg, dpp_inst, clock_on);
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
482
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
507
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
551
if (hws->ctx->dc->debug.disable_dpp_power_gate) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
556
struct dpp *dpp = hws->ctx->dc->res_pool->dpps[dpp_inst];
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
61
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn314/dcn314_hwseq.c
65
stream->ctx->logger
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
1016
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
1188
struct dce_hwseq *hws = stream->ctx->dc->hwseq;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
1193
if (stream->ctx->dc->link_srv->dp_is_128b_132b_signal(pipe_ctx)) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
1270
hws->ctx->dc->res_pool->dccg->funcs->trigger_dio_fifo_resync(hws->ctx->dc->res_pool->dccg);
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
1345
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
1373
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
1398
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
168
if (hws->ctx->dc->debug.disable_hubp_power_gate)
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
220
static uint32_t dcn32_calculate_cab_allocation(struct dc *dc, struct dc_state *ctx)
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
226
mall_ss_size_bytes = ctx->bw_ctx.bw.dcn.mall_ss_size_bytes;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
232
struct pipe_ctx *pipe = &ctx->res_ctx.pipe_ctx[i];
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
261
if (!dc->ctx->dmub_srv)
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
284
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_NO_WAIT);
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
318
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_NO_WAIT);
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
335
dc_wake_and_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
350
if (!dc->ctx || !dc->ctx->dmub_srv)
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
417
dmub_hw_lock_mgr_inbox0_cmd(dc->ctx->dmub_srv, hw_lock_cmd);
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
435
dmub_hw_lock_mgr_inbox0_cmd(dc->ctx->dmub_srv, hw_lock_cmd);
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
444
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
445
struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
454
cm_helper_translate_curve_to_hw_format(stream->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
481
struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
489
result = cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
505
cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
547
cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
555
pipe_ctx->stream_res.opp->ctx &&
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
567
struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
580
cm3_helper_translate_curve_to_hw_format(stream->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
59
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
63
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
77
struct dc *dc = hws->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
782
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
812
if (dc->ctx->dc_bios->fw_info_valid) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
814
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
818
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency,
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
880
!dc->res_pool->hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
983
dc->res_pool->hubbub->funcs->set_request_limit(dc->res_pool->hubbub, dc->ctx->dc_bios->vram_info.num_chans, dc->config.sdpif_request_limit_words_per_umc);
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
986
if (dc->ctx->dmub_srv) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
987
dc_dmub_srv_query_caps_cmd(dc->ctx->dmub_srv);
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
988
dc->caps.dmub_caps.psr = dc->ctx->dmub_srv->dmub->feature_caps.psr;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
989
dc->caps.dmub_caps.subvp_psr = dc->ctx->dmub_srv->dmub->feature_caps.subvp_psr_support;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
990
dc->caps.dmub_caps.gecc_enable = dc->ctx->dmub_srv->dmub->feature_caps.gecc_enable;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
991
dc->caps.dmub_caps.mclk_sw = dc->ctx->dmub_srv->dmub->feature_caps.fw_assisted_mclk_switch_ver;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
992
dc->caps.dmub_caps.aux_backlight_support = dc->ctx->dmub_srv->dmub->feature_caps.abm_aux_backlight_support;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
995
dc->caps.dmub_caps.fams_ver = dc->ctx->dmub_srv->dmub->feature_caps.fw_assisted_mclk_switch_ver;
sys/dev/pci/drm/amd/display/dc/hwss/dcn32/dcn32_hwseq.c
999
} else if (dc->ctx->dmub_srv->dmub->fw_version <
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
142
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
1425
if (pipe_ctx[i]->stream && pipe_ctx[i]->stream->ctx->dc->debug.static_screen_wait_frames) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
1427
struct dc *dc = pipe_ctx[i]->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
1547
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
166
if (dc->ctx->dc_bios->fw_info_valid) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
168
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
173
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency,
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
249
!dc->res_pool->hubbub->ctx->dc->debug.disable_stutter)
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
251
!dc->res_pool->hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
267
if (dc->ctx->dmub_srv) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
311
dc->res_pool->hubbub->funcs->set_request_limit(dc->res_pool->hubbub, dc->ctx->dc_bios->vram_info.num_chans, dc->config.sdpif_request_limit_words_per_umc);
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
313
if (dc->ctx->dmub_srv) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
314
dc_dmub_srv_query_caps_cmd(dc->ctx->dmub_srv);
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
315
dc->caps.dmub_caps.psr = dc->ctx->dmub_srv->dmub->feature_caps.psr;
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
316
dc->caps.dmub_caps.mclk_sw = dc->ctx->dmub_srv->dmub->feature_caps.fw_assisted_mclk_switch_ver;
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
317
dc->caps.dmub_caps.aux_backlight_support = dc->ctx->dmub_srv->dmub->feature_caps.abm_aux_backlight_support;
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
334
DC_LOGGER_INIT(stream->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
482
if (!hws->ctx->dc->debug.root_clock_optimization.bits.dpp)
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
485
if (hws->ctx->dc->res_pool->dccg->funcs->dpp_root_clock_control) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
486
hws->ctx->dc->res_pool->dccg->funcs->dpp_root_clock_control(
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
487
hws->ctx->dc->res_pool->dccg, dpp_inst, clock_on);
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
493
if (!hws->ctx->dc->debug.root_clock_optimization.bits.dpstream)
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
496
if (hws->ctx->dc->res_pool->dccg->funcs->set_dpstreamclk_root_clock_gating) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
497
hws->ctx->dc->res_pool->dccg->funcs->set_dpstreamclk_root_clock_gating(
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
498
hws->ctx->dc->res_pool->dccg, dp_hpo_inst, clock_on);
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
504
if (!hws->ctx->dc->debug.root_clock_optimization.bits.physymclk)
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
507
if (hws->ctx->dc->res_pool->dccg->funcs->set_physymclk_root_clock_gating) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
508
hws->ctx->dc->res_pool->dccg->funcs->set_physymclk_root_clock_gating(
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
509
hws->ctx->dc->res_pool->dccg, phy_inst, clock_on);
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
65
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn35/dcn35_hwseq.c
904
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1023
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1044
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1080
.ref_clk_khz = pipe_ctx->stream->ctx->dc->res_pool->ref_clocks.dchub_ref_clock_inKhz,
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1240
static uint32_t dcn401_calculate_cab_allocation(struct dc *dc, struct dc_state *ctx)
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1246
mall_ss_size_bytes = ctx->bw_ctx.bw.dcn.mall_ss_size_bytes;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1252
struct pipe_ctx *pipe = &ctx->res_ctx.pipe_ctx[i];
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1279
if (!dc->ctx->dmub_srv || !dc->current_state)
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1340
dm_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
140
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1485
if (!dc->ctx || !dc->ctx->dmub_srv || !dc->debug.fams2_config.bits.enable)
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1492
dmub_hw_lock_mgr_inbox0_cmd(dc->ctx->dmub_srv, hw_lock_cmd);
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1507
dmub_hw_lock_mgr_inbox0_cmd(dc->ctx->dmub_srv, hw_lock_cmd);
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1515
if (!dc->ctx || !dc->ctx->dmub_srv || !dc->debug.fams2_config.bits.enable)
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1637
if (dc->ctx->dmub_srv && dc->debug.fams2_config.bits.enable)
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1659
if (dc->ctx->dmub_srv && dc->debug.fams2_config.bits.enable)
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
176
if (dc->ctx->dc_bios->fw_info_valid) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
178
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
1819
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
182
dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency,
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
2108
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
2274
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
249
!dc->res_pool->hubbub->ctx->dc->debug.disable_stutter);
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
2656
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
352
dc->res_pool->hubbub->funcs->set_request_limit(dc->res_pool->hubbub, dc->ctx->dc_bios->vram_info.num_chans, dc->config.sdpif_request_limit_words_per_umc);
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
355
if (dc->ctx->dmub_srv) {
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
356
dc_dmub_srv_query_caps_cmd(dc->ctx->dmub_srv);
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
357
dc->caps.dmub_caps.psr = dc->ctx->dmub_srv->dmub->feature_caps.psr;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
358
dc->caps.dmub_caps.mclk_sw = dc->ctx->dmub_srv->dmub->feature_caps.fw_assisted_mclk_switch_ver > 0;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
359
dc->caps.dmub_caps.fams_ver = dc->ctx->dmub_srv->dmub->feature_caps.fw_assisted_mclk_switch_ver;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
43
hws->ctx
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
436
rval = cm3_helper_translate_curve_to_hw_format(mpc->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
456
rval = cm3_helper_translate_curve_to_hw_format(mpc->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
47
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
616
struct dc *dc = pipe_ctx->stream_res.opp->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
633
rval = cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
646
rval = cm3_helper_translate_curve_to_hw_format(plane_state->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
669
struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
682
cm3_helper_translate_curve_to_hw_format(stream->ctx,
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
917
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
92
struct mpc *mpc = pipe_ctx->stream_res.opp->ctx->dc->res_pool->mpc;
sys/dev/pci/drm/amd/display/dc/hwss/dcn401/dcn401_hwseq.c
953
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/hwss/hw_sequencer.h
95
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/hwss/hw_sequencer_private.h
192
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/hwss/hw_sequencer_private.h
91
void (*enable_display_pipe_clock_gating)(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/clock_source.h
138
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/clock_source.h
158
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/clock_source.h
186
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/compressor.h
79
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/core_types.h
79
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/core_types.h
83
struct link_encoder *(*link_enc_create_minimal)(struct dc_context *ctx, enum engine_id eng_id);
sys/dev/pci/drm/amd/display/dc/inc/dce_calcs.h
481
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/hw/abm.h
33
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/audio.h
61
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/aux_engine.h
93
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/clk_mgr.h
346
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/clk_mgr.h
363
struct clk_mgr *dc_clk_mgr_create(struct dc_context *ctx, struct pp_smu_funcs *pp_smu, struct dccg *dccg);
sys/dev/pci/drm/amd/display/dc/inc/hw/clk_mgr_internal.h
73
clk_mgr->base.ctx
sys/dev/pci/drm/amd/display/dc/inc/hw/clk_mgr_internal.h
76
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/inc/hw/dccg.h
75
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/dchubbub.h
260
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/dmcu.h
49
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/dpp.h
71
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/dwb.h
158
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/gpio.h
55
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/hw/gpio.h
59
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/hw/gpio.h
63
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/hw/gpio.h
67
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/hw/gpio.h
71
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/hw/gpio.h
75
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/hw/gpio.h
79
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/hw/hubp.h
120
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/hubp.h
266
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/hw/ipp.h
38
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/link_encoder.h
236
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/link_encoder.h
50
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/link_encoder.h
81
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/mcif_wb.h
70
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/mem_input.h
84
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/mpc.h
326
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/opp.h
236
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/panel_cntl.h
58
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/panel_cntl.h
65
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/pg_cntl.h
33
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/stream_encoder.h
114
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/stream_encoder.h
293
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/timing_generator.h
187
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/transform.h
40
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/hw/vpg.h
49
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/link_service.h
85
struct dc_context *ctx; /* TODO: remove 'dal' when DC is complete. */
sys/dev/pci/drm/amd/display/dc/inc/link_service.h
94
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
391
uint32_t generic_reg_get(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
394
uint32_t generic_reg_get2(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
398
uint32_t generic_reg_get3(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
403
uint32_t generic_reg_get4(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
409
uint32_t generic_reg_get5(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
416
uint32_t generic_reg_get6(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
424
uint32_t generic_reg_get7(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
433
uint32_t generic_reg_get8(const struct dc_context *ctx, uint32_t addr,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
481
void generic_write_indirect_reg(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
485
uint32_t generic_read_indirect_reg(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
489
uint32_t generic_indirect_reg_get(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
495
uint32_t generic_indirect_reg_update_ex(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
529
uint32_t generic_indirect_reg_get_sync(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/reg_helper.h
534
uint32_t generic_indirect_reg_update_ex_sync(const struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/inc/resource.h
79
struct dc_context *ctx, struct resource_straps *straps);
sys/dev/pci/drm/amd/display/dc/inc/resource.h
82
struct dc_context *ctx, unsigned int inst);
sys/dev/pci/drm/amd/display/dc/inc/resource.h
85
enum engine_id eng_id, struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/inc/resource.h
88
enum engine_id eng_id, struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/inc/resource.h
91
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/inc/resource.h
93
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/irq/dce110/irq_service_dce110.c
206
struct dc_context *dc_ctx = irq_service->ctx;
sys/dev/pci/drm/amd/display/dc/irq/dce110/irq_service_dce110.c
207
struct dc *dc = irq_service->ctx->dc;
sys/dev/pci/drm/amd/display/dc/irq/dce110/irq_service_dce110.c
209
dc_interrupt_to_irq_source(irq_service->ctx->dc,
sys/dev/pci/drm/amd/display/dc/irq/dce110/irq_service_dce110.c
40
irq_service->ctx->logger
sys/dev/pci/drm/amd/display/dc/irq/dce110/irq_service_dce110.c
46
uint32_t value = dm_read_reg(irq_service->ctx, addr);
sys/dev/pci/drm/amd/display/dc/irq/dce110/irq_service_dce110.c
53
value = dm_read_reg(irq_service->ctx, info->enable_reg);
sys/dev/pci/drm/amd/display/dc/irq/dce110/irq_service_dce110.c
59
dm_write_reg(irq_service->ctx, info->enable_reg, value);
sys/dev/pci/drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c
166
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/irq/dcn35/irq_service_dcn35.c
378
struct dc_context *ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/irq/dcn351/irq_service_dcn351.c
145
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/irq/dcn351/irq_service_dcn351.c
360
struct dc_context *ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c
144
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/irq/dcn36/irq_service_dcn36.c
359
struct dc_context *ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
101
uint32_t value = dm_read_reg(irq_service->ctx, addr);
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
105
dm_write_reg(irq_service->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
145
uint32_t value = dm_read_reg(irq_service->ctx, addr);
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
149
dm_write_reg(irq_service->ctx, addr, value);
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
196
uint32_t value = dm_read_reg(irq_service->ctx, addr);
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
205
value = dm_read_reg(irq_service->ctx, info->enable_reg);
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
213
dm_write_reg(irq_service->ctx, info->enable_reg, value);
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
223
uint32_t value = dm_read_reg(irq_service->ctx, addr);
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
232
value = dm_read_reg(irq_service->ctx, info->enable_reg);
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
240
dm_write_reg(irq_service->ctx, info->enable_reg, value);
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
57
irq_service->ctx
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
59
irq_service->ctx->logger
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
65
if (!init_data || !init_data->ctx) {
sys/dev/pci/drm/amd/display/dc/irq/irq_service.c
70
irq_service->ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/irq/irq_service.h
67
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/dc/link/accessories/link_dp_cts.c
1014
dm_helpers_dp_mst_update_branch_bandwidth(dc->ctx, link);
sys/dev/pci/drm/amd/display/dc/link/accessories/link_dp_cts.c
40
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/accessories/link_dp_cts.c
623
test_response.bits.ACK = dm_helpers_dp_handle_test_pattern_request(link->ctx, link,
sys/dev/pci/drm/amd/display/dc/link/accessories/link_dp_cts.c
887
dmub_hw_lock_mgr_cmd(link->ctx->dmub_srv,
sys/dev/pci/drm/amd/display/dc/link/accessories/link_dp_cts.c
935
dmub_hw_lock_mgr_cmd(link->ctx->dmub_srv,
sys/dev/pci/drm/amd/display/dc/link/accessories/link_dp_trace.c
110
link->dp_trace.detect_lt_trace.timestamps.start = dm_get_timestamp(link->dc->ctx);
sys/dev/pci/drm/amd/display/dc/link/accessories/link_dp_trace.c
112
link->dp_trace.commit_lt_trace.timestamps.start = dm_get_timestamp(link->dc->ctx);
sys/dev/pci/drm/amd/display/dc/link/accessories/link_dp_trace.c
119
link->dp_trace.detect_lt_trace.timestamps.end = dm_get_timestamp(link->dc->ctx);
sys/dev/pci/drm/amd/display/dc/link/accessories/link_dp_trace.c
121
link->dp_trace.commit_lt_trace.timestamps.end = dm_get_timestamp(link->dc->ctx);
sys/dev/pci/drm/amd/display/dc/link/accessories/link_dp_trace.c
152
link->dp_trace.edp_trace_power_timestamps.poweroff = dm_get_timestamp(link->dc->ctx);
sys/dev/pci/drm/amd/display/dc/link/accessories/link_dp_trace.c
154
link->dp_trace.edp_trace_power_timestamps.poweron = dm_get_timestamp(link->dc->ctx);
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_dio.c
106
pipe_ctx->stream->ctx->dc->link_srv->dp_trace_source_sequence(
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_dio.c
275
pipe_ctx->stream->ctx->dc->link_srv->dp_trace_source_sequence(
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_dio.c
295
pipe_ctx->stream->ctx->dc->link_srv->dp_trace_source_sequence(
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_dio.c
54
if (!pipe_ctx->stream->ctx->dc->config.unify_link_enc_assignment)
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_dio.c
64
pipe_ctx->stream->ctx->dc->link_srv->dp_trace_source_sequence(pipe_ctx->stream->link,
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_dio.c
84
if (!pipe_ctx->stream->ctx->dc->config.unify_link_enc_assignment)
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_dpia.c
126
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_dpia.c
31
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_dpia.c
42
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_dpia.c
93
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c
31
#define DC_LOGGER link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/hwss/link_hwss_hpo_dp.c
55
hpo_dp_stream_encoder->ctx->dc->link_srv->dp_link_bandwidth_kbps(
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
1060
edid_status = dm_helpers_read_local_edid(link->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
1115
link->ctx->dc->debug.hdmi20_disable = true;
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
1299
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
307
.speed = ddc->ctx->dc->caps.i2c_speed_in_khz };
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
310
ddc->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
55
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
650
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
666
enter_timestamp = dm_get_timestamp(link->ctx);
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
672
finish_timestamp = dm_get_timestamp(link->ctx);
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
674
dm_get_elapse_time_in_ns(link->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
682
finish_timestamp = dm_get_timestamp(link->ctx);
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
683
time_taken_in_ns = dm_get_elapse_time_in_ns(link->ctx, finish_timestamp,
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
722
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
730
dm_helpers_dp_update_branch_info(link->ctx, link);
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
731
if (dm_helpers_dp_mst_start_top_mgr(link->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
743
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
749
return dm_helpers_dp_mst_stop_top_mgr(link->ctx, link);
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
829
link->ctx->dc,
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
880
struct dc_context *dc_ctx = link->ctx;
sys/dev/pci/drm/amd/display/dc/link/link_detection.c
888
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1081
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1211
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
123
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1340
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1362
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1416
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1420
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1440
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1449
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1499
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1504
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1563
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1665
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1749
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
175
dc_commit_updates_for_stream(link->ctx->dc, NULL, 0,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1765
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1770
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1821
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1838
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1842
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1888
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1894
stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
1973
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
2170
struct dc *dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
2201
dm_helpers_dp_mst_clear_payload_allocation_table(link->ctx, link);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
2206
dm_helpers_dp_mst_poll_pending_down_reply(link->ctx, link);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
2283
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
232
pipe_ctx->stream->ctx->dc_bios->integrated_info;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
2348
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
2354
DC_LOGGER_INIT(pipe_ctx->stream->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
2459
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
2470
DC_LOGGER_INIT(pipe_ctx->stream->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
333
cmd.speed = pipe_ctx->stream->ctx->dc->caps.i2c_speed_in_khz;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
341
if (dm_helpers_submit_i2c(pipe_ctx->stream->ctx,
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
361
DC_LOGGER_INIT(pipe_ctx->stream->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
518
DC_LOGGER_INIT(pipe_ctx->stream->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
640
DC_LOGGER_INIT(pipe_ctx->stream->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
664
struct cp_psp *cp_psp = &pipe_ctx->stream->ctx->cp_psp;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
672
if (!pipe_ctx->stream->ctx->dc->config.unify_link_enc_assignment)
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
729
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
757
DC_LOGGER_INIT(dsc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
774
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
781
result = dm_helpers_dp_write_dsc_enable(dc->ctx, stream, enable);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
787
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
794
result = dm_helpers_dp_write_hblank_reduction(dc->ctx, stream);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
808
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
824
DC_LOGGER_INIT(dsc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_dpms.c
957
DC_LOGGER_INIT(dsc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
459
struct dc_context *dc_ctx = init_params->ctx;
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
462
struct dc_bios *bios = init_params->dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
474
link->ctx = dc_ctx;
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
505
link->hpd_gpio = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
506
link->ctx->gpio_service);
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
595
ddc_service_init_data.ctx = link->ctx;
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
613
enc_init_data.ctx = dc_ctx;
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
647
panel_cntl_init_data.ctx = dc_ctx;
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
648
panel_cntl_init_data.inst = panel_cntl_init_data.ctx->dc_edp_id_count;
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
653
panel_cntl_init_data.ctx->dc_edp_id_count++;
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
764
struct dc_context *dc_ctx = init_params->ctx;
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
774
link->ctx = dc_ctx;
sys/dev/pci/drm/amd/display/dc/link/link_factory.c
797
ddc_service_init_data.ctx = link->ctx;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
114
struct gpio_service *gpio_service = init_data->ctx->gpio_service;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
117
struct dc_bios *dcb = init_data->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
120
ddc_service->ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
126
DC_LOGGER_INIT(ddc_service->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
373
if (!i2c_payloads_create(ddc->ctx, &payloads, payloads_num))
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
379
command.speed = ddc->ctx->dc->caps.i2c_speed_in_khz;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
391
ddc->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
405
if (ddc->ctx->dc->debug.enable_dmub_aux_for_legacy_ddc ||
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
42
ddc_service->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
510
ddc->ctx->dce_version == DCN_VERSION_3_1) {
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
527
if (ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]->funcs->configure_timeout) {
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
528
ddc->ctx->dc->res_pool->engines[ddc_pin->pin_data->en]->funcs->configure_timeout(ddc, timeout);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
55
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_ddc.c
60
&payloads->payloads, ctx, count, sizeof(struct i2c_payload)))
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c
1407
(uint8_t)(link->ctx->asic_id.chip_id);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c
1409
(uint8_t)(link->ctx->asic_id.chip_id >> 8);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c
1411
(uint8_t)(link->ctx->dce_version);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c
1436
if (link->ctx->dce_version >= DCN_VERSION_2_0 &&
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c
1450
link->ctx->dce_version,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c
1485
if (!link->ctx->dmub_srv ||
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c
1495
if (dc_wake_and_execute_dmub_cmd(link->dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT_WITH_REPLY) &&
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_capability.c
57
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_dpia.c
117
struct dc_dmub_srv *dmub_srv = link->ctx->dmub_srv;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_dpia.c
126
if (dc_wake_and_execute_dmub_cmd(dmub_srv->ctx, &cmd,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_dpia.c
40
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c
34
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c
130
link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c
142
link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c
160
link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c
201
link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c
219
link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c
241
link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c
249
link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_irq_handler.c
43
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_phy.c
42
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_phy.c
75
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training.c
1614
link->ctx->dc->debug_data.ltFailCount++;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training.c
1695
dm_helpers_dp_mst_update_branch_bandwidth(link->ctx, link);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training.c
1716
dm_helpers_dp_mst_update_branch_bandwidth(link->ctx, link);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training.c
52
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training_128b_132b.c
37
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training_8b_10b.c
242
if (!link->ctx->dc->work_arounds.lt_early_cr_pattern)
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training_8b_10b.c
36
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training_8b_10b.c
434
if (link->ctx->dc->work_arounds.lt_early_cr_pattern)
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training_auxless.c
32
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
160
(dm_helpers_dmub_set_config_sync(link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
44
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training_dpia.c
985
dc_process_dmub_dpia_set_tps_notification(link->ctx->dc, link->link_index, pattern);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c
125
if (link->ctx->dc->work_arounds.lt_early_cr_pattern)
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c
42
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dpcd.c
51
!dm_helpers_dp_read_dpcd(link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_dpcd.c
66
!dm_helpers_dp_write_dpcd(link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1007
dm_helpers_dp_write_dpcd(link->ctx, link,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1016
dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1058
dm_helpers_dp_write_dpcd(link->ctx, link,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1071
link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1092
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1099
DC_LOGGER_INIT(link->ctx->logger);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1115
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1136
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1157
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1184
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1203
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1272
dc_wake_and_execute_dmub_cmd(pDC->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
1279
struct cp_psp *cp_psp = &pipe_ctx->stream->ctx->cp_psp;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
43
link->ctx->logger
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
495
enter_timestamp = dm_get_timestamp(link->ctx);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
504
finish_timestamp = dm_get_timestamp(link->ctx);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
505
time_taken_in_ns = dm_get_elapse_time_in_ns(link->ctx, finish_timestamp, enter_timestamp);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
524
ret = dm_helpers_dp_write_dpcd(link->ctx, link,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
534
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
552
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
587
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
635
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
654
struct dc_context *dc_ctx = link->ctx;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
713
link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
723
link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
732
dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
770
link->ctx,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
849
if (link->ctx->asic_id.chip_family >= FAMILY_RV) {
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
850
switch (link->ctx->asic_id.chip_family) {
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
910
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
925
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
939
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
972
struct dc *dc = link->ctx->dc;
sys/dev/pci/drm/amd/display/dc/link/protocols/link_hpd.c
123
link->ctx->dc_bios, link->link_id,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_hpd.c
124
link->ctx->gpio_service);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_hpd.c
142
hpd = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_hpd.c
143
link->ctx->gpio_service);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_hpd.c
214
hpd = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
sys/dev/pci/drm/amd/display/dc/link/protocols/link_hpd.c
215
link->ctx->gpio_service);
sys/dev/pci/drm/amd/display/dc/link/protocols/link_hpd.c
73
hpd = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id, link->ctx->gpio_service);
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn20/dcn20_mmhubbub.c
310
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn20/dcn20_mmhubbub.c
316
mcif_wb20->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn20/dcn20_mmhubbub.c
37
mcif_wb20->base.ctx
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn20/dcn20_mmhubbub.h
511
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn32/dcn32_mmhubbub.c
225
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn32/dcn32_mmhubbub.c
231
mcif_wb30->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn32/dcn32_mmhubbub.c
37
mcif_wb30->base.ctx
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn32/dcn32_mmhubbub.h
205
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn35/dcn35_mmhubbub.c
34
#define CTX mcif_wb30->base.ctx
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn35/dcn35_mmhubbub.c
44
struct dcn30_mmhubbub *mcif_wb30, struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn35/dcn35_mmhubbub.c
50
mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/mmhubbub/dcn35/dcn35_mmhubbub.h
68
struct dcn30_mmhubbub *mcif_wb30, struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn10/dcn10_mpc.c
33
mpc10->base.ctx
sys/dev/pci/drm/amd/display/dc/mpc/dcn10/dcn10_mpc.c
499
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn10/dcn10_mpc.c
507
mpc10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/mpc/dcn10/dcn10_mpc.h
135
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.c
178
mpc20->base.ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.c
237
mpc20->base.ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.c
345
cm_helper_program_xfer_func(mpc20->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.c
372
cm_helper_program_xfer_func(mpc20->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.c
40
mpc20->base.ctx
sys/dev/pci/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.c
412
if (mpc->ctx->dc->debug.cm_in_bypass) {
sys/dev/pci/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.c
417
if (mpc->ctx->dc->work_arounds.dedcn20_305_wa == false) {
sys/dev/pci/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.c
439
if (mpc->ctx->dc->debug.cm_in_bypass) {
sys/dev/pci/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.c
588
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.c
596
mpc20->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/mpc/dcn20/dcn20_mpc.h
271
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
1105
mpc30->base.ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
1115
mpc30->base.ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
1180
mpc30->base.ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
1190
mpc30->base.ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
1297
if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc)
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
1337
mpc30->base.ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
1381
mpc30->base.ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
1458
if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc) {
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
1552
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
1561
mpc30->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
265
cm_helper_program_gamcor_xfer_func(mpc30->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
298
cm_helper_program_gamcor_xfer_func(mpc30->base.ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
350
if (mpc->ctx->dc->debug.cm_in_bypass) {
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
37
mpc30->base.ctx
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
385
if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc)
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
834
if (power_on && mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc) {
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
845
if (power_on && mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc) {
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.c
878
if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc)
sys/dev/pci/drm/amd/display/dc/mpc/dcn30/dcn30_mpc.h
1003
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c
1027
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c
1036
mpc30->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c
192
cm_helper_program_gamcor_xfer_func(mpc->ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c
221
cm_helper_program_gamcor_xfer_func(mpc->ctx, params, &gam_regs);
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c
272
if (mpc->ctx->dc->debug.enable_mem_low_power.bits.cm)
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c
38
mpc30->base.ctx
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c
52
if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc) {
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c
695
if (power_on && mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc) {
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c
76
if (mpc->ctx->dc->debug.enable_mem_low_power.bits.cm) {
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c
80
} else if (!mpc->ctx->dc->debug.disable_mem_low_power) {
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.c
986
if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc)
sys/dev/pci/drm/amd/display/dc/mpc/dcn32/dcn32_mpc.h
326
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c
146
if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc)
sys/dev/pci/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c
217
if (mpc->ctx->dc->debug.enable_mem_low_power.bits.mpc)
sys/dev/pci/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c
328
mpc->ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c
362
mpc->ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c
37
mpc401->base.ctx
sys/dev/pci/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c
397
mpc->ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c
546
mpc401->base.ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c
611
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.c
620
mpc401->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/mpc/dcn401/dcn401_mpc.h
200
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/opp/dcn10/dcn10_opp.c
165
oppn10->base.ctx->dc->debug.force_chroma_subsampling_1tap;
sys/dev/pci/drm/amd/display/dc/opp/dcn10/dcn10_opp.c
39
oppn10->base.ctx
sys/dev/pci/drm/amd/display/dc/opp/dcn10/dcn10_opp.c
399
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/opp/dcn10/dcn10_opp.c
406
oppn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/opp/dcn10/dcn10_opp.h
161
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/opp/dcn20/dcn20_opp.c
373
!opp->ctx->dc->debug.force_chroma_subsampling_1tap &&
sys/dev/pci/drm/amd/display/dc/opp/dcn20/dcn20_opp.c
39
oppn20->base.ctx
sys/dev/pci/drm/amd/display/dc/opp/dcn20/dcn20_opp.c
401
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/opp/dcn20/dcn20_opp.c
407
oppn20->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/opp/dcn20/dcn20_opp.h
140
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/opp/dcn35/dcn35_opp.c
37
#define CTX oppn20->base.ctx
sys/dev/pci/drm/amd/display/dc/opp/dcn35/dcn35_opp.c
39
void dcn35_opp_construct(struct dcn20_opp *oppn20, struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/opp/dcn35/dcn35_opp.c
44
dcn20_opp_construct(oppn20, ctx, inst,
sys/dev/pci/drm/amd/display/dc/opp/dcn35/dcn35_opp.h
59
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/optc/dcn10/dcn10_optc.c
36
optc1->base.ctx
sys/dev/pci/drm/amd/display/dc/optc/dcn20/dcn20_optc.c
34
optc1->base.ctx
sys/dev/pci/drm/amd/display/dc/optc/dcn201/dcn201_optc.c
35
optc1->base.ctx
sys/dev/pci/drm/amd/display/dc/optc/dcn30/dcn30_optc.c
346
struct dc *dc = optc->ctx->dc;
sys/dev/pci/drm/amd/display/dc/optc/dcn30/dcn30_optc.c
39
optc1->base.ctx
sys/dev/pci/drm/amd/display/dc/optc/dcn301/dcn301_optc.c
39
optc1->base.ctx
sys/dev/pci/drm/amd/display/dc/optc/dcn31/dcn31_optc.c
167
if (optc->ctx->dce_environment != DCE_ENV_DIAG)
sys/dev/pci/drm/amd/display/dc/optc/dcn31/dcn31_optc.c
37
optc1->base.ctx
sys/dev/pci/drm/amd/display/dc/optc/dcn314/dcn314_optc.c
39
optc1->base.ctx
sys/dev/pci/drm/amd/display/dc/optc/dcn32/dcn32_optc.c
253
struct dc *dc = optc->ctx->dc;
sys/dev/pci/drm/amd/display/dc/optc/dcn32/dcn32_optc.c
39
optc1->base.ctx
sys/dev/pci/drm/amd/display/dc/optc/dcn35/dcn35_optc.c
221
if (optc1->base.ctx->dc->debug.otg_crc_db && optc1->tg_mask->OTG_CRC_WINDOW_DB_EN != 0)
sys/dev/pci/drm/amd/display/dc/optc/dcn35/dcn35_optc.c
254
if (optc1->base.ctx->dc->debug.otg_crc_db && optc1->tg_mask->OTG_CRC_WINDOW_DB_EN != 0)
sys/dev/pci/drm/amd/display/dc/optc/dcn35/dcn35_optc.c
274
if (!optc || !optc->ctx)
sys/dev/pci/drm/amd/display/dc/optc/dcn35/dcn35_optc.c
278
struct dc *dc = optc->ctx->dc;
sys/dev/pci/drm/amd/display/dc/optc/dcn35/dcn35_optc.c
41
optc1->base.ctx
sys/dev/pci/drm/amd/display/dc/optc/dcn35/dcn35_optc.c
438
if (!optc || !optc->ctx)
sys/dev/pci/drm/amd/display/dc/optc/dcn401/dcn401_optc.c
18
optc1->base.ctx
sys/dev/pci/drm/amd/display/dc/optc/dcn401/dcn401_optc.c
294
struct dc *dc = optc->ctx->dc;
sys/dev/pci/drm/amd/display/dc/optc/dcn401/dcn401_optc.c
319
struct dc *dc = optc->ctx->dc;
sys/dev/pci/drm/amd/display/dc/optc/dcn401/dcn401_optc.c
386
struct dc *dc = optc->ctx->dc;
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
182
bool skip_pg = pg_cntl->ctx->dc->debug.ignore_pg ||
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
183
pg_cntl->ctx->dc->debug.disable_hubp_power_gate ||
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
184
pg_cntl->ctx->dc->debug.disable_dpp_power_gate ||
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
185
pg_cntl->ctx->dc->idle_optimizations_allowed;
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
258
if (pg_cntl->ctx->dc->debug.ignore_pg ||
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
259
pg_cntl->ctx->dc->debug.disable_hpo_power_gate ||
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
260
pg_cntl->ctx->dc->idle_optimizations_allowed)
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
306
if (pg_cntl->ctx->dc->debug.ignore_pg ||
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
307
pg_cntl->ctx->dc->idle_optimizations_allowed)
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
350
if (pg_cntl->ctx->dc->idle_optimizations_allowed)
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
360
if (pg_cntl->ctx->dc->idle_optimizations_allowed)
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
370
if (pg_cntl->ctx->dc->idle_optimizations_allowed)
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
388
if (pg_cntl->ctx->dc->debug.ignore_pg ||
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
389
pg_cntl->ctx->dc->debug.disable_optc_power_gate ||
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
390
pg_cntl->ctx->dc->idle_optimizations_allowed)
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
402
for (i = 0; i < pg_cntl->ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
403
struct pipe_ctx *pipe_ctx = &pg_cntl->ctx->dc->current_state->res_ctx.pipe_ctx[i];
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
43
pg_cntl_dcn->base.ctx
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
434
for (i = 0; i < pg_cntl->ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
444
if (pg_cntl->ctx->dc->idle_optimizations_allowed)
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
45
pg_cntl->ctx->logger
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
477
for (i = 0; i < pg_cntl->ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
487
for (i = 0; i < pg_cntl->ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
516
for (i = 0; i < pg_cntl->ctx->dc->res_pool->pipe_count; i++) {
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
52
if (pg_cntl->ctx->dc->debug.ignore_pg)
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
540
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
554
base->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
83
bool skip_pg = pg_cntl->ctx->dc->debug.ignore_pg ||
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
84
pg_cntl->ctx->dc->debug.disable_dsc_power_gate ||
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.c
85
pg_cntl->ctx->dc->idle_optimizations_allowed;
sys/dev/pci/drm/amd/display/dc/pg/dcn35/dcn35_pg_cntl.h
188
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1005
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1008
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1014
bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1018
dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1021
dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], false);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1023
dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1025
dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1030
dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], true);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1033
dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1035
dce100_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1053
pool->base.dmcu = dce_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1063
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1075
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1100
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1109
pool->base.mis[i] = dce100_mem_input_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1117
pool->base.ipps[i] = dce100_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1125
pool->base.transforms[i] = dce100_transform_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1133
pool->base.opps[i] = dce100_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1143
pool->base.engines[i] = dce100_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
1150
pool->base.hw_i2cs[i] = dce100_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
409
#define CTX ctx
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
445
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
456
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
458
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
463
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
473
dce110_timing_generator_construct(tg110, ctx, instance, offsets);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
479
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
487
dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
508
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
513
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
560
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
571
dce_mem_input_construct(dce_mi, ctx, inst, &mi_regs[inst], &mi_shifts, &mi_masks);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
583
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
592
dce_transform_construct(transform, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
598
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
607
dce_ipp_construct(ipp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
620
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
660
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
670
ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
675
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
684
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
689
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
713
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
722
dce100_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
728
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
740
if (dce110_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
869
if (dc->ctx->dce_version == DCE_VERSION_6_0 ||
sys/dev/pci/drm/amd/display/dc/resource/dce100/dce100_resource.c
870
dc->ctx->dce_version == DCE_VERSION_6_4)
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1128
struct dc *dc = stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1148
struct dc_bios *dcb = dc->ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1245
static bool underlay_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1264
dce110_opp_v_construct(dce110_oppv, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1266
dce110_timing_generator_v_construct(dce110_tgv, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1267
dce110_mem_input_v_construct(dce110_miv, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1268
dce110_transform_v_construct(dce110_xfmv, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1277
ctx->dc->caps.max_slave_planes = 1;
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1278
ctx->dc->caps.max_slave_yuv_planes = 1;
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1279
ctx->dc->caps.max_slave_rgb_planes = 0;
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1290
dc->ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1314
dc->ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1326
dc->ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1356
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1359
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1361
pool->base.res_cap = dce110_resource_cap(&ctx->asic_id);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1384
bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1388
dce110_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1391
dce110_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1394
dce110_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1416
pool->base.dmcu = dce_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1426
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1438
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1446
ctx, i, &dce110_tg_offsets[i]);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1453
pool->base.mis[i] = dce110_mem_input_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1461
pool->base.ipps[i] = dce110_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1469
pool->base.transforms[i] = dce110_transform_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1477
pool->base.opps[i] = dce110_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1487
pool->base.engines[i] = dce110_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1494
pool->base.hw_i2cs[i] = dce110_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1505
dc->fbc_compressor = dce110_compressor_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1507
if (!underlay_create(ctx, &pool->base))
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
1524
bw_calcs_init(dc->bw_dceip, dc->bw_vbios, dc->ctx->asic_id);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
456
#define CTX ctx
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
492
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
503
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
505
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
510
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
520
dce110_timing_generator_construct(tg110, ctx, instance, offsets);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
526
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
534
dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
560
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
565
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
566
hws->regs = ASIC_REV_IS_STONEY(ctx->asic_id.hw_internal_rev) ?
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
57
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
604
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
615
dce_mem_input_construct(dce_mi, ctx, inst, &mi_regs[inst], &mi_shifts, &mi_masks);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
627
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
636
dce_transform_construct(transform, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
642
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
651
dce_ipp_construct(ipp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
664
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
704
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
714
ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
719
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
728
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
733
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
757
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
766
dce100_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
772
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
784
if (dce110_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dce110/dce110_resource.c
975
dc->ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1080
dc->ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1086
dc->ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1109
dc->ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1145
dc->ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1210
dm_pp_notify_wm_clock_changes(dc->ctx, &clk_ranges);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1229
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1231
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1233
pool->base.res_cap = dce112_resource_cap(&ctx->asic_id);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1257
ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1262
ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1267
ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1272
ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1277
ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1282
ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1288
ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1300
pool->base.dmcu = dce_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1310
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1322
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1331
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1340
pool->base.mis[i] = dce112_mem_input_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1348
pool->base.ipps[i] = dce112_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1356
pool->base.transforms[i] = dce112_transform_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1365
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1376
pool->base.engines[i] = dce112_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1383
pool->base.hw_i2cs[i] = dce112_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
1405
bw_calcs_init(dc->bw_dceip, dc->bw_vbios, dc->ctx->asic_id);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
436
#define CTX ctx
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
472
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
483
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
485
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
491
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
501
dce110_timing_generator_construct(tg110, ctx, instance, offsets);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
507
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
515
dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
537
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
542
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
576
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
587
dce112_mem_input_construct(dce_mi, ctx, inst, &mi_regs[inst], &mi_shifts, &mi_masks);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
598
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
607
dce_transform_construct(transform, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
625
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
63
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
665
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
674
dce_ipp_construct(ipp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
680
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
690
ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
695
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
704
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
709
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
733
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
742
dce112_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
748
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
760
if (dce112_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dce112/dce112_resource.c
898
dc->ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1048
dm_pp_notify_wm_clock_changes(dc->ctx, &clk_ranges);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1051
static uint32_t read_pipe_fuses(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1053
uint32_t value = dm_read_reg_soc15(ctx, mmCC_DC_PIPE_DIS, 0);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1067
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1070
bool is_vg20 = ASICREV_IS_VEGA20_P(ctx->asic_id.hw_internal_rev);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1073
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1098
dce120_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1102
dce120_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1106
dce120_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1110
dce120_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1114
dce120_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1118
dce120_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1124
dce120_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1136
pool->base.dmcu = dce_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1146
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1157
irq_init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1164
pipe_fuses = read_pipe_fuses(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1178
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1187
pool->base.mis[j] = dce120_mem_input_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1196
pool->base.ipps[j] = dce120_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1204
pool->base.transforms[j] = dce120_transform_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1213
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1226
pool->base.engines[i] = dce120_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1233
pool->base.hw_i2cs[i] = dce120_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1264
bw_calcs_init(dc->bw_dceip, dc->bw_vbios, dc->ctx->asic_id);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1268
if (dc->ctx->dc_bios->fw_info.oem_i2c_present) {
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1269
ddc_init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
1271
ddc_init_data.id.id = dc->ctx->dc_bios->fw_info.oem_i2c_obj_id;
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
427
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
437
ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
441
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
450
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
455
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
479
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
488
dce112_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
534
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
546
if (dce112_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
577
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
587
dce120_timing_generator_construct(tg110, ctx, instance, offsets);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
665
struct dc *dc = pool->base.oem_device->ctx->dc;
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
672
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
675
uint32_t reg_val = dm_read_reg_soc15(ctx, mmCC_DC_MISC_STRAPS, 0);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
684
reg_val = dm_read_reg_soc15(ctx, mmDC_PINSTRAPS, 0);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
691
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
693
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
709
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
750
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
759
dce_ipp_construct(ipp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
766
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
774
dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
810
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
815
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
824
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
829
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
871
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
882
dce120_mem_input_construct(dce_mi, ctx, inst, &mi_regs[inst], &mi_shifts, &mi_masks);
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
887
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
896
dce_transform_construct(transform, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
934
dc->ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce120/dce120_resource.c
967
dc->ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1000
pool->base.ipps[i] = dce60_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1007
pool->base.transforms[i] = dce60_transform_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1014
pool->base.opps[i] = dce60_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1023
pool->base.engines[i] = dce60_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1030
pool->base.hw_i2cs[i] = dce60_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1037
pool->base.sw_i2cs[i] = dce60_i2c_sw_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1091
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1094
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1115
bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1119
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1122
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1124
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1126
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1131
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], true);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1134
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1136
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1154
pool->base.dmcu = dce_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1164
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1176
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1184
ctx, i, &dce60_tg_offsets[i]);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1191
pool->base.mis[i] = dce60_mem_input_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1198
pool->base.ipps[i] = dce60_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1205
pool->base.transforms[i] = dce60_transform_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1212
pool->base.opps[i] = dce60_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1221
pool->base.engines[i] = dce60_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1228
pool->base.hw_i2cs[i] = dce60_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1235
pool->base.sw_i2cs[i] = dce60_i2c_sw_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1289
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1292
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1313
bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1317
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1321
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1323
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1328
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], true);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1331
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1333
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1351
pool->base.dmcu = dce_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1361
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1373
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1381
ctx, i, &dce60_tg_offsets[i]);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1388
pool->base.mis[i] = dce60_mem_input_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1395
pool->base.ipps[i] = dce60_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1402
pool->base.transforms[i] = dce60_transform_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1409
pool->base.opps[i] = dce60_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1418
pool->base.engines[i] = dce60_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1425
pool->base.hw_i2cs[i] = dce60_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
1432
pool->base.sw_i2cs[i] = dce60_i2c_sw_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
442
#define CTX ctx
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
478
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
489
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
491
return dce60_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
496
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
506
dce60_timing_generator_construct(tg110, ctx, instance, offsets);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
511
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
521
ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
526
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
535
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
540
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
564
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
573
dce_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
580
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
588
dce_i2c_sw_construct(dce_i2c_sw, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
594
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
602
dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
624
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
629
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
668
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
679
dce60_mem_input_construct(dce_mi, ctx, inst, &mi_regs[inst], &mi_shifts, &mi_masks);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
691
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
700
dce60_transform_construct(transform, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
714
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
754
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
766
if (dce110_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
784
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
793
dce60_ipp_construct(ipp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
893
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
896
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
918
bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
922
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
926
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
928
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
933
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], true);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
936
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
938
dce60_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
956
pool->base.dmcu = dce_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
966
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
978
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
986
ctx, i, &dce60_tg_offsets[i]);
sys/dev/pci/drm/amd/display/dc/resource/dce60/dce60_resource.c
993
pool->base.mis[i] = dce60_mem_input_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1003
pool->base.mis[i] = dce80_mem_input_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1010
pool->base.ipps[i] = dce80_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1017
pool->base.transforms[i] = dce80_transform_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1024
pool->base.opps[i] = dce80_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1033
pool->base.engines[i] = dce80_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1040
pool->base.hw_i2cs[i] = dce80_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1047
pool->base.sw_i2cs[i] = dce80_i2c_sw_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1101
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1104
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1127
bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1131
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1134
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1136
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1138
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1143
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], true);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1146
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1148
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1166
pool->base.dmcu = dce_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1176
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1188
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1196
ctx, i, &dce80_tg_offsets[i]);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1203
pool->base.mis[i] = dce80_mem_input_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1210
pool->base.ipps[i] = dce80_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1217
pool->base.transforms[i] = dce80_transform_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1224
pool->base.opps[i] = dce80_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1233
pool->base.engines[i] = dce80_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1240
pool->base.hw_i2cs[i] = dce80_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1247
pool->base.sw_i2cs[i] = dce80_i2c_sw_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1301
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1304
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1328
bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1332
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1335
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[0], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1337
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1342
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[0], true);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1345
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1363
pool->base.dmcu = dce_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1373
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1385
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1393
ctx, i, &dce80_tg_offsets[i]);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1400
pool->base.mis[i] = dce80_mem_input_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1407
pool->base.ipps[i] = dce80_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1414
pool->base.transforms[i] = dce80_transform_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1421
pool->base.opps[i] = dce80_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1430
pool->base.engines[i] = dce80_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1437
pool->base.hw_i2cs[i] = dce80_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
1444
pool->base.sw_i2cs[i] = dce80_i2c_sw_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
448
#define CTX ctx
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
484
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
495
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
497
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
502
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
512
dce80_timing_generator_construct(tg110, ctx, instance, offsets);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
517
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
527
ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
532
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
541
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
546
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
570
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
579
dce_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
586
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
594
dce_i2c_sw_construct(dce_i2c_sw, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
600
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
608
dce110_stream_encoder_construct(enc110, ctx, ctx->dc_bios, eng_id,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
630
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
635
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
674
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
685
dce_mem_input_construct(dce_mi, ctx, inst, &mi_regs[inst], &mi_shifts, &mi_masks);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
697
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
706
dce_transform_construct(transform, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
720
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
760
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
772
if (dce110_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
790
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
799
dce_ipp_construct(ipp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
899
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
902
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
927
bp = ctx->dc_bios;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
931
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_EXTERNAL, NULL, true);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
934
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
936
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
938
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
943
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL0, &clk_src_regs[0], true);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
946
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL1, &clk_src_regs[1], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
948
dce80_clock_source_create(ctx, bp, CLOCK_SOURCE_ID_PLL2, &clk_src_regs[2], false);
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
966
pool->base.dmcu = dce_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
976
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
988
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dce80/dce80_resource.c
996
ctx, i, &dce80_tg_offsets[i]);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1289
static uint32_t read_pipe_fuses(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1291
uint32_t value = dm_read_reg_soc15(ctx, mmCC_DC_PIPE_DIS, 0);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1319
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1320
uint32_t pipe_fuses = read_pipe_fuses(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1325
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1327
if (ctx->dce_version == DCN_VERSION_1_01)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1346
if (dc->ctx->dce_version == DCN_VERSION_1_01)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1399
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1407
dcn10_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1411
dcn10_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1415
dcn10_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1419
if (dc->ctx->dce_version == DCN_VERSION_1_0) {
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1421
dcn10_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1428
if (dc->ctx->dce_version == DCN_VERSION_1_01)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1432
dcn10_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1445
pool->base.dmcu = dcn10_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1455
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1474
if (ASICREV_IS_RAVEN2(dc->ctx->asic_id.hw_internal_rev))
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1475
switch (dc->ctx->asic_id.pci_revision_id) {
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1491
pool->base.pp_smu = dcn10_pp_smu_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1508
ctx, DM_PP_CLOCK_TYPE_FCLK, &fclks);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1523
ctx, DM_PP_CLOCK_TYPE_DCFCLK, &dcfclks);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1551
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1567
pool->base.hubps[j] = dcn10_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1575
pool->base.ipps[j] = dcn10_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1583
pool->base.dpps[j] = dcn10_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1591
pool->base.opps[j] = dcn10_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1600
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1611
pool->base.engines[i] = dcn10_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1618
pool->base.hw_i2cs[i] = dcn10_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1639
pool->base.mpc = dcn10_mpc_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
1646
pool->base.hubbub = dcn10_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
570
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
579
dpp1_construct(dpp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
585
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
595
dcn10_ipp_construct(ipp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
602
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
612
dcn10_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
617
static struct dce_aux *dcn10_aux_engine_create(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
626
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
631
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
654
static struct dce_i2c_hw *dcn10_i2c_hw_create(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
663
dcn1_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
668
static struct mpc *dcn10_mpc_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
676
dcn10_mpc_construct(mpc10, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
685
static struct hubbub *dcn10_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
693
hubbub1_construct(&dcn10_hubbub->base, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
702
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
712
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
735
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
778
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
790
if (dce112_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
802
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
805
generic_reg_get(ctx, mmDC_PINSTRAPS + BASE(mmDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
810
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
812
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
818
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
826
dcn10_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
845
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
850
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
858
if ((ctx->asic_id.chip_family == FAMILY_RV) &&
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
859
ASICREV_IS_RAVEN2(ctx->asic_id.hw_internal_rev))
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
860
switch (ctx->asic_id.pci_revision_id) {
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
889
static struct pp_smu_funcs *dcn10_pp_smu_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
896
dm_pp_get_funcs(ctx, pp_smu);
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
980
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn10/dcn10_resource.c
989
dcn10_hubp_construct(hubp1, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
1006
if (ASICREV_IS_NAVI14_M(ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
1011
dcn20_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
1031
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
1036
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
1061
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
1071
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
1190
struct dc *dc = pool->base.oem_device->ctx->dc;
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
1197
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
1206
if (hubp2_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
1224
struct dc *dc = pipe_ctx->stream->ctx->dc;
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
1293
struct resource_pool *pool = pipe_ctx->stream->ctx->dc->res_pool;
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2237
bool dcn20_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2250
dcn20_dwbc_construct(dwbc20, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2260
bool dcn20_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2276
dcn20_mmhubbub_construct(mcif_wb20, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2287
static struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2294
dm_pp_get_funcs(ctx, pp_smu);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2296
if (pp_smu->ctx.ver != PP_SMU_VER_NV)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2341
get_asic_rev_soc_bb(dc->ctx->asic_id.hw_internal_rev);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2343
get_asic_rev_ip_params(dc->ctx->asic_id.hw_internal_rev);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2345
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2397
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2401
get_asic_rev_soc_bb(ctx->asic_id.hw_internal_rev);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2403
get_asic_rev_ip_params(ctx->asic_id.hw_internal_rev);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2405
get_dml_project_version(ctx->asic_id.hw_internal_rev);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2407
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2410
if (ASICREV_IS_NAVI14_M(ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2476
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2491
dcn20_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2495
dcn20_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2499
dcn20_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2503
dcn20_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2507
dcn20_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2511
dcn20_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2517
dcn20_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2529
pool->base.dccg = dccg2_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2536
pool->base.dmcu = dcn20_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2546
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2556
pool->base.pp_smu = dcn20_pp_smu_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2610
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2617
pool->base.hubps[i] = dcn20_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2625
pool->base.ipps[i] = dcn20_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2633
pool->base.dpps[i] = dcn20_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2642
pool->base.engines[i] = dcn20_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2649
pool->base.hw_i2cs[i] = dcn20_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2660
pool->base.opps[i] = dcn20_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2671
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2681
pool->base.mpc = dcn20_mpc_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2688
pool->base.hubbub = dcn20_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2696
pool->base.dscs[i] = dcn20_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2704
if (!dcn20_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2709
if (!dcn20_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2727
if (ASICREV_IS_NAVI12_P(dc->ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2743
if (dc->ctx->dc_bios->fw_info.oem_i2c_present) {
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2744
ddc_init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
2746
ddc_init_data.id.id = dc->ctx->dc_bios->fw_info.oem_i2c_obj_id;
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
732
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
741
if (dpp2_construct(dpp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
751
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
761
dcn20_ipp_construct(ipp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
768
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
778
dcn20_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
784
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
793
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
798
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
822
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
831
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
836
struct mpc *dcn20_mpc_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
844
dcn20_mpc_construct(mpc20, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
853
struct hubbub *dcn20_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
862
hubbub2_construct(hubbub, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
870
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
881
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
891
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
915
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
958
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
970
if (dcn20_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
982
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
985
generic_reg_get(ctx, mmDC_PINSTRAPS + BASE(mmDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
990
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
992
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.c
998
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
102
struct dc_context *ctx, uint32_t inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
106
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
109
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
111
struct mpc *dcn20_mpc_create(struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
112
struct hubbub *dcn20_hubbub_create(struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
114
bool dcn20_dwbc_create(struct dc_context *ctx, struct resource_pool *pool);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
115
bool dcn20_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
53
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
71
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
74
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
83
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
87
struct dc_context *ctx, uint32_t inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
90
struct dc_context *ctx, uint32_t inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
93
struct dc_context *ctx, uint32_t inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn20/dcn20_resource.h
96
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1059
if (link->ctx->dc_bios->integrated_info)
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1060
link->dp_ss_off = !link->ctx->dc_bios->integrated_info->dp_ss_control;
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1092
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1094
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1165
dcn201_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1169
dcn201_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1177
dcn201_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1188
pool->base.dccg = dccg201_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1199
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1207
pool->base.hubps[i] = dcn201_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1214
pool->base.ipps[i] = dcn201_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1221
pool->base.dpps[i] = dcn201_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1230
pool->base.opps[i] = dcn201_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1239
pool->base.engines[i] = dcn201_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1245
pool->base.hw_i2cs[i] = dcn201_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1256
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1265
pool->base.mpc = dcn201_mpc_create(ctx, pool->base.mpcc_count);
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
1271
pool->base.hubbub = dcn201_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
628
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
637
if (dpp201_construct(dpp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
646
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
655
dcn20_ipp_construct(ipp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
662
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
671
dcn201_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
676
static struct dce_aux *dcn201_aux_engine_create(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
685
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
690
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
709
static struct dce_i2c_hw *dcn201_i2c_hw_create(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
718
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
724
static struct mpc *dcn201_mpc_create(struct dc_context *ctx, uint32_t num_mpcc)
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
732
dcn201_mpc_construct(mpc201, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
741
static struct hubbub *dcn201_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
749
hubbub201_construct(hubbub, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
758
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
768
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
792
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
817
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
829
if (dce112_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
839
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
842
generic_reg_get(ctx, mmDC_PINSTRAPS + BASE(mmDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
848
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
850
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
856
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
864
dcn20_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
884
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
889
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
982
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn201/dcn201_resource.c
991
if (dcn201_hubp_construct(hubp201, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1006
hubbub21_construct(hubbub, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1014
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1025
static struct output_pixel_processor *dcn21_opp_create(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1036
dcn20_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1041
static struct timing_generator *dcn21_timing_generator_create(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1051
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1062
static struct mpc *dcn21_mpc_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1070
dcn20_mpc_construct(mpc20, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1080
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1083
generic_reg_get(ctx, mmDC_PINSTRAPS + BASE(mmDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1089
static struct display_stream_compressor *dcn21_dsc_create(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1100
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1104
static struct pp_smu_funcs *dcn21_pp_smu_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1111
dm_pp_get_funcs(ctx, pp_smu);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1113
if (pp_smu->ctx.ver != PP_SMU_VER_RN)
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1129
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1131
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1140
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1148
dcn20_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1168
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1173
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1293
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1340
#define CTX ctx
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1345
static uint32_t read_pipe_fuses(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1355
if (plane_state->ctx->dc->debug.disable_dcc == DCC_ENABLE) {
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1390
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1392
uint32_t pipe_fuses = read_pipe_fuses(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1395
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1462
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1474
dcn21_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1478
dcn21_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1482
dcn21_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1486
dcn21_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1490
dcn21_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1498
dcn21_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1510
pool->base.dccg = dccg21_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1518
pool->base.dmcu = dcn21_dmcu_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1532
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1542
pool->base.abm = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1547
pool->base.abm = dce_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1552
pool->base.pp_smu = dcn21_pp_smu_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1564
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1578
pool->base.hubps[j] = dcn21_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1586
pool->base.ipps[j] = dcn21_ipp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1594
pool->base.dpps[j] = dcn21_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1602
pool->base.opps[j] = dcn21_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1611
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1621
pool->base.engines[i] = dcn21_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1628
pool->base.hw_i2cs[i] = dcn21_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1642
pool->base.mpc = dcn21_mpc_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1649
pool->base.hubbub = dcn21_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1657
pool->base.dscs[i] = dcn21_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1665
if (!dcn20_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
1670
if (!dcn20_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
484
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
494
dcn20_ipp_construct(ipp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
500
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
509
if (dpp2_construct(dpp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
519
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
528
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
533
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
556
static struct dce_i2c_hw *dcn21_i2c_hw_create(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
565
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
747
if (pool->base.abm->ctx->dc->config.disable_dmcu)
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
954
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
966
if (dcn20_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
978
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
987
if (hubp21_construct(hubp21, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn21/dcn21_resource.c
996
static struct hubbub *dcn21_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1003
afmt3_construct(afmt3, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1012
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1028
vpg = dcn30_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1029
afmt = dcn30_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1038
dcn30_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1046
static struct dce_hwseq *dcn30_hwseq_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1051
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1190
struct dc *dc = pool->base.oem_device->ctx->dc;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1197
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1206
if (hubp3_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1215
static bool dcn30_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1229
dcn30_dwbc_construct(dwbc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1240
static bool dcn30_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1254
dcn30_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1266
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1276
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1296
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1308
if (dcn3_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1488
uint32_t hw_internal_rev = dc->ctx->asic_id.hw_internal_rev;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
1502
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2050
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2116
if (dc->ctx->dc_bios->vram_info.num_chans)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2117
dcn3_0_soc.num_chans = dc->ctx->dc_bios->vram_info.num_chans;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2255
#define CTX ctx
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2260
static uint32_t read_pipe_fuses(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2274
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2277
uint32_t pipe_fuses = read_pipe_fuses(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2289
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2309
dc->caps.mall_size_total = dc->caps.mall_size_per_mem_channel * dc->ctx->dc_bios->vram_info.num_chans * 1048576;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2360
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2364
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2368
if (ctx->dc_bios->funcs->get_lttpr_interop) {
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2372
bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop(ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2378
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2391
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2395
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2399
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2403
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2407
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2411
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2419
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2432
pool->base.dccg = dccg30_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2454
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2460
pool->base.hubbub = dcn30_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2469
pool->base.hubps[i] = dcn30_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2477
pool->base.dpps[i] = dcn30_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2487
pool->base.opps[i] = dcn30_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2498
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2507
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2517
pool->base.multiple_abms[i] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2528
pool->base.mpc = dcn30_mpc_create(ctx, pool->base.mpcc_count, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2536
pool->base.dscs[i] = dcn30_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2545
if (!dcn30_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2551
if (!dcn30_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2559
pool->base.engines[i] = dcn30_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2566
pool->base.hw_i2cs[i] = dcn30_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2593
if (dc->ctx->dc_bios->fw_info.oem_i2c_present) {
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2594
ddc_init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
2596
ddc_init_data.id.id = dc->ctx->dc_bios->fw_info.oem_i2c_obj_id;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
749
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
758
if (dpp3_construct(dpp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
768
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
778
dcn20_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
784
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
793
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
798
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
823
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
832
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
839
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
849
dcn30_mpc_construct(mpc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
859
static struct hubbub *dcn30_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
869
hubbub3_construct(hubbub3, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
878
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
889
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
899
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
923
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
95
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
962
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
965
generic_reg_get(ctx, mmDC_PINSTRAPS + BASE(mmDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
971
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
973
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
978
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
986
vpg3_construct(vpg3, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
995
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1000
afmt = dcn301_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1009
dcn30_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1017
static struct dce_hwseq *dcn301_hwseq_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1022
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1158
static struct hubp *dcn301_hubp_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1166
if (hubp3_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1175
static bool dcn301_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1189
dcn30_dwbc_construct(dwbc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1200
static bool dcn301_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1214
dcn30_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1226
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1236
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1251
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1263
if (dcn301_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1281
uint32_t hw_internal_rev = dc->ctx->asic_id.hw_internal_rev;
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1295
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1308
if (dc->ctx->dc_bios->funcs->get_soc_bb_info) {
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1311
if (dc->ctx->dc_bios->funcs->get_soc_bb_info(dc->ctx->dc_bios, &bb_info) == BP_RESULT_OK) {
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1413
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1415
uint32_t pipe_fuses = read_pipe_fuses(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1418
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1420
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1422
if (dc->ctx->asic_id.chip_id == DEVICE_ID_VGH_1435)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1486
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1490
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1494
if (ctx->dc_bios->funcs->get_lttpr_interop) {
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1498
bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop(ctx->dc_bios, &is_vbios_interop_enabled);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1502
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1515
dcn301_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1519
dcn301_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1523
dcn301_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1527
dcn301_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1535
dcn301_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1548
pool->base.dccg = dccg301_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1572
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1578
pool->base.hubbub = dcn301_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1597
pool->base.hubps[j] = dcn301_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1605
pool->base.dpps[j] = dcn301_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1613
pool->base.opps[j] = dcn301_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1621
pool->base.timing_generators[j] = dcn301_timing_generator_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1636
pool->base.multiple_abms[i] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1648
pool->base.mpc = dcn301_mpc_create(ctx, pool->base.mpcc_count, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1656
pool->base.dscs[i] = dcn301_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1665
if (!dcn301_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1671
if (!dcn301_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1679
pool->base.engines[i] = dcn301_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
1686
pool->base.hw_i2cs[i] = dcn301_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
714
static struct dpp *dcn301_dpp_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
722
if (dpp3_construct(dpp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
730
static struct output_pixel_processor *dcn301_opp_create(struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
741
dcn20_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
746
static struct dce_aux *dcn301_aux_engine_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
754
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
759
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
780
static struct dce_i2c_hw *dcn301_i2c_hw_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
788
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
794
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
804
dcn30_mpc_construct(mpc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
814
static struct hubbub *dcn301_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
824
hubbub301_construct(hubbub3, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
833
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
846
struct dc_context *ctx, uint32_t instance)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
855
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
879
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
918
#define CTX ctx
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
923
static uint32_t read_pipe_fuses(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
933
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
936
generic_reg_get(ctx, mmDC_PINSTRAPS + BASE(mmDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
942
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
944
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
949
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
957
vpg3_construct(vpg3, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
96
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
966
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
974
afmt3_construct(afmt3, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
983
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn301/dcn301_resource.c
999
vpg = dcn301_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1109
struct dc *dc = pool->oem_device->ctx->dc;
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1204
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1208
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1228
dc->caps.mall_size_total = dc->caps.mall_size_per_mem_channel * dc->ctx->dc_bios->vram_info.num_chans * 1048576;
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1277
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1281
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1285
if (ctx->dc_bios->funcs->get_lttpr_interop) {
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1289
bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop(ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1294
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1307
dcn302_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1311
dcn302_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1315
dcn302_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1319
dcn302_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1323
dcn302_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1331
dcn302_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1344
pool->dccg = dccg30_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1358
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1364
pool->hubbub = dcn302_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1373
pool->hubps[i] = dcn302_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1380
pool->dpps[i] = dcn302_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1389
pool->opps[i] = dcn302_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1398
pool->timing_generators[i] = dcn302_timing_generator_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1408
pool->psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1417
pool->multiple_abms[i] = dmub_abm_create(ctx, &abm_regs[i], &abm_shift, &abm_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1426
pool->mpc = dcn302_mpc_create(ctx, pool->mpcc_count, pool->res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1434
pool->dscs[i] = dcn302_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1443
if (!dcn302_dwbc_create(ctx, pool)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1449
if (!dcn302_mmhubbub_create(ctx, pool)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1457
pool->engines[i] = dcn302_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1463
pool->hw_i2cs[i] = dcn302_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1489
if (dc->ctx->dc_bios->fw_info.oem_i2c_present) {
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1490
ddc_init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
1492
ddc_init_data.id.id = dc->ctx->dc_bios->fw_info.oem_i2c_obj_id;
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
253
static struct hubbub *dcn302_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
262
hubbub3_construct(hubbub3, ctx, &hubbub_reg, &hubbub_shift, &hubbub_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
267
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
297
static struct vpg *dcn302_vpg_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
304
vpg3_construct(vpg3, ctx, inst, &vpg_regs[inst], &vpg_shift, &vpg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
329
static struct afmt *dcn302_afmt_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
336
afmt3_construct(afmt3, ctx, inst, &afmt_regs[inst], &afmt_shift, &afmt_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
367
static struct audio *dcn302_create_audio(struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
369
return dce_audio_create(ctx, inst, &audio_regs[inst], &audio_shift, &audio_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
391
static struct stream_encoder *dcn302_stream_encoder_create(enum engine_id eng_id, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
407
vpg = dcn302_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
408
afmt = dcn302_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
417
dcn30_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id, vpg, afmt, &stream_enc_regs[eng_id],
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
442
static struct clock_source *dcn302_clock_source_create(struct dc_context *ctx, struct dc_bios *bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
450
if (dcn3_clk_src_construct(clk_src, ctx, bios, id, regs, &cs_shift, &cs_mask)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
472
static struct dce_hwseq *dcn302_hwseq_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
477
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
504
static struct hubp *dcn302_hubp_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
511
if (hubp3_construct(hubp2, ctx, inst, &hubp_regs[inst], &hubp_shift, &hubp_mask))
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
538
static struct dpp *dcn302_dpp_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
545
if (dpp3_construct(dpp, ctx, inst, &dpp_regs[inst], &tf_shift, &tf_mask))
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
572
static struct output_pixel_processor *dcn302_opp_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
581
dcn20_opp_construct(opp, ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
604
static struct timing_generator *dcn302_timing_generator_create(struct dc_context *ctx, uint32_t instance)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
612
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
649
static struct mpc *dcn302_mpc_create(struct dc_context *ctx, int num_mpcc, int num_rmu)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
656
dcn30_mpc_construct(mpc30, ctx, &mpc_regs, &mpc_shift, &mpc_mask, num_mpcc, num_rmu);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
680
static struct display_stream_compressor *dcn302_dsc_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
689
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
708
static bool dcn302_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
721
dcn30_dwbc_construct(dwbc30, ctx, &dwbc30_regs[i], &dwbc30_shift, &dwbc30_mask, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
743
static bool dcn302_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
756
dcn30_mmhubbub_construct(mcif_wb30, ctx, &mcif_wb30_regs[i], &mcif_wb30_shift, &mcif_wb30_mask, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
787
static struct dce_aux *dcn302_aux_engine_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
79
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
794
dce110_aux_engine_construct(aux_engine, ctx, inst, SW_AUX_TIMEOUT_PERIOD_MULTIPLIER * AUX_TIMEOUT_PERIOD,
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
795
&aux_engine_regs[inst], &aux_mask, &aux_shift, ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
818
static struct dce_i2c_hw *dcn302_i2c_hw_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
825
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst, &i2c_hw_regs[inst], &i2c_shifts, &i2c_masks);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
891
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
931
static void read_dce_straps(struct dc_context *ctx, struct resource_straps *straps)
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
933
generic_reg_get(ctx, mmDC_PINSTRAPS + BASE(mmDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
946
uint32_t hw_internal_rev = dc->ctx->asic_id.hw_internal_rev;
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
959
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
973
if (dc->ctx->dc_bios->funcs->get_soc_bb_info) {
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
976
if (dc->ctx->dc_bios->funcs->get_soc_bb_info(
sys/dev/pci/drm/amd/display/dc/resource/dcn302/dcn302_resource.c
977
dc->ctx->dc_bios, &bb_info) == BP_RESULT_OK) {
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1053
struct dc *dc = pool->oem_device->ctx->dc;
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1145
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1149
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1170
dc->ctx->dc_bios->vram_info.num_chans *
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1222
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1226
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1230
if (ctx->dc_bios->funcs->get_lttpr_interop) {
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1234
bp_query_result = ctx->dc_bios->funcs->get_lttpr_interop(ctx->dc_bios, &is_vbios_interop_enabled);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1238
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1251
dcn303_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1255
dcn303_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1263
dcn303_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1276
pool->dccg = dccg30_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1290
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1296
pool->hubbub = dcn303_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1305
pool->hubps[i] = dcn303_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1312
pool->dpps[i] = dcn303_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1321
pool->opps[i] = dcn303_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1330
pool->timing_generators[i] = dcn303_timing_generator_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1340
pool->psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1349
pool->multiple_abms[i] = dmub_abm_create(ctx, &abm_regs[i], &abm_shift, &abm_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1358
pool->mpc = dcn303_mpc_create(ctx, pool->mpcc_count, pool->res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1366
pool->dscs[i] = dcn303_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1375
if (!dcn303_dwbc_create(ctx, pool)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1381
if (!dcn303_mmhubbub_create(ctx, pool)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1389
pool->engines[i] = dcn303_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1395
pool->hw_i2cs[i] = dcn303_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1421
if (dc->ctx->dc_bios->fw_info.oem_i2c_present) {
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1422
ddc_init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
1424
ddc_init_data.id.id = dc->ctx->dc_bios->fw_info.oem_i2c_obj_id;
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
249
static struct hubbub *dcn303_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
258
hubbub3_construct(hubbub3, ctx, &hubbub_reg, &hubbub_shift, &hubbub_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
263
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
290
static struct vpg *dcn303_vpg_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
297
vpg3_construct(vpg3, ctx, inst, &vpg_regs[inst], &vpg_shift, &vpg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
319
static struct afmt *dcn303_afmt_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
326
afmt3_construct(afmt3, ctx, inst, &afmt_regs[inst], &afmt_shift, &afmt_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
357
static struct audio *dcn303_create_audio(struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
359
return dce_audio_create(ctx, inst, &audio_regs[inst], &audio_shift, &audio_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
378
static struct stream_encoder *dcn303_stream_encoder_create(enum engine_id eng_id, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
394
vpg = dcn303_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
395
afmt = dcn303_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
404
dcn30_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id, vpg, afmt, &stream_enc_regs[eng_id],
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
426
static struct clock_source *dcn303_clock_source_create(struct dc_context *ctx, struct dc_bios *bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
434
if (dcn3_clk_src_construct(clk_src, ctx, bios, id, regs, &cs_shift, &cs_mask)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
456
static struct dce_hwseq *dcn303_hwseq_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
461
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
485
static struct hubp *dcn303_hubp_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
492
if (hubp3_construct(hubp2, ctx, inst, &hubp_regs[inst], &hubp_shift, &hubp_mask))
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
516
static struct dpp *dcn303_dpp_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
523
if (dpp3_construct(dpp, ctx, inst, &dpp_regs[inst], &tf_shift, &tf_mask))
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
547
static struct output_pixel_processor *dcn303_opp_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
556
dcn20_opp_construct(opp, ctx, inst, &opp_regs[inst], &opp_shift, &opp_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
576
static struct timing_generator *dcn303_timing_generator_create(struct dc_context *ctx, uint32_t instance)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
584
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
613
static struct mpc *dcn303_mpc_create(struct dc_context *ctx, int num_mpcc, int num_rmu)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
620
dcn30_mpc_construct(mpc30, ctx, &mpc_regs, &mpc_shift, &mpc_mask, num_mpcc, num_rmu);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
641
static struct display_stream_compressor *dcn303_dsc_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
650
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
669
static bool dcn303_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
682
dcn30_dwbc_construct(dwbc30, ctx, &dwbc30_regs[i], &dwbc30_shift, &dwbc30_mask, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
704
static bool dcn303_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
717
dcn30_mmhubbub_construct(mcif_wb30, ctx, &mcif_wb30_regs[i], &mcif_wb30_shift, &mcif_wb30_mask, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
745
static struct dce_aux *dcn303_aux_engine_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
752
dce110_aux_engine_construct(aux_engine, ctx, inst, SW_AUX_TIMEOUT_PERIOD_MULTIPLIER * AUX_TIMEOUT_PERIOD,
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
753
&aux_engine_regs[inst], &aux_mask, &aux_shift, ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
773
static struct dce_i2c_hw *dcn303_i2c_hw_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
78
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
780
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst, &i2c_hw_regs[inst], &i2c_shifts, &i2c_masks);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
836
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
876
static void read_dce_straps(struct dc_context *ctx, struct resource_straps *straps)
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
878
generic_reg_get(ctx, mmDC_PINSTRAPS + BASE(mmDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
891
uint32_t hw_internal_rev = dc->ctx->asic_id.hw_internal_rev;
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
904
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
918
if (dc->ctx->dc_bios->funcs->get_soc_bb_info) {
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
921
if (dc->ctx->dc_bios->funcs->get_soc_bb_info(
sys/dev/pci/drm/amd/display/dc/resource/dcn303/dcn303_resource.c
922
dc->ctx->dc_bios, &bb_info) == BP_RESULT_OK) {
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1002
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1012
dcn30_mpc_construct(mpc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1022
static struct hubbub *dcn31_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1032
hubbub31_construct(hubbub3, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1044
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1055
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1065
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
107
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1089
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1115
struct dc_context *ctx, enum engine_id eng_id)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1119
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1128
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1150
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1153
generic_reg_get(ctx, regDC_PINSTRAPS + BASE(regDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1159
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1161
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1166
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1174
vpg31_construct(vpg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1183
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1191
afmt31_construct(afmt31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1202
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1210
apg31_construct(apg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1220
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1236
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1237
afmt = dcn31_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1246
dcn30_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1256
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1286
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1287
apg = dcn31_apg_create(ctx, apg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1296
dcn31_hpo_dp_stream_encoder_construct(hpo_dp_enc31, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1306
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1315
hpo_dp_link_encoder31_construct(hpo_dp_enc31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1323
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1328
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1495
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1504
if (hubp31_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1513
static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1527
dcn30_dwbc_construct(dwbc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1538
static bool dcn31_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1552
dcn30_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1564
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1574
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1588
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1600
if (dcn3_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1773
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1859
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1871
if (dcn31_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1888
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1891
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1968
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1972
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1982
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1995
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
1999
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2003
if (dc->ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0) {
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2005
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2009
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2014
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2018
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2024
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2032
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2045
pool->base.dccg = dccg31_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2053
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2059
pool->base.hubbub = dcn31_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2068
pool->base.hubps[i] = dcn31_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2076
pool->base.dpps[i] = dcn31_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2086
pool->base.opps[i] = dcn31_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2097
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2107
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2115
pool->base.replay = dmub_replay_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2124
pool->base.multiple_abms[i] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2136
pool->base.mpc = dcn31_mpc_create(ctx, pool->base.mpcc_count, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2144
pool->base.dscs[i] = dcn31_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2153
if (!dcn31_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2159
if (!dcn31_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2167
pool->base.engines[i] = dcn31_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2174
pool->base.hw_i2cs[i] = dcn31_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2184
if (dc->ctx->asic_id.chip_family == FAMILY_YELLOW_CARP &&
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2185
dc->ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0 &&
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
2191
if (dc->ctx->asic_id.chip_family == AMDGPU_FAMILY_GC_11_0_1)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
915
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
924
if (dpp3_construct(dpp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
934
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
944
dcn20_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
950
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
959
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
964
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
987
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn31/dcn31_resource.c
996
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1000
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1045
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1054
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1060
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1070
dcn30_mpc_construct(mpc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1080
static struct hubbub *dcn31_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1090
hubbub31_construct(hubbub3, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1102
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1113
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1123
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1147
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1173
struct dc_context *ctx, enum engine_id eng_id)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1177
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1186
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1208
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1211
generic_reg_get(ctx, regDC_PINSTRAPS + BASE(regDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1217
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1219
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
122
dc->ctx->logger
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1224
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1232
vpg31_construct(vpg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1241
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1249
afmt31_construct(afmt31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1260
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1268
apg31_construct(apg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1278
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1294
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1295
afmt = dcn31_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1304
dcn314_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1314
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1345
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1346
apg = dcn31_apg_create(ctx, apg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1355
dcn31_hpo_dp_stream_encoder_construct(hpo_dp_enc31, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1365
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1374
hpo_dp_link_encoder31_construct(hpo_dp_enc31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1382
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1387
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1553
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1562
if (hubp31_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1571
static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1585
dcn30_dwbc_construct(dwbc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1596
static bool dcn31_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1610
dcn30_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1622
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1632
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1646
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1658
if (dcn31_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1711
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1790
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1802
if (dcn31_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1819
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1822
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1900
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1904
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1914
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1934
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1938
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1942
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1946
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1950
dcn30_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1958
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1970
pool->base.dccg = dccg314_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1977
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1983
pool->base.hubbub = dcn31_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
1992
pool->base.hubps[i] = dcn31_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2000
pool->base.dpps[i] = dcn31_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2010
pool->base.opps[i] = dcn31_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2021
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2031
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2039
pool->base.replay = dmub_replay_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2048
pool->base.multiple_abms[i] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2060
pool->base.mpc = dcn31_mpc_create(ctx, pool->base.mpcc_count, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2068
pool->base.dscs[i] = dcn314_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2077
if (!dcn31_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2083
if (!dcn31_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2091
pool->base.engines[i] = dcn31_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
2098
pool->base.hw_i2cs[i] = dcn31_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
951
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
960
if (dpp3_construct(dpp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
970
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
980
dcn20_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
986
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn314/dcn314_resource.c
995
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1000
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1010
dcn30_mpc_construct(mpc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1020
static struct hubbub *dcn31_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1030
hubbub31_construct(hubbub3, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1042
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1053
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1063
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1087
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1113
struct dc_context *ctx, enum engine_id eng_id)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1117
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1126
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1148
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1151
generic_reg_get(ctx, regDC_PINSTRAPS + BASE(regDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1157
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1159
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1164
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1172
vpg31_construct(vpg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1181
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1189
afmt31_construct(afmt31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1200
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1208
apg31_construct(apg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1218
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1236
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1237
afmt = dcn31_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1246
dcn30_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1256
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1286
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1287
apg = dcn31_apg_create(ctx, apg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1296
dcn31_hpo_dp_stream_encoder_construct(hpo_dp_enc31, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1306
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1315
hpo_dp_link_encoder31_construct(hpo_dp_enc31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1323
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1328
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1495
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1504
if (hubp31_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1513
static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1527
dcn30_dwbc_construct(dwbc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1538
static bool dcn31_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1552
dcn30_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1564
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1574
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1588
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1600
if (dcn31_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1858
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1861
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1929
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1933
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1943
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1956
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1960
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1964
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1968
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1972
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1980
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
1993
pool->base.dccg = dccg31_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2001
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2007
pool->base.hubbub = dcn31_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2016
pool->base.hubps[i] = dcn31_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2024
pool->base.dpps[i] = dcn31_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2034
pool->base.opps[i] = dcn31_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2045
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2055
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2063
pool->base.replay = dmub_replay_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2072
pool->base.multiple_abms[i] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2084
pool->base.mpc = dcn31_mpc_create(ctx, pool->base.mpcc_count, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2092
pool->base.dscs[i] = dcn31_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2101
if (!dcn31_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2107
if (!dcn31_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2115
pool->base.engines[i] = dcn31_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
2122
pool->base.hw_i2cs[i] = dcn31_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
913
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
922
if (dpp3_construct(dpp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
932
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
942
dcn20_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
948
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
957
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
962
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
985
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn315/dcn315_resource.c
994
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1004
dcn30_mpc_construct(mpc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1014
static struct hubbub *dcn31_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1024
hubbub31_construct(hubbub3, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1036
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1047
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1057
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1081
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1107
struct dc_context *ctx, enum engine_id eng_id)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1111
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1120
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1142
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1145
generic_reg_get(ctx, regDC_PINSTRAPS + BASE(regDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1151
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1153
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1158
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1166
vpg31_construct(vpg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1175
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1183
afmt31_construct(afmt31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1195
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1203
apg31_construct(apg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1214
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1230
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1231
afmt = dcn31_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1240
dcn30_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1251
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1281
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1282
apg = dcn31_apg_create(ctx, apg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1291
dcn31_hpo_dp_stream_encoder_construct(hpo_dp_enc31, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1301
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1310
hpo_dp_link_encoder31_construct(hpo_dp_enc31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1319
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1324
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1488
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1497
if (hubp31_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1506
static bool dcn31_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1520
dcn30_dwbc_construct(dwbc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1531
static bool dcn31_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1545
dcn30_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1557
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1567
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1581
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1593
if (dcn31_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1734
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1737
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1805
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1809
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1819
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1832
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1836
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1840
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1844
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1848
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1856
dcn31_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1869
pool->base.dccg = dccg31_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1877
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1883
pool->base.hubbub = dcn31_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1892
pool->base.hubps[i] = dcn31_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1900
pool->base.dpps[i] = dcn31_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1910
pool->base.opps[i] = dcn31_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1921
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1931
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1940
pool->base.multiple_abms[i] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1952
pool->base.mpc = dcn31_mpc_create(ctx, pool->base.mpcc_count, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1960
pool->base.dscs[i] = dcn31_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1969
if (!dcn31_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1975
if (!dcn31_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1983
pool->base.engines[i] = dcn31_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
1990
pool->base.hw_i2cs[i] = dcn31_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
907
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
916
if (dpp3_construct(dpp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
926
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
936
dcn20_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
942
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
951
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
956
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
979
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
988
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn316/dcn316_resource.c
994
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1013
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1037
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1096
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1099
generic_reg_get(ctx, ctx->dcn_reg_offsets[regDC_PINSTRAPS_BASE_IDX] + regDC_PINSTRAPS,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1105
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1116
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1121
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
113
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1142
vpg3_construct(vpg3, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1151
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1168
afmt3_construct(afmt3, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1177
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1192
apg31_construct(apg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1202
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1218
vpg = dcn32_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1219
afmt = dcn32_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1236
dcn32_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1246
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1276
vpg = dcn32_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1277
apg = dcn31_apg_create(ctx, apg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1293
dcn31_hpo_dp_stream_encoder_construct(hpo_dp_enc31, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1303
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1317
hpo_dp_link_encoder32_construct(hpo_dp_enc31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1325
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1334
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1497
struct dc *dc = pool->base.oem_device->ctx->dc;
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1504
static bool dcn32_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1522
dcn30_dwbc_construct(dwbc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1533
static bool dcn32_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1551
dcn32_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1563
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1580
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
1763
DC_LOGGER_INIT(dc->ctx->logger);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
184
#define NBIO_BASE_INNER(seg) ctx->nbio_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
197
#define CTX ctx
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
199
(ctx->dcn_reg_offsets[reg ## reg_name ## _BASE_IDX] + reg ## reg_name)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2122
static uint32_t read_pipe_fuses(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2137
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2166
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2171
pipe_fuses = read_pipe_fuses(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2208
dc->caps.mall_size_total = dc->caps.mall_size_per_mem_channel * dc->ctx->dc_bios->vram_info.num_chans * 1048576;
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2216
dc, dc->ctx->dc_bios->vram_info.num_chans) *
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2287
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2291
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2301
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2314
dcn32_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2318
dcn32_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2322
dcn32_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2326
dcn32_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2330
dcn32_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2338
dcn32_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2351
pool->base.dccg = dccg32_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2362
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2368
pool->base.hubbub = dcn32_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2385
pool->base.hubps[j] = dcn32_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2394
pool->base.dpps[j] = dcn32_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2403
pool->base.opps[j] = dcn32_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2413
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2421
pool->base.multiple_abms[j] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2436
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2444
pool->base.mpc = dcn32_mpc_create(ctx, pool->base.res_cap->num_timing_generator, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2453
pool->base.dscs[i] = dcn32_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2462
if (!dcn32_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2469
if (!dcn32_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2477
pool->base.engines[i] = dcn32_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2484
pool->base.hw_i2cs[i] = dcn32_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2511
if (dc->ctx->dc_bios->fw_info.oem_i2c_present) {
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2512
ddc_init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2514
ddc_init_data.id.id = dc->ctx->dc_bios->fw_info.oem_i2c_obj_id;
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2551
if (ASICREV_IS_GC_11_0_3(dc->ctx->asic_id.hw_internal_rev) && (dc->config.sdpif_request_limit_words_per_umc == 0))
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2696
old_primary_pipe = &primary_pipe->stream->ctx->dc->current_state->res_ctx.pipe_ctx[primary_index];
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2734
struct resource_context *old_ctx = &stream->ctx->dc->current_state->res_ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2808
if (!opp_head_pipe->stream->ctx->dc->config.enable_windowed_mpo_odm)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2861
dcn20_acquire_dsc(free_pipe->stream->ctx->dc,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2919
if (ASICREV_IS_GC_11_0_0(dc->ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
2922
} else if (ASICREV_IS_GC_11_0_2(dc->ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
746
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
763
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
768
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
786
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
803
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
810
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
822
if (dcn31_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
833
static struct hubbub *dcn32_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
866
hubbub32_construct(hubbub2, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
870
ctx->dc->dml.ip.det_buffer_size_kbytes,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
871
ctx->dc->dml.ip.pixel_chunk_size_kbytes,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
872
ctx->dc->dml.ip.config_return_buffer_size_in_kbytes);
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
878
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
889
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
905
if (hubp32_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
921
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
937
if (dpp32_construct(dpp3, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
947
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
961
dcn32_mpc_construct(mpc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
972
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
989
dcn20_opp_construct(opp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource.c
996
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn32/dcn32_resource_helpers.c
477
if (fpo_candidate_stream->ctx->dc->config.enable_fpo_flicker_detection == 1 &&
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1007
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1031
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1077
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1080
generic_reg_get(ctx, ctx->dcn_reg_offsets[regDC_PINSTRAPS_BASE_IDX] + regDC_PINSTRAPS,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1086
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1097
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1102
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1123
vpg3_construct(vpg3, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
113
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1132
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1149
afmt3_construct(afmt3, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1158
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1173
apg31_construct(apg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1183
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1199
vpg = dcn321_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1200
afmt = dcn321_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1217
dcn32_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1227
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1257
vpg = dcn321_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1258
apg = dcn321_apg_create(ctx, apg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1274
dcn31_hpo_dp_stream_encoder_construct(hpo_dp_enc31, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1284
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1298
hpo_dp_link_encoder32_construct(hpo_dp_enc31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1306
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1315
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1477
struct dc *dc = pool->base.oem_device->ctx->dc;
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1484
static bool dcn321_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1502
dcn30_dwbc_construct(dwbc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1513
static bool dcn321_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1531
dcn32_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1543
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1560
dsc2_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1625
static uint32_t read_pipe_fuses(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1640
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1670
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1675
pipe_fuses = read_pipe_fuses(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1712
dc->caps.mall_size_total = dc->caps.mall_size_per_mem_channel * dc->ctx->dc_bios->vram_info.num_chans * 1048576;
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1720
dc, dc->ctx->dc_bios->vram_info.num_chans) *
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1787
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1791
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1801
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1814
dcn321_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1818
dcn321_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1822
dcn321_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1826
dcn321_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1830
dcn321_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1838
dcn321_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
184
#define NBIO_BASE_INNER(seg) ctx->nbio_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1851
pool->base.dccg = dccg32_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1862
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1868
pool->base.hubbub = dcn321_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1884
pool->base.hubps[j] = dcn321_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1892
pool->base.dpps[j] = dcn321_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1900
pool->base.opps[j] = dcn321_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1909
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1916
pool->base.multiple_abms[j] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1931
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1939
pool->base.mpc = dcn321_mpc_create(ctx, pool->base.res_cap->num_timing_generator, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1948
pool->base.dscs[i] = dcn321_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1957
if (!dcn321_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
196
#define CTX ctx
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1964
if (!dcn321_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1972
pool->base.engines[i] = dcn321_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
1979
pool->base.hw_i2cs[i] = dcn321_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
198
(ctx->dcn_reg_offsets[reg ## reg_name ## _BASE_IDX] + reg ## reg_name)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
2006
if (dc->ctx->dc_bios->fw_info.oem_i2c_present) {
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
2007
ddc_init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
2009
ddc_init_data.id.id = dc->ctx->dc_bios->fw_info.oem_i2c_obj_id;
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
740
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
757
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
762
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
780
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
797
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
804
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
816
if (dcn31_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
827
static struct hubbub *dcn321_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
860
hubbub32_construct(hubbub2, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
864
ctx->dc->dml.ip.det_buffer_size_kbytes,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
865
ctx->dc->dml.ip.pixel_chunk_size_kbytes,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
866
ctx->dc->dml.ip.config_return_buffer_size_in_kbytes);
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
872
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
883
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
899
if (hubp32_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
915
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
931
if (dpp32_construct(dpp3, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
941
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
955
dcn32_mpc_construct(mpc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
966
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
983
dcn20_opp_construct(opp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn321/dcn321_resource.c
990
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1006
hubbub35_construct(hubbub3, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1018
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1029
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1046
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1070
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1120
struct dc_context *ctx, enum engine_id eng_id)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1124
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1133
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1155
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1158
generic_reg_get(ctx, regDC_PINSTRAPS + BASE(regDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1164
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1177
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1182
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1203
vpg31_construct(vpg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1212
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1229
afmt31_construct(afmt31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1240
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1255
apg31_construct(apg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1265
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
127
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1281
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1282
afmt = dcn31_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1299
dcn35_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1309
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1339
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1340
apg = dcn31_apg_create(ctx, apg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1356
dcn31_hpo_dp_stream_encoder_construct(hpo_dp_enc31, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1366
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1380
hpo_dp_link_encoder31_construct(hpo_dp_enc31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1388
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1397
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1567
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1583
if (hubp35_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1592
static void dcn35_dwbc_init(struct dcn30_dwbc *dwbc30, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1595
dwbc30, ctx->dc->debug.enable_fine_grain_clock_gating.bits.dwb);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1598
static bool dcn35_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1616
dcn35_dwbc_construct(dwbc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1624
dcn35_dwbc_init(dwbc30, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1630
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1634
ctx->dc->debug.enable_fine_grain_clock_gating.bits.mmhubbub);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1637
static bool dcn35_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1655
dcn35_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1661
dcn35_mmhubbub_init(mcif_wb30, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1669
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1686
dsc35_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1688
ctx->dc->debug.enable_fine_grain_clock_gating.bits.dsc);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1702
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1714
if (dcn31_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1814
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1840
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1926
if (dc->ctx->asic_id.hw_internal_rev >= 0x40)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1936
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1940
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1950
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1964
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1968
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1972
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1976
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1980
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
1988
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
200
#define NBIO_BASE_INNER(seg) ctx->nbio_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2003
pool->base.dccg = dccg35_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2014
pool->base.pg_cntl = pg_cntl35_create(ctx, &pg_cntl_regs, &pg_cntl_shift, &pg_cntl_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2022
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2028
pool->base.hubbub = dcn35_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2037
pool->base.hubps[i] = dcn35_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2045
pool->base.dpps[i] = dcn35_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2055
pool->base.opps[i] = dcn35_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2066
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2076
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2084
pool->base.replay = dmub_replay_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2093
pool->base.multiple_abms[i] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2105
pool->base.mpc = dcn35_mpc_create(ctx, pool->base.mpcc_count, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2113
pool->base.dscs[i] = dcn35_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2122
if (!dcn35_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2128
if (!dcn35_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2136
pool->base.engines[i] = dcn31_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
2143
pool->base.hw_i2cs[i] = dcn31_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
808
static struct dpp *dcn35_dpp_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
823
success = dpp35_construct(dpp, ctx, inst, &dpp_regs[inst], &tf_shift,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
828
ctx->dc->debug.enable_fine_grain_clock_gating.bits.dpp);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
838
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
855
dcn35_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
858
dcn35_opp_set_fgcg(opp, ctx->dc->debug.enable_fine_grain_clock_gating.bits.opp);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
864
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
881
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
886
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
927
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
944
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
950
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
963
dcn32_mpc_construct(mpc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn35/dcn35_resource.c
973
static struct hubbub *dcn35_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1009
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1026
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1050
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
107
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1100
struct dc_context *ctx, enum engine_id eng_id)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1104
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1113
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1135
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1138
generic_reg_get(ctx, regDC_PINSTRAPS + BASE(regDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1144
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1157
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1162
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1183
vpg31_construct(vpg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1192
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1209
afmt31_construct(afmt31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1220
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1235
apg31_construct(apg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1245
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1261
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1262
afmt = dcn31_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1279
dcn35_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1289
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1319
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1320
apg = dcn31_apg_create(ctx, apg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1336
dcn31_hpo_dp_stream_encoder_construct(hpo_dp_enc31, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1346
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1360
hpo_dp_link_encoder31_construct(hpo_dp_enc31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1368
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1377
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1547
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1563
if (hubp35_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1572
static void dcn35_dwbc_init(struct dcn30_dwbc *dwbc30, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1575
dwbc30, ctx->dc->debug.enable_fine_grain_clock_gating.bits.dwb);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1578
static bool dcn35_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1596
dcn35_dwbc_construct(dwbc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1604
dcn35_dwbc_init(dwbc30, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1610
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1614
ctx->dc->debug.enable_fine_grain_clock_gating.bits.mmhubbub);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1617
static bool dcn35_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1635
dcn35_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1641
dcn35_mmhubbub_init(mcif_wb30, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1649
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1666
dsc35_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1668
ctx->dc->debug.enable_fine_grain_clock_gating.bits.dsc);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1682
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1694
if (dcn31_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1787
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
180
#define NBIO_BASE_INNER(seg) ctx->nbio_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1813
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1907
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1911
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1921
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1936
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1940
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1944
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1948
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1952
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1960
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1975
pool->base.dccg = dccg35_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1986
pool->base.pg_cntl = pg_cntl35_create(ctx, &pg_cntl_regs, &pg_cntl_shift, &pg_cntl_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
1994
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2000
pool->base.hubbub = dcn35_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2009
pool->base.hubps[i] = dcn35_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2017
pool->base.dpps[i] = dcn35_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2027
pool->base.opps[i] = dcn35_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2038
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2048
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2056
pool->base.replay = dmub_replay_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2065
pool->base.multiple_abms[i] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2077
pool->base.mpc = dcn35_mpc_create(ctx, pool->base.mpcc_count, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2085
pool->base.dscs[i] = dcn35_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2094
if (!dcn35_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2100
if (!dcn35_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2108
pool->base.engines[i] = dcn31_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
2115
pool->base.hw_i2cs[i] = dcn31_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
788
static struct dpp *dcn35_dpp_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
803
success = dpp35_construct(dpp, ctx, inst, &dpp_regs[inst], &tf_shift,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
808
ctx->dc->debug.enable_fine_grain_clock_gating.bits.dpp);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
818
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
835
dcn35_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
838
dcn35_opp_set_fgcg(opp, ctx->dc->debug.enable_fine_grain_clock_gating.bits.opp);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
844
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
861
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
866
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
907
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
924
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
930
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
943
dcn32_mpc_construct(mpc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
953
static struct hubbub *dcn35_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
986
hubbub35_construct(hubbub3, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn351/dcn351_resource.c
998
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1010
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1027
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1051
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1101
struct dc_context *ctx, enum engine_id eng_id)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1105
if ((eng_id - ENGINE_ID_DIGA) > ctx->dc->res_pool->res_cap->num_dig_link_enc)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1114
ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
112
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1136
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1139
generic_reg_get(ctx, regDC_PINSTRAPS + BASE(regDC_PINSTRAPS_BASE_IDX),
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1145
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1158
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1163
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1184
vpg31_construct(vpg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1193
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1210
afmt31_construct(afmt31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1221
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1236
apg31_construct(apg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1246
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1262
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1263
afmt = dcn31_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1280
dcn35_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1290
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1320
vpg = dcn31_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1321
apg = dcn31_apg_create(ctx, apg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1337
dcn31_hpo_dp_stream_encoder_construct(hpo_dp_enc31, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1347
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1361
hpo_dp_link_encoder31_construct(hpo_dp_enc31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1369
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1378
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1548
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1564
if (hubp35_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1573
static void dcn35_dwbc_init(struct dcn30_dwbc *dwbc30, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1576
dwbc30, ctx->dc->debug.enable_fine_grain_clock_gating.bits.dwb);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1579
static bool dcn35_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1597
dcn35_dwbc_construct(dwbc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1605
dcn35_dwbc_init(dwbc30, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1611
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1615
ctx->dc->debug.enable_fine_grain_clock_gating.bits.mmhubbub);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1618
static bool dcn35_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1636
dcn35_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1642
dcn35_mmhubbub_init(mcif_wb30, ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1650
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1667
dsc35_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1669
ctx->dc->debug.enable_fine_grain_clock_gating.bits.dsc);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1683
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1695
if (dcn31_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1787
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1813
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
185
#define NBIO_BASE_INNER(seg) ctx->nbio_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1899
if (dc->ctx->asic_id.hw_internal_rev >= 0x40)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1908
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1912
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1922
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1937
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1941
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1945
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1949
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1953
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1961
dcn35_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1976
pool->base.dccg = dccg35_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1987
pool->base.pg_cntl = pg_cntl35_create(ctx, &pg_cntl_regs, &pg_cntl_shift, &pg_cntl_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
1995
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2001
pool->base.hubbub = dcn35_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2010
pool->base.hubps[i] = dcn35_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2018
pool->base.dpps[i] = dcn35_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2028
pool->base.opps[i] = dcn35_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2039
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2049
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2057
pool->base.replay = dmub_replay_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2066
pool->base.multiple_abms[i] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2078
pool->base.mpc = dcn35_mpc_create(ctx, pool->base.mpcc_count, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2086
pool->base.dscs[i] = dcn35_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2095
if (!dcn35_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2101
if (!dcn35_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2109
pool->base.engines[i] = dcn31_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
2116
pool->base.hw_i2cs[i] = dcn31_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
789
static struct dpp *dcn35_dpp_create(struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
804
success = dpp35_construct(dpp, ctx, inst, &dpp_regs[inst], &tf_shift,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
809
ctx->dc->debug.enable_fine_grain_clock_gating.bits.dpp);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
819
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
836
dcn35_opp_construct(opp, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
839
dcn35_opp_set_fgcg(opp, ctx->dc->debug.enable_fine_grain_clock_gating.bits.opp);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
845
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
862
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
867
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
908
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
925
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
931
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
944
dcn32_mpc_construct(mpc30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
954
static struct hubbub *dcn35_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
987
hubbub35_construct(hubbub3, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn36/dcn36_resource.c
999
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1005
tgn10->base.ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1029
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1070
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1073
generic_reg_get(ctx, ctx->dcn_reg_offsets[regDC_PINSTRAPS_BASE_IDX] + regDC_PINSTRAPS,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1079
struct dc_context *ctx, unsigned int inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1090
return dce_audio_create(ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1095
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1116
vpg31_construct(vpg4, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1125
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1141
afmt3_construct(afmt401, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1150
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1165
apg31_construct(apg31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1175
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1191
vpg = dcn401_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1192
afmt = dcn401_afmt_create(ctx, afmt_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1208
dcn401_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1217
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1247
vpg = dcn401_vpg_create(ctx, vpg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1248
apg = dcn401_apg_create(ctx, apg_inst);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1264
dcn31_hpo_dp_stream_encoder_construct(hpo_dp_enc31, ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1274
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1290
hpo_dp_link_encoder32_construct(hpo_dp_enc31, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1311
if (ASICREV_IS_GC_12_0_0_A0(dc->ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1313
} else if (ASICREV_IS_GC_12_0_1_A0(dc->ctx->asic_id.hw_internal_rev)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1321
struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1330
hws->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1500
struct dc *dc = pool->base.oem_device->ctx->dc;
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1507
static bool dcn401_dwbc_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1526
dcn30_dwbc_construct(dwbc401, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1538
static bool dcn401_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1556
dcn32_mmhubbub_construct(mcif_wb30, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1568
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1585
dsc401_construct(dsc, ctx, inst, &dsc_regs[inst], &dsc_shift, &dsc_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1587
ctx->dc->debug.enable_fine_grain_clock_gating.bits.dsc);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1705
if (!pipe_ctx->stream->ctx->dc->config.unify_link_enc_assignment)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
171
#define NBIO_BASE_INNER(seg) ctx->nbio_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1744
if (pixel_clk_params->requested_pix_clk_100hz > 4 * stream->ctx->dc->clk_mgr->dprefclk_khz * 10) {
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1746
} else if (pixel_clk_params->requested_pix_clk_100hz > 2 * stream->ctx->dc->clk_mgr->dprefclk_khz * 10) {
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1748
} else if (pixel_clk_params->requested_pix_clk_100hz > stream->ctx->dc->clk_mgr->dprefclk_khz * 10) {
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1808
static uint32_t read_pipe_fuses(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1823
struct dc_context *ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
183
#define CTX ctx
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
185
(ctx->dcn_reg_offsets[reg ## reg_name ## _BASE_IDX] + reg ## reg_name)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1851
ctx->dc_bios->regs = &bios_regs;
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1857
pipe_fuses = read_pipe_fuses(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1894
dc, dc->ctx->dc_bios->vram_info.num_chans) *
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1919
if (ASICREV_IS_GC_12_0_1_A0(dc->ctx->asic_id.hw_internal_rev))
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1985
if (ctx->dc_bios->funcs->get_lttpr_caps) {
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1989
bp_query_result = ctx->dc_bios->funcs->get_lttpr_caps(ctx->dc_bios, &is_vbios_lttpr_enable);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
1999
if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2012
dcn401_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2016
dcn401_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2020
dcn401_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2024
dcn401_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2036
dcn401_clock_source_create(ctx, ctx->dc_bios,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2049
pool->base.dccg = dccg401_create(ctx, &dccg_regs, &dccg_shift, &dccg_mask);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2057
init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2063
pool->base.hubbub = dcn401_hubbub_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2079
pool->base.hubps[j] = dcn401_hubp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2087
pool->base.dpps[j] = dcn401_dpp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2095
pool->base.opps[j] = dcn401_opp_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2104
ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2111
pool->base.multiple_abms[j] = dmub_abm_create(ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2126
pool->base.psr = dmub_psr_create(ctx);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2134
pool->base.mpc = dcn401_mpc_create(ctx, pool->base.res_cap->num_timing_generator, pool->base.res_cap->num_mpc_3dlut);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2143
pool->base.dscs[i] = dcn401_dsc_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2152
if (!dcn401_dwbc_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2159
if (!dcn401_mmhubbub_create(ctx, &pool->base)) {
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2167
pool->base.engines[i] = dcn401_aux_engine_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2174
pool->base.hw_i2cs[i] = dcn401_i2c_hw_create(ctx, i);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2201
if (dc->ctx->dc_bios->fw_info.oem_i2c_present) {
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2202
ddc_init_data.ctx = dc->ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
2204
ddc_init_data.id.id = dc->ctx->dc_bios->fw_info.oem_i2c_obj_id;
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
741
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
757
dce110_aux_engine_construct(aux_engine, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
762
ctx->dc->caps.extended_aux_timeout_support);
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
780
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
796
dcn2_i2c_hw_construct(dce_i2c_hw, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
803
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
815
if (dcn401_clk_src_construct(clk_src, ctx, bios, id,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
826
static struct hubbub *dcn401_hubbub_create(struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
860
hubbub401_construct(hubbub2, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
871
vmid->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
882
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
898
if (hubp401_construct(hubp2, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
914
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
930
if (dpp401_construct(dpp401, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
94
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
940
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
954
dcn401_mpc_construct(mpc401, ctx,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
965
struct dc_context *ctx, uint32_t inst)
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
982
dcn20_opp_construct(opp4, ctx, inst,
sys/dev/pci/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
989
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c
226
soc_bb->xtalclk_mhz = dc->ctx->dc_bios->fw_info.pll_info.crystal_frequency / 1000;
sys/dev/pci/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c
229
if (dc->ctx->dc_bios->bb_info.dram_clock_change_latency_100ns)
sys/dev/pci/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c
231
dc->ctx->dc_bios->bb_info.dram_clock_change_latency_100ns / 10.0;
sys/dev/pci/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c
233
if (dc->ctx->dc_bios->bb_info.dram_sr_enter_exit_latency_100ns)
sys/dev/pci/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c
235
dc->ctx->dc_bios->bb_info.dram_sr_enter_exit_latency_100ns / 10.0;
sys/dev/pci/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c
237
if (dc->ctx->dc_bios->bb_info.dram_sr_exit_latency_100ns)
sys/dev/pci/drm/amd/display/dc/soc_and_ip_translator/dcn401/dcn401_soc_and_ip_translator.c
239
dc->ctx->dc_bios->bb_info.dram_sr_exit_latency_100ns / 10.0;
sys/dev/pci/drm/amd/display/dc/virtual/virtual_link_encoder.c
117
enc->ctx = init_data->ctx;
sys/dev/pci/drm/amd/display/dc/virtual/virtual_stream_encoder.c
143
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dc/virtual/virtual_stream_encoder.c
152
enc->ctx = ctx;
sys/dev/pci/drm/amd/display/dc/virtual/virtual_stream_encoder.c
160
struct dc_context *ctx, struct dc_bios *bp)
sys/dev/pci/drm/amd/display/dc/virtual/virtual_stream_encoder.c
167
if (virtual_stream_encoder_construct(enc, ctx, bp))
sys/dev/pci/drm/amd/display/dc/virtual/virtual_stream_encoder.h
32
struct dc_context *ctx, struct dc_bios *bp);
sys/dev/pci/drm/amd/display/dc/virtual/virtual_stream_encoder.h
36
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/dmub/dmub_srv.h
390
uint32_t (*reg_read)(void *ctx, uint32_t address);
sys/dev/pci/drm/amd/display/dmub/dmub_srv.h
397
void (*reg_write)(void *ctx, uint32_t address, uint32_t value);
sys/dev/pci/drm/amd/display/dmub/dmub_srv.h
491
void (*init_reg_offsets)(struct dmub_srv *dmub, struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dmub/inc/dmub_cmd.h
6442
void *ctx; /**< Caller provided context pointer */
sys/dev/pci/drm/amd/display/dmub/inc/dmub_cmd.h
6458
void *ctx; /**< Caller provided context pointer */
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn32.c
35
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn32.c
40
void dmub_srv_dcn32_regs_init(struct dmub_srv *dmub, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn32.h
271
void dmub_srv_dcn32_regs_init(struct dmub_srv *dmub, struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn35.c
35
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn35.c
40
void dmub_srv_dcn35_regs_init(struct dmub_srv *dmub, struct dc_context *ctx) {
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn35.h
286
void dmub_srv_dcn35_regs_init(struct dmub_srv *dmub, struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn351.c
11
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn351.c
16
void dmub_srv_dcn351_regs_init(struct dmub_srv *dmub, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn351.h
11
void dmub_srv_dcn351_regs_init(struct dmub_srv *dmub, struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn36.c
11
#define BASE_INNER(seg) ctx->dcn_reg_offsets[seg]
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn36.c
16
void dmub_srv_dcn36_regs_init(struct dmub_srv *dmub, struct dc_context *ctx)
sys/dev/pci/drm/amd/display/dmub/src/dmub_dcn36.h
11
void dmub_srv_dcn36_regs_init(struct dmub_srv *dmub, struct dc_context *ctx);
sys/dev/pci/drm/amd/display/dmub/src/dmub_srv.c
771
rb_params.ctx = dmub;
sys/dev/pci/drm/amd/display/dmub/src/dmub_srv.c
777
rb_params.ctx = dmub;
sys/dev/pci/drm/amd/display/dmub/src/dmub_srv.c
783
outbox0_rb_params.ctx = dmub;
sys/dev/pci/drm/amd/display/include/bios_parser_interface.h
34
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/include/gpio_service_interface.h
47
struct dc_context *ctx);
sys/dev/pci/drm/amd/display/include/irq_service_interface.h
30
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/include/logger_interface.h
128
unsigned long long perf_trc_start_stmp = dm_get_timestamp(dc->ctx)
sys/dev/pci/drm/amd/display/include/logger_interface.h
132
unsigned long long perf_trc_end_stmp = dm_get_timestamp(dc->ctx); \
sys/dev/pci/drm/amd/display/include/vector.h
34
struct dc_context *ctx;
sys/dev/pci/drm/amd/display/include/vector.h
39
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/include/vector.h
44
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/include/vector.h
51
struct dc_context *ctx,
sys/dev/pci/drm/amd/display/modules/freesync/freesync.c
1183
cur_tick = dm_get_timestamp(core_freesync->dc->ctx);
sys/dev/pci/drm/amd/display/modules/freesync/freesync.c
1185
div_u64(dm_get_elapse_time_in_ns(core_freesync->dc->ctx, cur_tick, 0), 1000);
sys/dev/pci/drm/amd/display/modules/freesync/freesync.c
127
unsigned int max_hw_v_total = stream->ctx->dc->caps.max_v_total;
sys/dev/pci/drm/amd/display/modules/freesync/freesync.c
129
if (stream->ctx->dc->caps.vtotal_limited_by_fp2) {
sys/dev/pci/drm/amd/display/modules/freesync/freesync.c
999
if (stream->ctx->dc->caps.max_v_total != 0 && stream->timing.h_total != 0) {
sys/dev/pci/drm/amd/include/amd_cper.h
220
struct cper_sec_nonstd_err_ctx ctx;
sys/dev/pci/drm/amd/include/atom-bits.h
32
#define U8(ptr) get_u8(ctx->ctx->bios, (ptr))
sys/dev/pci/drm/amd/include/atom-bits.h
33
#define CU8(ptr) get_u8(ctx->bios, (ptr))
sys/dev/pci/drm/amd/include/atom-bits.h
38
#define U16(ptr) get_u16(ctx->ctx->bios, (ptr))
sys/dev/pci/drm/amd/include/atom-bits.h
39
#define CU16(ptr) get_u16(ctx->bios, (ptr))
sys/dev/pci/drm/amd/include/atom-bits.h
44
#define U32(ptr) get_u32(ctx->ctx->bios, (ptr))
sys/dev/pci/drm/amd/include/atom-bits.h
45
#define CU32(ptr) get_u32(ctx->bios, (ptr))
sys/dev/pci/drm/amd/include/atom-bits.h
46
#define CSTR(ptr) (((char *)(ctx->bios))+(ptr))
sys/dev/pci/drm/apple/afk.c
222
struct dcp_parse_ctx ctx;
sys/dev/pci/drm/apple/afk.c
249
int ret = parse(props, props_size, &ctx);
sys/dev/pci/drm/apple/afk.c
256
ret = parse_epic_service_init(&ctx, &epic_name, &epic_class, &epic_unit);
sys/dev/pci/drm/apple/dcp_backlight.c
143
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/apple/dcp_backlight.c
147
DRM_MODESET_LOCK_ALL_BEGIN(crtc->dev, ctx, 0, ret);
sys/dev/pci/drm/apple/dcp_backlight.c
156
state->acquire_ctx = &ctx;
sys/dev/pci/drm/apple/dcp_backlight.c
170
DRM_MODESET_LOCK_ALL_END(crtc->dev, ctx, ret);
sys/dev/pci/drm/apple/dcp_backlight.c
197
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/apple/dcp_backlight.c
200
DRM_MODESET_LOCK_ALL_BEGIN(dcp->crtc->base.dev, ctx, 0, ret);
sys/dev/pci/drm/apple/dcp_backlight.c
205
DRM_MODESET_LOCK_ALL_END(dcp->crtc->base.dev, ctx, ret);
sys/dev/pci/drm/apple/iomfb_template.c
542
struct dcp_parse_ctx ctx;
sys/dev/pci/drm/apple/iomfb_template.c
551
ctx.dcp = dcp;
sys/dev/pci/drm/apple/iomfb_template.c
553
ret = parse(dcp->chunks.data, dcp->chunks.length, &ctx);
sys/dev/pci/drm/apple/iomfb_template.c
561
dcp->modes = enumerate_modes(&ctx, &dcp->nr_modes,
sys/dev/pci/drm/apple/iomfb_template.c
574
ret = parse_display_attributes(&ctx, &dcp->width_mm,
sys/dev/pci/drm/apple/parser.c
133
static bool consume_string(struct dcp_parse_ctx *ctx, const char *specimen)
sys/dev/pci/drm/apple/parser.c
137
ctx->pos = round_up(ctx->pos, 4);
sys/dev/pci/drm/apple/parser.c
139
if (ctx->pos + sizeof(*tag) + strlen(specimen) - 1 > ctx->len)
sys/dev/pci/drm/apple/parser.c
141
tag = ctx->blob + ctx->pos;
sys/dev/pci/drm/apple/parser.c
142
key = ctx->blob + ctx->pos + sizeof(*tag);
sys/dev/pci/drm/apple/parser.c
151
skip(ctx);
sys/dev/pci/drm/apple/parser.c
253
int parse(const void *blob, size_t size, struct dcp_parse_ctx *ctx)
sys/dev/pci/drm/apple/parser.c
257
*ctx = (struct dcp_parse_ctx) {
sys/dev/pci/drm/apple/parser.c
263
header = parse_u32(ctx);
sys/dev/pci/drm/apple/parser.c
33
static const void *parse_bytes(struct dcp_parse_ctx *ctx, size_t count)
sys/dev/pci/drm/apple/parser.c
35
const void *ptr = ctx->blob + ctx->pos;
sys/dev/pci/drm/apple/parser.c
37
if (ctx->pos + count > ctx->len)
sys/dev/pci/drm/apple/parser.c
40
ctx->pos += count;
sys/dev/pci/drm/apple/parser.c
44
static const u32 *parse_u32(struct dcp_parse_ctx *ctx)
sys/dev/pci/drm/apple/parser.c
46
return parse_bytes(ctx, sizeof(u32));
sys/dev/pci/drm/apple/parser.c
49
static const struct dcp_parse_tag *parse_tag(struct dcp_parse_ctx *ctx)
sys/dev/pci/drm/apple/parser.c
54
ctx->pos = round_up(ctx->pos, 4);
sys/dev/pci/drm/apple/parser.c
56
tag = parse_bytes(ctx, sizeof(struct dcp_parse_tag));
sys/dev/pci/drm/apple/parser.c
67
static const struct dcp_parse_tag *parse_tag_of_type(struct dcp_parse_ctx *ctx,
sys/dev/pci/drm/apple/parser.c
70
const struct dcp_parse_tag *tag = parse_tag(ctx);
sys/dev/pci/drm/apple/parser.h
101
int parse(const void *blob, size_t size, struct dcp_parse_ctx *ctx);
sys/dev/pci/drm/display/drm_dp_mst_topology.c
4312
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/display/drm_dp_mst_topology.c
4323
ret = drm_modeset_lock(&mgr->base.lock, ctx);
sys/dev/pci/drm/dma-resv.c
794
struct ww_acquire_ctx ctx;
sys/dev/pci/drm/dma-resv.c
806
ww_acquire_init(&ctx, &reservation_ww_class);
sys/dev/pci/drm/dma-resv.c
807
ret = dma_resv_lock(&obj, &ctx);
sys/dev/pci/drm/dma-resv.c
809
dma_resv_lock_slow(&obj, &ctx);
sys/dev/pci/drm/dma-resv.c
823
ww_acquire_fini(&ctx);
sys/dev/pci/drm/drm_atomic.c
1028
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_atomic.c
1036
ret = drm_modeset_lock(&dev->mode_config.connection_mutex, ctx);
sys/dev/pci/drm/drm_atomic_helper.c
3397
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_atomic_helper.c
3407
state->acquire_ctx = ctx;
sys/dev/pci/drm/drm_atomic_helper.c
3448
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_atomic_helper.c
3458
state->acquire_ctx = ctx;
sys/dev/pci/drm/drm_atomic_helper.c
3496
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_atomic_helper.c
3506
state->acquire_ctx = ctx;
sys/dev/pci/drm/drm_atomic_helper.c
3547
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_atomic_helper.c
3562
state->acquire_ctx = ctx;
sys/dev/pci/drm/drm_atomic_helper.c
3627
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_atomic_helper.c
3637
state->acquire_ctx = ctx;
sys/dev/pci/drm/drm_atomic_helper.c
3668
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_atomic_helper.c
3674
DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
sys/dev/pci/drm/drm_atomic_helper.c
3676
ret = drm_atomic_helper_disable_all(dev, &ctx);
sys/dev/pci/drm/drm_atomic_helper.c
3682
DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
sys/dev/pci/drm/drm_atomic_helper.c
3712
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_atomic_helper.c
3725
state->acquire_ctx = ctx;
sys/dev/pci/drm/drm_atomic_helper.c
3801
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_atomic_helper.c
3808
DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, err);
sys/dev/pci/drm/drm_atomic_helper.c
3810
state = drm_atomic_helper_duplicate_state(dev, &ctx);
sys/dev/pci/drm/drm_atomic_helper.c
3814
err = drm_atomic_helper_disable_all(dev, &ctx);
sys/dev/pci/drm/drm_atomic_helper.c
3822
DRM_MODESET_LOCK_ALL_END(dev, ctx, err);
sys/dev/pci/drm/drm_atomic_helper.c
3846
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_atomic_helper.c
3856
state->acquire_ctx = ctx;
sys/dev/pci/drm/drm_atomic_helper.c
3894
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_atomic_helper.c
3899
DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, err);
sys/dev/pci/drm/drm_atomic_helper.c
3901
err = drm_atomic_helper_commit_duplicated_state(state, &ctx);
sys/dev/pci/drm/drm_atomic_helper.c
3903
DRM_MODESET_LOCK_ALL_END(dev, ctx, err);
sys/dev/pci/drm/drm_atomic_helper.c
3970
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_atomic_helper.c
3980
state->acquire_ctx = ctx;
sys/dev/pci/drm/drm_atomic_helper.c
4014
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_atomic_helper.c
4025
state->acquire_ctx = ctx;
sys/dev/pci/drm/drm_atomic_uapi.c
1415
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_atomic_uapi.c
1467
drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
sys/dev/pci/drm/drm_atomic_uapi.c
1468
state->acquire_ctx = &ctx;
sys/dev/pci/drm/drm_atomic_uapi.c
1571
ret = drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_atomic_uapi.c
1578
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_atomic_uapi.c
1579
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_client_modeset.c
1049
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_client_modeset.c
1053
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/drm_client_modeset.c
1061
state->acquire_ctx = &ctx;
sys/dev/pci/drm/drm_client_modeset.c
1122
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_client_modeset.c
1123
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_client_modeset.c
1129
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_client_modeset.c
1256
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_client_modeset.c
1259
DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
sys/dev/pci/drm/drm_client_modeset.c
1273
DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
sys/dev/pci/drm/drm_client_modeset.c
636
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_client_modeset.c
648
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/drm_client_modeset.c
650
while (drm_modeset_lock_all_ctx(dev, &ctx) != 0)
sys/dev/pci/drm/drm_client_modeset.c
651
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_client_modeset.c
798
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_client_modeset.c
799
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_color_mgmt.c
280
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_color_mgmt.c
294
return crtc->funcs->gamma_set(crtc, red, green, blue, size, ctx);
sys/dev/pci/drm/drm_color_mgmt.c
324
state->acquire_ctx = ctx;
sys/dev/pci/drm/drm_color_mgmt.c
368
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_color_mgmt.c
385
DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
sys/dev/pci/drm/drm_color_mgmt.c
407
crtc->gamma_size, &ctx);
sys/dev/pci/drm/drm_color_mgmt.c
410
DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
sys/dev/pci/drm/drm_crtc.c
586
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_crtc.c
608
ret = crtc->funcs->set_config(set, ctx);
sys/dev/pci/drm/drm_crtc.c
704
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_crtc.c
730
DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx,
sys/dev/pci/drm/drm_crtc.c
869
ret = crtc->funcs->set_config(&set, &ctx);
sys/dev/pci/drm/drm_crtc.c
871
ret = __drm_mode_set_config_internal(&set, &ctx);
sys/dev/pci/drm/drm_crtc.c
892
DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
sys/dev/pci/drm/drm_crtc_helper.c
553
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_crtc_helper_internal.h
47
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/drm_damage_helper.c
114
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_damage_helper.c
125
drm_modeset_acquire_init(&ctx,
sys/dev/pci/drm/drm_damage_helper.c
133
state->acquire_ctx = &ctx;
sys/dev/pci/drm/drm_damage_helper.c
188
ret = drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_damage_helper.c
198
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_damage_helper.c
199
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_fb_helper.c
1026
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_fb_helper.c
1027
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_fb_helper.c
1033
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_fb_helper.c
954
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_fb_helper.c
963
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/drm_fb_helper.c
971
state->acquire_ctx = &ctx;
sys/dev/pci/drm/drm_framebuffer.c
1005
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_framebuffer.c
1016
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/drm_framebuffer.c
1023
state->acquire_ctx = &ctx;
sys/dev/pci/drm/drm_framebuffer.c
1027
ret = drm_modeset_lock_all_ctx(dev, &ctx);
sys/dev/pci/drm/drm_framebuffer.c
1089
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_framebuffer.c
1096
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_framebuffer.c
1097
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_gpusvm.c
1265
const struct drm_gpusvm_ctx *ctx)
sys/dev/pci/drm/drm_gpusvm.c
1268
.default_flags = HMM_PFN_REQ_FAULT | (ctx->read_only ? 0 :
sys/dev/pci/drm/drm_gpusvm.c
1273
.dev_private_owner = ctx->device_private_page_owner,
sys/dev/pci/drm/drm_gpusvm.c
1287
enum dma_data_direction dma_dir = ctx->read_only ? DMA_TO_DEVICE :
sys/dev/pci/drm/drm_gpusvm.c
1407
if (ctx->devmem_only) {
sys/dev/pci/drm/drm_gpusvm.c
1469
const struct drm_gpusvm_ctx *ctx)
sys/dev/pci/drm/drm_gpusvm.c
1474
drm_gpusvm_range_end(range), ctx);
sys/dev/pci/drm/drm_gpusvm.c
1494
const struct drm_gpusvm_ctx *ctx)
sys/dev/pci/drm/drm_gpusvm.c
1496
if (ctx->in_notifier)
sys/dev/pci/drm/drm_gpusvm.c
1503
if (!ctx->in_notifier)
sys/dev/pci/drm/drm_gpusvm.c
1522
const struct drm_gpusvm_ctx *ctx)
sys/dev/pci/drm/drm_gpusvm.c
1527
return drm_gpusvm_unmap_pages(gpusvm, &range->pages, npages, ctx);
sys/dev/pci/drm/drm_gpusvm.c
897
const struct drm_gpusvm_ctx *ctx)
sys/dev/pci/drm/drm_gpusvm.c
942
if (!ctx->read_only && !(vas->vm_flags & VM_WRITE)) {
sys/dev/pci/drm/drm_gpusvm.c
955
migrate_devmem = ctx->devmem_possible &&
sys/dev/pci/drm/drm_gpusvm.c
961
ctx->check_pages_threshold,
sys/dev/pci/drm/drm_gpusvm.c
962
ctx->device_private_page_owner);
sys/dev/pci/drm/drm_mipi_dsi.c
1003
void mipi_dsi_dcs_write_buffer_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
1006
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1010
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1015
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1017
(int)len, data, ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1034
void mipi_dsi_dual_dcs_write_buffer_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
1039
ctx->dsi = dsi1;
sys/dev/pci/drm/drm_mipi_dsi.c
1040
mipi_dsi_dcs_write_buffer_multi(ctx, data, len);
sys/dev/pci/drm/drm_mipi_dsi.c
1041
ctx->dsi = dsi2;
sys/dev/pci/drm/drm_mipi_dsi.c
1042
mipi_dsi_dcs_write_buffer_multi(ctx, data, len);
sys/dev/pci/drm/drm_mipi_dsi.c
1125
void mipi_dsi_dcs_read_multi(struct mipi_dsi_multi_context *ctx, u8 cmd,
sys/dev/pci/drm/drm_mipi_dsi.c
1128
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1140
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1145
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1147
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1568
void mipi_dsi_picture_parameter_set_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
1571
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1575
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1580
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1582
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1597
void mipi_dsi_compression_mode_ext_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
1602
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1606
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1611
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1613
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1626
void mipi_dsi_compression_mode_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
1629
return mipi_dsi_compression_mode_ext_multi(ctx, enable,
sys/dev/pci/drm/drm_mipi_dsi.c
1641
void mipi_dsi_dcs_nop_multi(struct mipi_dsi_multi_context *ctx)
sys/dev/pci/drm/drm_mipi_dsi.c
1643
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1647
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1652
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1654
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1666
void mipi_dsi_dcs_enter_sleep_mode_multi(struct mipi_dsi_multi_context *ctx)
sys/dev/pci/drm/drm_mipi_dsi.c
1668
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1672
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1677
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1679
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1691
void mipi_dsi_dcs_exit_sleep_mode_multi(struct mipi_dsi_multi_context *ctx)
sys/dev/pci/drm/drm_mipi_dsi.c
1693
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1697
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1702
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1704
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1716
void mipi_dsi_dcs_set_display_off_multi(struct mipi_dsi_multi_context *ctx)
sys/dev/pci/drm/drm_mipi_dsi.c
1718
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1722
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1727
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1729
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1741
void mipi_dsi_dcs_set_display_on_multi(struct mipi_dsi_multi_context *ctx)
sys/dev/pci/drm/drm_mipi_dsi.c
1743
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1747
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1752
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1754
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1767
void mipi_dsi_dcs_set_tear_on_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
1770
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1774
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1779
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1781
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1793
void mipi_dsi_turn_on_peripheral_multi(struct mipi_dsi_multi_context *ctx)
sys/dev/pci/drm/drm_mipi_dsi.c
1795
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1799
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1804
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1806
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1816
void mipi_dsi_dcs_set_tear_off_multi(struct mipi_dsi_multi_context *ctx)
sys/dev/pci/drm/drm_mipi_dsi.c
1818
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1822
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1827
ctx->accum_err = err;
sys/dev/pci/drm/drm_mipi_dsi.c
1829
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1841
void mipi_dsi_dcs_soft_reset_multi(struct mipi_dsi_multi_context *ctx)
sys/dev/pci/drm/drm_mipi_dsi.c
1843
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1847
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1852
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1854
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1868
void mipi_dsi_dcs_set_display_brightness_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
1871
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1875
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1880
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1882
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1896
void mipi_dsi_dcs_set_pixel_format_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
1899
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1903
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1908
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1910
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1925
void mipi_dsi_dcs_set_column_address_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
1928
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1932
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1937
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1939
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1954
void mipi_dsi_dcs_set_page_address_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
1957
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1961
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1966
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1968
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
1982
void mipi_dsi_dcs_set_tear_scanline_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
1985
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
1989
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
1994
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
1996
ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
796
void mipi_dsi_generic_write_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
799
struct mipi_dsi_device *dsi = ctx->dsi;
sys/dev/pci/drm/drm_mipi_dsi.c
803
if (ctx->accum_err)
sys/dev/pci/drm/drm_mipi_dsi.c
808
ctx->accum_err = ret;
sys/dev/pci/drm/drm_mipi_dsi.c
810
(int)size, payload, ctx->accum_err);
sys/dev/pci/drm/drm_mipi_dsi.c
827
void mipi_dsi_dual_generic_write_multi(struct mipi_dsi_multi_context *ctx,
sys/dev/pci/drm/drm_mipi_dsi.c
832
ctx->dsi = dsi1;
sys/dev/pci/drm/drm_mipi_dsi.c
833
mipi_dsi_generic_write_multi(ctx, payload, size);
sys/dev/pci/drm/drm_mipi_dsi.c
834
ctx->dsi = dsi2;
sys/dev/pci/drm/drm_mipi_dsi.c
835
mipi_dsi_generic_write_multi(ctx, payload, size);
sys/dev/pci/drm/drm_mode_object.c
461
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_mode_object.c
467
DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
sys/dev/pci/drm/drm_mode_object.c
487
DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
sys/dev/pci/drm/drm_mode_object.c
510
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_mode_object.c
516
DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
sys/dev/pci/drm/drm_mode_object.c
530
DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
sys/dev/pci/drm/drm_mode_object.c
542
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_mode_object.c
549
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/drm_mode_object.c
550
state->acquire_ctx = &ctx;
sys/dev/pci/drm/drm_mode_object.c
580
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_mode_object.c
586
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_mode_object.c
587
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_modeset_lock.c
148
struct drm_modeset_acquire_ctx *ctx;
sys/dev/pci/drm/drm_modeset_lock.c
152
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL | __GFP_NOFAIL);
sys/dev/pci/drm/drm_modeset_lock.c
154
ctx = kzalloc(sizeof(*ctx), M_WAITOK);
sys/dev/pci/drm/drm_modeset_lock.c
156
if (WARN_ON(!ctx))
sys/dev/pci/drm/drm_modeset_lock.c
161
drm_modeset_acquire_init(ctx, 0);
sys/dev/pci/drm/drm_modeset_lock.c
164
ret = drm_modeset_lock_all_ctx(dev, ctx);
sys/dev/pci/drm/drm_modeset_lock.c
167
drm_modeset_backoff(ctx);
sys/dev/pci/drm/drm_modeset_lock.c
171
drm_modeset_acquire_fini(ctx);
sys/dev/pci/drm/drm_modeset_lock.c
172
kfree(ctx);
sys/dev/pci/drm/drm_modeset_lock.c
175
ww_acquire_done(&ctx->ww_ctx);
sys/dev/pci/drm/drm_modeset_lock.c
183
config->acquire_ctx = ctx;
sys/dev/pci/drm/drm_modeset_lock.c
206
struct drm_modeset_acquire_ctx *ctx = config->acquire_ctx;
sys/dev/pci/drm/drm_modeset_lock.c
208
if (WARN_ON(!ctx))
sys/dev/pci/drm/drm_modeset_lock.c
212
drm_modeset_drop_locks(ctx);
sys/dev/pci/drm/drm_modeset_lock.c
213
drm_modeset_acquire_fini(ctx);
sys/dev/pci/drm/drm_modeset_lock.c
215
kfree(ctx);
sys/dev/pci/drm/drm_modeset_lock.c
252
void drm_modeset_acquire_init(struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/drm_modeset_lock.c
255
memset(ctx, 0, sizeof(*ctx));
sys/dev/pci/drm/drm_modeset_lock.c
256
ww_acquire_init(&ctx->ww_ctx, &crtc_ww_class);
sys/dev/pci/drm/drm_modeset_lock.c
257
INIT_LIST_HEAD(&ctx->locked);
sys/dev/pci/drm/drm_modeset_lock.c
260
ctx->interruptible = true;
sys/dev/pci/drm/drm_modeset_lock.c
268
void drm_modeset_acquire_fini(struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_modeset_lock.c
270
ww_acquire_fini(&ctx->ww_ctx);
sys/dev/pci/drm/drm_modeset_lock.c
280
void drm_modeset_drop_locks(struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_modeset_lock.c
282
if (WARN_ON(ctx->contended))
sys/dev/pci/drm/drm_modeset_lock.c
283
__drm_stack_depot_print(ctx->stack_depot);
sys/dev/pci/drm/drm_modeset_lock.c
285
while (!list_empty(&ctx->locked)) {
sys/dev/pci/drm/drm_modeset_lock.c
288
lock = list_first_entry(&ctx->locked,
sys/dev/pci/drm/drm_modeset_lock.c
297
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/drm_modeset_lock.c
302
if (WARN_ON(ctx->contended))
sys/dev/pci/drm/drm_modeset_lock.c
303
__drm_stack_depot_print(ctx->stack_depot);
sys/dev/pci/drm/drm_modeset_lock.c
305
if (ctx->trylock_only) {
sys/dev/pci/drm/drm_modeset_lock.c
306
lockdep_assert_held(&ctx->ww_ctx);
sys/dev/pci/drm/drm_modeset_lock.c
313
ret = ww_mutex_lock_slow_interruptible(&lock->mutex, &ctx->ww_ctx);
sys/dev/pci/drm/drm_modeset_lock.c
315
ret = ww_mutex_lock_interruptible(&lock->mutex, &ctx->ww_ctx);
sys/dev/pci/drm/drm_modeset_lock.c
317
ww_mutex_lock_slow(&lock->mutex, &ctx->ww_ctx);
sys/dev/pci/drm/drm_modeset_lock.c
320
ret = ww_mutex_lock(&lock->mutex, &ctx->ww_ctx);
sys/dev/pci/drm/drm_modeset_lock.c
324
list_add(&lock->head, &ctx->locked);
sys/dev/pci/drm/drm_modeset_lock.c
333
ctx->contended = lock;
sys/dev/pci/drm/drm_modeset_lock.c
334
ctx->stack_depot = __drm_stack_depot_save();
sys/dev/pci/drm/drm_modeset_lock.c
352
int drm_modeset_backoff(struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_modeset_lock.c
354
struct drm_modeset_lock *contended = ctx->contended;
sys/dev/pci/drm/drm_modeset_lock.c
356
ctx->contended = NULL;
sys/dev/pci/drm/drm_modeset_lock.c
357
ctx->stack_depot = 0;
sys/dev/pci/drm/drm_modeset_lock.c
362
drm_modeset_drop_locks(ctx);
sys/dev/pci/drm/drm_modeset_lock.c
364
return modeset_lock(contended, ctx, ctx->interruptible, true);
sys/dev/pci/drm/drm_modeset_lock.c
399
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_modeset_lock.c
401
if (ctx)
sys/dev/pci/drm/drm_modeset_lock.c
402
return modeset_lock(lock, ctx, ctx->interruptible, false);
sys/dev/pci/drm/drm_modeset_lock.c
456
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_modeset_lock.c
463
ret = drm_modeset_lock(&dev->mode_config.connection_mutex, ctx);
sys/dev/pci/drm/drm_modeset_lock.c
468
ret = drm_modeset_lock(&crtc->mutex, ctx);
sys/dev/pci/drm/drm_modeset_lock.c
474
ret = drm_modeset_lock(&plane->mutex, ctx);
sys/dev/pci/drm/drm_modeset_lock.c
480
ret = drm_modeset_lock(&privobj->lock, ctx);
sys/dev/pci/drm/drm_plane.c
1026
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_plane.c
1035
ret = plane->funcs->disable_plane(plane, ctx);
sys/dev/pci/drm/drm_plane.c
1054
src_x, src_y, src_w, src_h, ctx);
sys/dev/pci/drm/drm_plane.c
1078
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_plane.c
1086
return plane->funcs->disable_plane(plane, ctx);
sys/dev/pci/drm/drm_plane.c
1103
src_x, src_y, src_w, src_h, ctx);
sys/dev/pci/drm/drm_plane.c
1115
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_plane.c
1118
DRM_MODESET_LOCK_ALL_BEGIN(plane->dev, ctx,
sys/dev/pci/drm/drm_plane.c
1124
src_x, src_y, src_w, src_h, &ctx);
sys/dev/pci/drm/drm_plane.c
1128
src_x, src_y, src_w, src_h, &ctx);
sys/dev/pci/drm/drm_plane.c
1130
DRM_MODESET_LOCK_ALL_END(plane->dev, ctx, ret);
sys/dev/pci/drm/drm_plane.c
1190
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_plane.c
1258
0, 0, src_w, src_h, ctx);
sys/dev/pci/drm/drm_plane.c
1262
0, 0, src_w, src_h, ctx);
sys/dev/pci/drm/drm_plane.c
1281
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_plane.c
1296
drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
sys/dev/pci/drm/drm_plane.c
1298
ret = drm_modeset_lock(&crtc->mutex, &ctx);
sys/dev/pci/drm/drm_plane.c
1306
ret = drm_modeset_lock(&crtc->cursor->mutex, &ctx);
sys/dev/pci/drm/drm_plane.c
1315
ret = drm_mode_cursor_universal(crtc, req, file_priv, &ctx);
sys/dev/pci/drm/drm_plane.c
1343
ret = drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_plane.c
1348
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_plane.c
1349
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_plane.c
1390
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_plane.c
1459
drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
sys/dev/pci/drm/drm_plane.c
1461
ret = drm_modeset_lock(&crtc->mutex, &ctx);
sys/dev/pci/drm/drm_plane.c
1464
ret = drm_modeset_lock(&plane->mutex, &ctx);
sys/dev/pci/drm/drm_plane.c
1541
&ctx);
sys/dev/pci/drm/drm_plane.c
1544
&ctx);
sys/dev/pci/drm/drm_plane.c
1566
ret = drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_plane.c
1571
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_plane.c
1572
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_plane_helper.c
171
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_plane_helper.c
215
return plane->funcs->disable_plane(plane, ctx);
sys/dev/pci/drm/drm_plane_helper.c
237
ret = crtc->funcs->set_config(&set, ctx);
sys/dev/pci/drm/drm_plane_helper.c
259
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_probe_helper.c
100
ret = drm_connector_mode_valid(connector, mode, ctx, status);
sys/dev/pci/drm/drm_probe_helper.c
1322
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/drm_probe_helper.c
207
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/drm_probe_helper.c
217
ret = connector_funcs->mode_valid_ctx(connector, mode, ctx,
sys/dev/pci/drm/drm_probe_helper.c
343
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/drm_probe_helper.c
349
return funcs->detect_ctx(connector, ctx, force);
sys/dev/pci/drm/drm_probe_helper.c
359
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_probe_helper.c
362
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/drm_probe_helper.c
365
ret = drm_modeset_lock(&connector->dev->mode_config.connection_mutex, &ctx);
sys/dev/pci/drm/drm_probe_helper.c
367
ret = detect_connector_status(connector, &ctx, force);
sys/dev/pci/drm/drm_probe_helper.c
370
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_probe_helper.c
380
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_probe_helper.c
381
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_probe_helper.c
398
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/drm_probe_helper.c
404
if (!ctx)
sys/dev/pci/drm/drm_probe_helper.c
407
ret = drm_modeset_lock(&dev->mode_config.connection_mutex, ctx);
sys/dev/pci/drm/drm_probe_helper.c
411
ret = detect_connector_status(connector, ctx, force);
sys/dev/pci/drm/drm_probe_helper.c
447
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/drm_probe_helper.c
483
ret = drm_mode_validate_pipeline(mode, connector, ctx,
sys/dev/pci/drm/drm_probe_helper.c
566
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_probe_helper.c
570
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/drm_probe_helper.c
576
ret = drm_modeset_lock(&dev->mode_config.connection_mutex, &ctx);
sys/dev/pci/drm/drm_probe_helper.c
578
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_probe_helper.c
598
ret = drm_helper_probe_detect(connector, &ctx, true);
sys/dev/pci/drm/drm_probe_helper.c
601
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_probe_helper.c
665
ret = __drm_helper_update_and_validate(connector, maxX, maxY, &ctx);
sys/dev/pci/drm/drm_probe_helper.c
667
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_probe_helper.c
684
ret = __drm_helper_update_and_validate(connector, maxX, maxY, &ctx);
sys/dev/pci/drm/drm_probe_helper.c
686
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_probe_helper.c
693
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_probe_helper.c
694
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_probe_helper.c
92
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/drm_self_refresh_helper.c
121
ret = drm_modeset_backoff(&ctx);
sys/dev/pci/drm/drm_self_refresh_helper.c
129
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/drm_self_refresh_helper.c
130
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/drm_self_refresh_helper.c
75
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/drm_self_refresh_helper.c
82
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/drm_self_refresh_helper.c
91
state->acquire_ctx = &ctx;
sys/dev/pci/drm/hdmi.c
1375
hdmi_audio_coding_type_ext_get_name(enum hdmi_audio_coding_type_ext ctx)
sys/dev/pci/drm/hdmi.c
1377
if (ctx < 0 || ctx > 0x1f)
sys/dev/pci/drm/hdmi.c
1380
switch (ctx) {
sys/dev/pci/drm/i915/display/i9xx_wm.c
3586
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/i9xx_wm.c
3603
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/i915/display/i9xx_wm.c
3605
state->acquire_ctx = &ctx;
sys/dev/pci/drm/i915/display/i9xx_wm.c
3636
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/i915/display/i9xx_wm.c
3656
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/i915/display/i9xx_wm.c
3657
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/i915/display/intel_audio.c
962
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_audio.c
971
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/i915/display/intel_audio.c
976
state->acquire_ctx = &ctx;
sys/dev/pci/drm/i915/display/intel_audio.c
984
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/i915/display/intel_audio.c
992
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/i915/display/intel_audio.c
993
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/i915/display/intel_crt.c
843
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_crt.c
910
state = intel_load_detect_get_pipe(connector, ctx);
sys/dev/pci/drm/i915/display/intel_crt.c
925
intel_load_detect_release_pipe(connector, state, ctx);
sys/dev/pci/drm/i915/display/intel_cursor.c
807
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_cursor.c
967
src_x, src_y, src_w, src_h, ctx);
sys/dev/pci/drm/i915/display/intel_ddi.c
4675
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_ddi.c
4691
ctx);
sys/dev/pci/drm/i915/display/intel_ddi.c
4701
ret = drm_modeset_lock(&crtc->base.mutex, ctx);
sys/dev/pci/drm/i915/display/intel_ddi.c
4743
return intel_modeset_commit_pipes(display, BIT(crtc->pipe), ctx);
sys/dev/pci/drm/i915/display/intel_ddi.c
4764
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_ddi.c
4775
intel_modeset_lock_ctx_retry(&ctx, NULL, 0, ret)
sys/dev/pci/drm/i915/display/intel_ddi.c
4776
ret = intel_hdmi_reset_link(encoder, &ctx);
sys/dev/pci/drm/i915/display/intel_display.c
5603
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_display.c
5613
state->acquire_ctx = ctx;
sys/dev/pci/drm/i915/display/intel_display.c
8161
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_display.c
8169
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/i915/display/intel_display.c
8171
state->acquire_ctx = &ctx;
sys/dev/pci/drm/i915/display/intel_display.c
8220
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/i915/display/intel_display.c
8226
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/i915/display/intel_display.c
8227
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/i915/display/intel_display.h
520
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/i915/display/intel_display_debugfs.c
890
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_display_debugfs.c
895
drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
sys/dev/pci/drm/i915/display/intel_display_debugfs.c
900
&ctx);
sys/dev/pci/drm/i915/display/intel_display_debugfs.c
902
if (ret == -EDEADLK && !drm_modeset_backoff(&ctx)) {
sys/dev/pci/drm/i915/display/intel_display_debugfs.c
913
ret = drm_modeset_lock(&crtc->mutex, &ctx);
sys/dev/pci/drm/i915/display/intel_display_debugfs.c
915
ret = drm_modeset_backoff(&ctx);
sys/dev/pci/drm/i915/display/intel_display_debugfs.c
948
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/i915/display/intel_display_debugfs.c
949
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/i915/display/intel_display_driver.c
329
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_display_driver.c
332
intel_modeset_lock_ctx_retry(&ctx, NULL, 0, err) {
sys/dev/pci/drm/i915/display/intel_display_driver.c
333
err = drm_modeset_lock_all_ctx(display->drm, &ctx);
sys/dev/pci/drm/i915/display/intel_display_driver.c
748
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_display_driver.c
754
intel_modeset_setup_hw_state(display, ctx);
sys/dev/pci/drm/i915/display/intel_display_driver.c
777
ret = drm_atomic_helper_commit_duplicated_state(state, ctx);
sys/dev/pci/drm/i915/display/intel_display_driver.c
787
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_display_driver.c
798
state->acquire_ctx = &ctx;
sys/dev/pci/drm/i915/display/intel_display_driver.c
800
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/i915/display/intel_display_driver.c
803
ret = drm_modeset_lock_all_ctx(display->drm, &ctx);
sys/dev/pci/drm/i915/display/intel_display_driver.c
807
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/i915/display/intel_display_driver.c
811
ret = __intel_display_driver_resume(display, state, &ctx);
sys/dev/pci/drm/i915/display/intel_display_driver.c
814
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/i915/display/intel_display_driver.c
815
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/i915/display/intel_display_driver.h
33
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/i915/display/intel_display_reset.c
113
ret = __intel_display_driver_resume(display, state, ctx);
sys/dev/pci/drm/i915/display/intel_display_reset.c
123
drm_modeset_drop_locks(ctx);
sys/dev/pci/drm/i915/display/intel_display_reset.c
124
drm_modeset_acquire_fini(ctx);
sys/dev/pci/drm/i915/display/intel_display_reset.c
27
struct drm_modeset_acquire_ctx *ctx = &display->restore.reset_ctx;
sys/dev/pci/drm/i915/display/intel_display_reset.c
45
drm_modeset_acquire_init(ctx, 0);
sys/dev/pci/drm/i915/display/intel_display_reset.c
47
ret = drm_modeset_lock_all_ctx(display->drm, ctx);
sys/dev/pci/drm/i915/display/intel_display_reset.c
51
drm_modeset_backoff(ctx);
sys/dev/pci/drm/i915/display/intel_display_reset.c
57
state = drm_atomic_helper_duplicate_state(display->drm, ctx);
sys/dev/pci/drm/i915/display/intel_display_reset.c
65
ret = drm_atomic_helper_disable_all(display->drm, ctx);
sys/dev/pci/drm/i915/display/intel_display_reset.c
74
state->acquire_ctx = ctx;
sys/dev/pci/drm/i915/display/intel_display_reset.c
82
struct drm_modeset_acquire_ctx *ctx = &display->restore.reset_ctx;
sys/dev/pci/drm/i915/display/intel_display_reset.c
96
ret = drm_atomic_helper_commit_duplicated_state(state, ctx);
sys/dev/pci/drm/i915/display/intel_dp.c
5355
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_dp.c
5379
ret = drm_modeset_lock(&crtc->base.mutex, ctx);
sys/dev/pci/drm/i915/display/intel_dp.c
5414
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_dp.c
5425
ctx);
sys/dev/pci/drm/i915/display/intel_dp.c
5432
ret = intel_dp_get_active_pipes(intel_dp, ctx, &pipe_mask);
sys/dev/pci/drm/i915/display/intel_dp.c
5447
ret = intel_modeset_commit_pipes(display, pipe_mask, ctx);
sys/dev/pci/drm/i915/display/intel_dp.c
5464
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_dp.c
5467
intel_modeset_lock_ctx_retry(&ctx, NULL, 0, ret)
sys/dev/pci/drm/i915/display/intel_dp.c
5468
ret = intel_dp_retrain_link(encoder, &ctx);
sys/dev/pci/drm/i915/display/intel_dp.c
5901
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_dp.c
5962
ret = intel_dp_tunnel_detect(intel_dp, ctx);
sys/dev/pci/drm/i915/display/intel_dp.h
55
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_dp_mst.c
1450
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_dp_mst.c
1510
ret = drm_modeset_lock(&mgr->base.lock, ctx);
sys/dev/pci/drm/i915/display/intel_dp_mst.c
1576
struct drm_modeset_acquire_ctx *ctx, bool force)
sys/dev/pci/drm/i915/display/intel_dp_mst.c
1593
return drm_dp_mst_detect_port(&connector->base, ctx, &intel_dp->mst.mgr,
sys/dev/pci/drm/i915/display/intel_dp_test.c
403
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_dp_test.c
427
ret = drm_modeset_lock(&crtc->base.mutex, ctx);
sys/dev/pci/drm/i915/display/intel_dp_test.c
451
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_dp_test.c
460
ctx);
sys/dev/pci/drm/i915/display/intel_dp_test.c
464
ret = intel_dp_prep_phy_test(intel_dp, ctx, &pipe_mask);
sys/dev/pci/drm/i915/display/intel_dp_test.c
495
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_dp_test.c
502
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/i915/display/intel_dp_test.c
505
ret = intel_dp_do_phy_test(encoder, &ctx);
sys/dev/pci/drm/i915/display/intel_dp_test.c
508
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/i915/display/intel_dp_test.c
515
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/i915/display/intel_dp_test.c
516
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/i915/display/intel_dp_tunnel.c
161
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_dp_tunnel.c
166
err = intel_dp_get_active_pipes(intel_dp, ctx, &pipe_mask);
sys/dev/pci/drm/i915/display/intel_dp_tunnel.c
173
static int detect_new_tunnel(struct intel_dp *intel_dp, struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_dp_tunnel.c
202
ret = allocate_initial_tunnel_bw(intel_dp, ctx);
sys/dev/pci/drm/i915/display/intel_dp_tunnel.c
228
int intel_dp_tunnel_detect(struct intel_dp *intel_dp, struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_dp_tunnel.c
244
return detect_new_tunnel(intel_dp, ctx);
sys/dev/pci/drm/i915/display/intel_dp_tunnel.h
26
int intel_dp_tunnel_detect(struct intel_dp *intel_dp, struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/i915/display/intel_dp_tunnel.h
62
intel_dp_tunnel_detect(struct intel_dp *intel_dp, struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1510
static void skl_wrpll_try_divider(struct skl_wrpll_context *ctx,
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1523
deviation < ctx->min_deviation) {
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1524
ctx->min_deviation = deviation;
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1525
ctx->central_freq = central_freq;
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1526
ctx->dco_freq = dco_freq;
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1527
ctx->p = divider;
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1531
deviation < ctx->min_deviation) {
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1532
ctx->min_deviation = deviation;
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1533
ctx->central_freq = central_freq;
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1534
ctx->dco_freq = dco_freq;
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1535
ctx->p = divider;
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1687
struct skl_wrpll_context ctx = {
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1700
skl_wrpll_try_divider(&ctx,
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1709
if (ctx.min_deviation == 0)
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1719
if (d == 0 && ctx.p)
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1723
if (!ctx.p)
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1731
skl_wrpll_get_multipliers(ctx.p, &p0, &p1, &p2);
sys/dev/pci/drm/i915/display/intel_dpll_mgr.c
1733
ctx.central_freq, p0, p1, p2);
sys/dev/pci/drm/i915/display/intel_global_state.c
147
static bool modeset_lock_is_held(struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_global_state.c
152
list_for_each_entry(l, &ctx->locked, head) {
sys/dev/pci/drm/i915/display/intel_global_state.c
163
struct drm_modeset_acquire_ctx *ctx = state->base.acquire_ctx;
sys/dev/pci/drm/i915/display/intel_global_state.c
167
if (modeset_lock_is_held(ctx, &crtc->base.mutex))
sys/dev/pci/drm/i915/display/intel_load_detect.c
128
state->acquire_ctx = ctx;
sys/dev/pci/drm/i915/display/intel_load_detect.c
131
restore_state->acquire_ctx = ctx;
sys/dev/pci/drm/i915/display/intel_load_detect.c
205
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_load_detect.c
220
ret = drm_atomic_helper_commit_duplicated_state(state, ctx);
sys/dev/pci/drm/i915/display/intel_load_detect.c
50
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_load_detect.c
83
ret = drm_modeset_lock(&crtc->base.mutex, ctx);
sys/dev/pci/drm/i915/display/intel_load_detect.c
97
ret = drm_modeset_lock(&possible_crtc->base.mutex, ctx);
sys/dev/pci/drm/i915/display/intel_load_detect.h
15
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/i915/display/intel_load_detect.h
18
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/i915/display/intel_modeset_lock.c
11
void _intel_modeset_lock_begin(struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_modeset_lock.c
15
drm_modeset_acquire_init(ctx, flags);
sys/dev/pci/drm/i915/display/intel_modeset_lock.c
18
state->base.acquire_ctx = ctx;
sys/dev/pci/drm/i915/display/intel_modeset_lock.c
33
void _intel_modeset_lock_end(struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_modeset_lock.c
41
*ret = drm_modeset_backoff(ctx);
sys/dev/pci/drm/i915/display/intel_modeset_lock.c
48
drm_modeset_drop_locks(ctx);
sys/dev/pci/drm/i915/display/intel_modeset_lock.c
49
drm_modeset_acquire_fini(ctx);
sys/dev/pci/drm/i915/display/intel_modeset_lock.h
14
void _intel_modeset_lock_begin(struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_modeset_lock.h
19
void _intel_modeset_lock_end(struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_modeset_lock.h
28
#define intel_modeset_lock_ctx_retry(ctx, state, flags, ret) \
sys/dev/pci/drm/i915/display/intel_modeset_lock.h
29
for (_intel_modeset_lock_begin((ctx), (state), (flags), &(ret)); \
sys/dev/pci/drm/i915/display/intel_modeset_lock.h
31
_intel_modeset_lock_end((ctx), (state), &(ret)))
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
261
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
281
intel_crtc_disable_noatomic_begin(temp_crtc, ctx);
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
284
intel_crtc_disable_noatomic_begin(temp_crtc, ctx);
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
287
intel_crtc_disable_noatomic_begin(temp_crtc, ctx);
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
41
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
467
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
504
intel_crtc_disable_noatomic(crtc, ctx);
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
519
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
539
if (intel_sanitize_crtc(crtc, ctx))
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
70
state->acquire_ctx = ctx;
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
932
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_modeset_setup.c
983
intel_sanitize_all_crtcs(display, ctx);
sys/dev/pci/drm/i915/display/intel_modeset_setup.h
13
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/i915/display/intel_pipe_crc.c
287
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_pipe_crc.c
293
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/i915/display/intel_pipe_crc.c
301
state->acquire_ctx = &ctx;
sys/dev/pci/drm/i915/display/intel_pipe_crc.c
324
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/i915/display/intel_pipe_crc.c
332
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/i915/display/intel_pipe_crc.c
333
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/i915/display/intel_psr.c
3183
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_psr.c
3192
drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
sys/dev/pci/drm/i915/display/intel_psr.c
3194
state->acquire_ctx = &ctx;
sys/dev/pci/drm/i915/display/intel_psr.c
3231
err = drm_modeset_backoff(&ctx);
sys/dev/pci/drm/i915/display/intel_psr.c
3236
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/i915/display/intel_psr.c
3237
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/i915/display/intel_sprite_uapi.c
120
drm_modeset_backoff(&ctx);
sys/dev/pci/drm/i915/display/intel_sprite_uapi.c
125
drm_modeset_drop_locks(&ctx);
sys/dev/pci/drm/i915/display/intel_sprite_uapi.c
126
drm_modeset_acquire_fini(&ctx);
sys/dev/pci/drm/i915/display/intel_sprite_uapi.c
50
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_sprite_uapi.c
81
drm_modeset_acquire_init(&ctx, 0);
sys/dev/pci/drm/i915/display/intel_sprite_uapi.c
88
state->acquire_ctx = &ctx;
sys/dev/pci/drm/i915/display/intel_tc.c
1756
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/i915/display/intel_tc.c
1765
ret = drm_modeset_lock(&display->drm->mode_config.connection_mutex, ctx);
sys/dev/pci/drm/i915/display/intel_tc.c
1769
ret = intel_dp_get_active_pipes(intel_dp, ctx, &pipe_mask);
sys/dev/pci/drm/i915/display/intel_tc.c
1795
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/i915/display/intel_tc.c
1807
intel_modeset_lock_ctx_retry(&ctx, state, 0, ret)
sys/dev/pci/drm/i915/display/intel_tc.c
1808
ret = reset_link_commit(tc, state, &ctx);
sys/dev/pci/drm/i915/display/intel_tv.c
1709
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/i915/display/intel_tv.c
1729
state = intel_load_detect_get_pipe(connector, ctx);
sys/dev/pci/drm/i915/display/intel_tv.c
1735
intel_load_detect_release_pipe(connector, state, ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1002
ctx->i915->params.request_timeout_ms) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1003
unsigned int timeout_ms = ctx->i915->params.request_timeout_ms;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1012
if (test_bit(UCONTEXT_LOW_LATENCY, &ctx->user_flags))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1086
struct i915_gem_context *ctx = engines->ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1093
spin_lock_irqsave(&ctx->stale.lock, flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1095
spin_unlock_irqrestore(&ctx->stale.lock, flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1097
accumulate_runtime(ctx->client, engines);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1098
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
111
static void lut_close(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1123
static struct i915_gem_engines *default_engines(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1134
for_each_uabi_engine(engine, ctx->i915) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1157
ret = intel_context_set_gem(ce, ctx, sseu);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
116
mutex_lock(&ctx->lut_mutex);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
118
radix_tree_for_each_slot(slot, &ctx->handles_vma, &iter, 0) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1206
static struct i915_gem_engines *user_engines(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1251
ret = intel_context_set_gem(ce, ctx, pe->sseu);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1257
ret = intel_context_set_gem(child, ctx, pe->sseu);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
128
if (lut->ctx != ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1291
struct i915_gem_context *ctx = container_of(work, typeof(*ctx),
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1295
trace_i915_context_free(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1296
GEM_BUG_ON(!i915_gem_context_is_closed(ctx));
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1298
spin_lock(&ctx->i915->gem.contexts.lock);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1299
list_del(&ctx->link);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1300
spin_unlock(&ctx->i915->gem.contexts.lock);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1302
if (ctx->syncobj)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1303
drm_syncobj_put(ctx->syncobj);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1305
vm = ctx->vm;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1309
if (ctx->pxp_wakeref)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1310
intel_runtime_pm_put(&ctx->i915->runtime_pm, ctx->pxp_wakeref);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1312
if (ctx->client)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1313
i915_drm_client_put(ctx->client);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1315
mutex_destroy(&ctx->engines_mutex);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1316
mutex_destroy(&ctx->lut_mutex);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1318
put_pid(ctx->pid);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1319
mutex_destroy(&ctx->mutex);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1321
kfree_rcu(ctx, rcu);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1326
struct i915_gem_context *ctx = container_of(ref, typeof(*ctx), ref);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1328
queue_work(ctx->i915->wq, &ctx->release_work);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1332
__context_engines_static(const struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1334
return rcu_dereference_protected(ctx->engines, true);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1337
static void __reset_context(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1341
"context closure in %s", ctx->name);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
141
radix_tree_iter_delete(&ctx->handles_vma, &iter, slot);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1436
__reset_context(engines->ctx, engine);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1440
static void kill_context(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1445
spin_lock_irq(&ctx->stale.lock);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1446
GEM_BUG_ON(!i915_gem_context_is_closed(ctx));
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1447
list_for_each_entry_safe(pos, next, &ctx->stale.engines, link) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1457
if (IS_GRAPHICS_VER(ctx->i915, 4, 8)) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1465
spin_unlock_irq(&ctx->stale.lock);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1467
kill_engines(pos, !ctx->i915->params.enable_hangcheck,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1468
i915_gem_context_is_persistent(ctx));
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1470
spin_lock_irq(&ctx->stale.lock);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1477
spin_unlock_irq(&ctx->stale.lock);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1480
static void engines_idle_release(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1488
engines->ctx = i915_gem_context_get(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
149
mutex_unlock(&ctx->lut_mutex);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1507
spin_lock_irq(&ctx->stale.lock);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1508
if (!i915_gem_context_is_closed(ctx))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1509
list_add_tail(&engines->link, &ctx->stale.engines);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1510
spin_unlock_irq(&ctx->stale.lock);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1515
i915_gem_context_is_persistent(ctx));
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1520
static void set_closed_name(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1526
s = strrchr(ctx->name, '[');
sys/dev/pci/drm/i915/gem/i915_gem_context.c
153
lookup_user_engine(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1537
static void context_close(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1542
mutex_lock(&ctx->engines_mutex);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1543
unpin_engines(__context_engines_static(ctx));
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1544
engines_idle_release(ctx, rcu_replace_pointer(ctx->engines, NULL, 1));
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1545
i915_gem_context_set_closed(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1546
mutex_unlock(&ctx->engines_mutex);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1548
mutex_lock(&ctx->mutex);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1550
set_closed_name(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1557
lut_close(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1559
ctx->file_priv = ERR_PTR(-EBADF);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1561
client = ctx->client;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1564
list_del_rcu(&ctx->client_link);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1568
mutex_unlock(&ctx->mutex);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1577
kill_context(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1579
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1582
static int __context_set_persistence(struct i915_gem_context *ctx, bool state)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1584
if (i915_gem_context_is_persistent(ctx) == state)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1593
if (!ctx->i915->params.enable_hangcheck)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1596
i915_gem_context_set_persistence(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1599
if (!(ctx->i915->caps.scheduler & I915_SCHEDULER_CAP_PREEMPTION))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
160
if (!!(flags & LOOKUP_USER_INDEX) != i915_gem_context_user_engines(ctx))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1615
if (!intel_has_reset_engine(to_gt(ctx->i915)))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1618
i915_gem_context_clear_persistence(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1628
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
163
if (!i915_gem_context_user_engines(ctx)) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1634
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1635
if (!ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1638
kref_init(&ctx->ref);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1639
ctx->i915 = i915;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1640
ctx->sched = pc->sched;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1641
rw_init(&ctx->mutex, "gemctx");
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1642
INIT_LIST_HEAD(&ctx->link);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1643
INIT_WORK(&ctx->release_work, i915_gem_context_release_work);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1645
mtx_init(&ctx->stale.lock, IPL_TTY);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1646
INIT_LIST_HEAD(&ctx->stale.engines);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
166
engine = intel_engine_lookup_user(ctx->i915,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1664
ctx->vm = vm;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1667
ctx->user_flags = pc->user_flags;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1669
rw_init(&ctx->engines_mutex, "gemeng");
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1671
i915_gem_context_set_user_engines(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1672
e = user_engines(ctx, pc->num_user_engines, pc->user_engines);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1674
i915_gem_context_clear_user_engines(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1675
e = default_engines(ctx, pc->legacy_rcs_sseu);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1681
RCU_INIT_POINTER(ctx->engines, e);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1683
INIT_RADIX_TREE(&ctx->handles_vma, GFP_KERNEL);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1684
rw_init(&ctx->lut_mutex, "lutrw");
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1689
ctx->remap_slice = ALL_L3_SLICES(i915);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1691
for (i = 0; i < ARRAY_SIZE(ctx->hang_timestamp); i++)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1692
ctx->hang_timestamp[i] = jiffies - CONTEXT_FAST_HANG_JIFFIES;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1695
err = drm_syncobj_create(&ctx->syncobj,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1703
ctx->pxp_wakeref = intel_runtime_pm_get(&i915->runtime_pm);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1704
ctx->uses_protected_content = true;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1707
trace_i915_context_create(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1709
return ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1714
if (ctx->vm)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1715
i915_vm_put(ctx->vm);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1717
kfree(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1736
static void gem_context_register(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1740
struct drm_i915_private *i915 = ctx->i915;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1743
ctx->file_priv = fpriv;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1746
ctx->pid = get_task_pid(current, PIDTYPE_PID);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1747
ctx->client = i915_drm_client_get(fpriv->client);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1749
snprintf(ctx->name, sizeof(ctx->name), "%s[%d]",
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1750
current->comm, pid_nr(ctx->pid));
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1752
ctx->pid = curproc->p_p->ps_pid;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1753
ctx->client = i915_drm_client_get(fpriv->client);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1755
snprintf(ctx->name, sizeof(ctx->name), "%s[%d]",
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1756
curproc->p_p->ps_comm, ctx->pid);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1759
spin_lock(&ctx->client->ctx_lock);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1760
list_add_tail_rcu(&ctx->client_link, &ctx->client->ctx_list);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1761
spin_unlock(&ctx->client->ctx_lock);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1764
list_add_tail(&ctx->link, &i915->gem.contexts.list);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1768
old = xa_store(&fpriv->context_xa, id, ctx, GFP_KERNEL);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
177
return i915_gem_context_get_engine(ctx, idx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1777
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1795
ctx = i915_gem_create_context(i915, pc);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1797
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1798
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1802
gem_context_register(ctx, file_priv, 0);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1819
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1827
xa_for_each(&file_priv->context_xa, idx, ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1828
context_close(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1901
struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1908
if (!i915_gem_context_has_full_ppgtt(ctx))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
1911
vm = ctx->vm;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2035
static int set_sseu(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2038
struct drm_i915_private *i915 = ctx->i915;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2065
ce = lookup_user_engine(ctx, lookup, &user_sseu.engine);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2091
set_persistence(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2097
return __context_set_persistence(ctx, args->value);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2100
static int set_priority(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2107
err = validate_priority(ctx->i915, args);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2111
ctx->sched.priority = args->value;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2113
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2117
if (ctx->sched.priority >= I915_PRIORITY_NORMAL &&
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2123
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2128
static int get_protected(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2132
args->value = i915_gem_context_uses_protected_content(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2137
static int set_context_image(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2150
if (!ctx->i915->params.enable_debug_only_api)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2169
ce = lookup_user_engine(ctx, lookup, &user.engine);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2178
if (drm_WARN_ON_ONCE(&ctx->i915->drm,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2221
struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2231
i915_gem_context_set_no_error_capture(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2233
i915_gem_context_clear_no_error_capture(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2242
i915_gem_context_set_bannable(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2243
else if (i915_gem_context_uses_protected_content(ctx))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2246
i915_gem_context_clear_bannable(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2253
i915_gem_context_clear_recoverable(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2254
else if (i915_gem_context_uses_protected_content(ctx))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2257
i915_gem_context_set_recoverable(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2261
ret = set_priority(ctx, args);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2265
ret = set_sseu(ctx, args);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2269
ret = set_persistence(ctx, args);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2273
ret = set_context_image(ctx, args);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2327
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2330
ctx = xa_load(&file_priv->context_xa, id);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2331
if (ctx && !kref_get_unless_zero(&ctx->ref))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2332
ctx = NULL;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2335
return ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2342
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2347
ctx = i915_gem_create_context(file_priv->i915, pc);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2348
if (IS_ERR(ctx))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2349
return ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2358
i915_gem_context_get(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2360
gem_context_register(ctx, file_priv, id);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2366
return ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2373
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2375
ctx = __context_lookup(file_priv, id);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2376
if (ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2377
return ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2381
ctx = __context_lookup(file_priv, id);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2382
if (!ctx) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2385
ctx = ERR_PTR(-ENOENT);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2387
ctx = finalize_create_context_locked(file_priv, pc, id);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2391
return ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2442
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2450
ctx = i915_gem_create_context(i915, ext_data.pc);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2451
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2452
ret = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2457
gem_context_register(ctx, ext_data.fpriv, id);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2479
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2491
ctx = xa_erase(&file_priv->context_xa, args->ctx_id);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2495
if (!ctx && !pc)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2497
GEM_WARN_ON(ctx && pc);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2502
if (ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2503
context_close(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2508
static int get_sseu(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2535
ce = lookup_user_engine(ctx, lookup, &user_sseu.engine);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2568
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2572
ctx = i915_gem_context_lookup(file_priv, args->ctx_id);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2573
if (IS_ERR(ctx))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2574
return PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2579
vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2587
args->value = i915_gem_context_no_error_capture(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2592
args->value = i915_gem_context_is_bannable(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2597
args->value = i915_gem_context_is_recoverable(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2602
args->value = ctx->sched.priority;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2606
ret = get_sseu(ctx, args);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2610
ret = get_ppgtt(file_priv, ctx, args);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2615
args->value = i915_gem_context_is_persistent(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2619
ret = get_protected(ctx, args);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2632
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2642
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2646
ctx = __context_lookup(file_priv, args->ctx_id);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2647
if (!ctx) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2662
if (ctx) {
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2663
ret = ctx_setparam(file_priv, ctx, args);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2664
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2675
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2680
ctx = i915_gem_context_lookup(file->driver_priv, args->ctx_id);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2681
if (IS_ERR(ctx))
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2682
return PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2696
args->batch_active = atomic_read(&ctx->guilty_count);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2697
args->batch_pending = atomic_read(&ctx->active_count);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2699
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2708
struct intel_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2717
ctx = e->engines[it->idx++];
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2718
} while (!ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
2720
return ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.c
978
struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_context.c
984
RCU_INIT_POINTER(ce->gem_context, ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
994
ce->vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.c
996
if (ctx->sched.priority >= I915_PRIORITY_NORMAL &&
sys/dev/pci/drm/i915/gem/i915_gem_context.h
101
set_bit(CONTEXT_USER_ENGINES, &ctx->flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
105
i915_gem_context_clear_user_engines(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
107
clear_bit(CONTEXT_USER_ENGINES, &ctx->flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
111
i915_gem_context_uses_protected_content(const struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
113
return ctx->uses_protected_content;
sys/dev/pci/drm/i915/gem/i915_gem_context.h
145
i915_gem_context_get(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
147
kref_get(&ctx->ref);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
148
return ctx;
sys/dev/pci/drm/i915/gem/i915_gem_context.h
151
static inline void i915_gem_context_put(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
153
kref_put(&ctx->ref, i915_gem_context_release);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
157
i915_gem_context_vm(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
159
return rcu_dereference_protected(ctx->vm, lockdep_is_held(&ctx->mutex));
sys/dev/pci/drm/i915/gem/i915_gem_context.h
162
static inline bool i915_gem_context_has_full_ppgtt(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
164
GEM_BUG_ON(!!ctx->vm != HAS_FULL_PPGTT(ctx->i915));
sys/dev/pci/drm/i915/gem/i915_gem_context.h
166
return !!ctx->vm;
sys/dev/pci/drm/i915/gem/i915_gem_context.h
170
i915_gem_context_get_eb_vm(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
174
vm = ctx->vm;
sys/dev/pci/drm/i915/gem/i915_gem_context.h
176
vm = &to_gt(ctx->i915)->ggtt->vm;
sys/dev/pci/drm/i915/gem/i915_gem_context.h
183
i915_gem_context_engines(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
185
return rcu_dereference_protected(ctx->engines,
sys/dev/pci/drm/i915/gem/i915_gem_context.h
186
lockdep_is_held(&ctx->engines_mutex));
sys/dev/pci/drm/i915/gem/i915_gem_context.h
190
i915_gem_context_lock_engines(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
191
__acquires(&ctx->engines_mutex)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
193
mutex_lock(&ctx->engines_mutex);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
194
return i915_gem_context_engines(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
198
i915_gem_context_unlock_engines(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
199
__releases(&ctx->engines_mutex)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
201
mutex_unlock(&ctx->engines_mutex);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
205
i915_gem_context_get_engine(struct i915_gem_context *ctx, unsigned int idx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
21
static inline bool i915_gem_context_is_closed(const struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
210
struct i915_gem_engines *e = rcu_dereference(ctx->engines);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
23
return test_bit(CONTEXT_CLOSED, &ctx->flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
26
static inline void i915_gem_context_set_closed(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
28
GEM_BUG_ON(i915_gem_context_is_closed(ctx));
sys/dev/pci/drm/i915/gem/i915_gem_context.h
29
set_bit(CONTEXT_CLOSED, &ctx->flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
32
static inline bool i915_gem_context_no_error_capture(const struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
34
return test_bit(UCONTEXT_NO_ERROR_CAPTURE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
37
static inline void i915_gem_context_set_no_error_capture(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
39
set_bit(UCONTEXT_NO_ERROR_CAPTURE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
42
static inline void i915_gem_context_clear_no_error_capture(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
44
clear_bit(UCONTEXT_NO_ERROR_CAPTURE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
47
static inline bool i915_gem_context_is_bannable(const struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
49
return test_bit(UCONTEXT_BANNABLE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
52
static inline void i915_gem_context_set_bannable(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
54
set_bit(UCONTEXT_BANNABLE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
57
static inline void i915_gem_context_clear_bannable(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
59
clear_bit(UCONTEXT_BANNABLE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
62
static inline bool i915_gem_context_is_recoverable(const struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
64
return test_bit(UCONTEXT_RECOVERABLE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
67
static inline void i915_gem_context_set_recoverable(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
69
set_bit(UCONTEXT_RECOVERABLE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
72
static inline void i915_gem_context_clear_recoverable(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
74
clear_bit(UCONTEXT_RECOVERABLE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
77
static inline bool i915_gem_context_is_persistent(const struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
79
return test_bit(UCONTEXT_PERSISTENCE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
82
static inline void i915_gem_context_set_persistence(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
84
set_bit(UCONTEXT_PERSISTENCE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
87
static inline void i915_gem_context_clear_persistence(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
89
clear_bit(UCONTEXT_PERSISTENCE, &ctx->user_flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
93
i915_gem_context_user_engines(const struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context.h
95
return test_bit(CONTEXT_USER_ENGINES, &ctx->flags);
sys/dev/pci/drm/i915/gem/i915_gem_context.h
99
i915_gem_context_set_user_engines(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_context_types.h
48
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
3489
ww_acquire_done(&eb.ww.ctx);
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
824
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
826
ctx = i915_gem_context_lookup(eb->file->driver_priv, eb->args->rsvd1);
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
827
if (IS_ERR(ctx))
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
828
return PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
830
eb->gem_context = ctx;
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
831
if (i915_gem_context_has_full_ppgtt(ctx))
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
840
struct i915_gem_context *ctx = eb->gem_context;
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
852
lut->ctx = ctx;
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
856
if (!mutex_lock_interruptible(&ctx->lut_mutex)) {
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
857
if (likely(!i915_gem_context_is_closed(ctx)))
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
858
err = radix_tree_insert(&ctx->handles_vma, handle, vma);
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
868
radix_tree_delete(&ctx->handles_vma, handle);
sys/dev/pci/drm/i915/gem/i915_gem_execbuffer.c
873
mutex_unlock(&ctx->lut_mutex);
sys/dev/pci/drm/i915/gem/i915_gem_object.c
257
struct i915_gem_context *ctx = lut->ctx;
sys/dev/pci/drm/i915/gem/i915_gem_object.c
259
if (ctx && ctx->file_priv == fpriv) {
sys/dev/pci/drm/i915/gem/i915_gem_object.c
260
i915_gem_context_get(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_object.c
280
struct i915_gem_context *ctx = lut->ctx;
sys/dev/pci/drm/i915/gem/i915_gem_object.c
288
mutex_lock(&ctx->lut_mutex);
sys/dev/pci/drm/i915/gem/i915_gem_object.c
289
vma = radix_tree_delete(&ctx->handles_vma, lut->handle);
sys/dev/pci/drm/i915/gem/i915_gem_object.c
295
mutex_unlock(&ctx->lut_mutex);
sys/dev/pci/drm/i915/gem/i915_gem_object.c
297
i915_gem_context_put(lut->ctx);
sys/dev/pci/drm/i915/gem/i915_gem_object.h
170
ret = dma_resv_lock_interruptible(obj->base.resv, ww ? &ww->ctx : NULL);
sys/dev/pci/drm/i915/gem/i915_gem_object.h
172
ret = dma_resv_lock(obj->base.resv, ww ? &ww->ctx : NULL);
sys/dev/pci/drm/i915/gem/i915_gem_object.h
208
return ww_mutex_trylock(&obj->base.resv->lock, &ww->ctx);
sys/dev/pci/drm/i915/gem/i915_gem_object_types.h
33
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_throttle.c
42
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/i915_gem_throttle.c
52
xa_for_each(&file_priv->context_xa, idx, ctx) {
sys/dev/pci/drm/i915/gem/i915_gem_throttle.c
56
if (!kref_get_unless_zero(&ctx->ref))
sys/dev/pci/drm/i915/gem/i915_gem_throttle.c
61
i915_gem_context_lock_engines(ctx),
sys/dev/pci/drm/i915/gem/i915_gem_throttle.c
93
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_throttle.c
94
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
1097
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
1105
err = ttm_bo_validate(bo, i915_ttm_sys_placement(), &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
1271
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
1279
err = ttm_bo_validate(bo, i915_ttm_sys_placement(), &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
1504
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
1547
&ctx, NULL, NULL, i915_ttm_bo_destroy);
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
183
struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
324
struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
329
return i915_ttm_tt_shmem_populate(bdev, ttm, ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
331
return ttm_pool_alloc(&bdev->pool, ttm, ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
431
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
441
ret = ttm_bo_validate(bo, &place, &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
478
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
493
ret = ttm_bo_wait_ctx(bo, &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
508
ret = ttm_bo_validate(bo, &place, &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
806
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
819
ret = ttm_bo_validate(bo, &initial_placement, &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
834
ret = ttm_bo_validate(bo, placement, &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm.c
840
ret = ttm_bo_populate(bo, &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.c
472
const struct ttm_operation_ctx *ctx, bool clear,
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.c
532
err = i915_deps_sync(move_deps, ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.c
574
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.c
630
ret = ttm_bo_populate(bo, ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.c
645
ret = i915_deps_add_resv(&deps, bo->base.resv, ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.c
651
migration_fence = __i915_ttm_move(bo, ctx, clear, dst_mem, ttm,
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.c
713
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.c
737
ret = i915_deps_add_resv(&deps, dst_bo->base.resv, &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.c
741
ret = i915_deps_add_resv(&deps, src_bo->base.resv, &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.c
746
copy_fence = __i915_ttm_move(src_bo, &ctx, false, dst_bo->resource,
sys/dev/pci/drm/i915/gem/i915_gem_ttm_move.h
34
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/i915/gem/i915_gem_ttm_pm.c
104
ttm_bo_wait_ctx(backup_bo, &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm_pm.c
175
struct ttm_operation_ctx ctx = {};
sys/dev/pci/drm/i915/gem/i915_gem_ttm_pm.c
190
err = ttm_bo_validate(backup_bo, i915_ttm_sys_placement(), &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm_pm.c
192
err = ttm_bo_populate(backup_bo, &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm_pm.c
197
ttm_bo_wait_ctx(backup_bo, &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm_pm.c
52
struct ttm_operation_ctx ctx = {};
sys/dev/pci/drm/i915/gem/i915_gem_ttm_pm.c
60
return ttm_bo_validate(bo, i915_ttm_sys_placement(), &ctx);
sys/dev/pci/drm/i915/gem/i915_gem_ttm_pm.c
93
err = ttm_bo_populate(backup_bo, &ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1202
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1215
ctx = hugepage_ctx(i915, file);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1216
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1217
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1231
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it) {
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1239
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1263
engines = i915_gem_context_lock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1305
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1619
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1645
ctx = hugepage_ctx(i915, file);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1646
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1647
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1650
vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1695
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it) {
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1702
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1714
engines = i915_gem_context_lock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1745
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1763
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1775
ctx = hugepage_ctx(i915, file);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1776
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1777
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1780
vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1834
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1855
ctx = hugepage_ctx(i915, file);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1856
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1857
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1860
vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1896
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it) {
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
1904
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
31
struct i915_gem_context *ctx = live_context(i915, file);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
34
if (IS_ERR(ctx))
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
35
return ctx;
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
37
vm = ctx->vm;
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
41
return ctx;
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
718
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
734
ctx = hugepage_ctx(i915, file);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
735
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
736
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
739
vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
863
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
940
ctx = hugepage_ctx(i915, file);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
941
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
942
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/huge_pages.c
945
vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
116
static int gtt_get(struct context *ctx, unsigned long offset, u32 *v)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
123
i915_gem_object_lock(ctx->obj, NULL);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
124
err = i915_gem_object_set_to_gtt_domain(ctx->obj, false);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
125
i915_gem_object_unlock(ctx->obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
129
vma = i915_gem_object_ggtt_pin(ctx->obj, NULL, 0, 0, PIN_MAPPABLE);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
150
static int wc_set(struct context *ctx, unsigned long offset, u32 v)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
155
i915_gem_object_lock(ctx->obj, NULL);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
156
err = i915_gem_object_set_to_wc_domain(ctx->obj, true);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
157
i915_gem_object_unlock(ctx->obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
161
map = i915_gem_object_pin_map_unlocked(ctx->obj, I915_MAP_WC);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
167
__i915_gem_object_flush_map(ctx->obj, offset, sizeof(*map));
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
168
i915_gem_object_unpin_map(ctx->obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
173
static int wc_get(struct context *ctx, unsigned long offset, u32 *v)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
178
i915_gem_object_lock(ctx->obj, NULL);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
179
err = i915_gem_object_set_to_wc_domain(ctx->obj, false);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
180
i915_gem_object_unlock(ctx->obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
184
map = i915_gem_object_pin_map_unlocked(ctx->obj, I915_MAP_WC);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
189
i915_gem_object_unpin_map(ctx->obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
194
static int gpu_set(struct context *ctx, unsigned long offset, u32 v)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
201
vma = i915_gem_object_ggtt_pin(ctx->obj, NULL, 0, 0, 0);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
205
i915_gem_object_lock(ctx->obj, NULL);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
206
err = i915_gem_object_set_to_gtt_domain(ctx->obj, true);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
210
rq = intel_engine_create_kernel_request(ctx->engine);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
222
if (GRAPHICS_VER(ctx->engine->i915) >= 8) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
227
} else if (GRAPHICS_VER(ctx->engine->i915) >= 4) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
23
static int cpu_set(struct context *ctx, unsigned long offset, u32 v)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
247
i915_gem_object_unlock(ctx->obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
252
static bool always_valid(struct context *ctx)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
257
static bool needs_fence_registers(struct context *ctx)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
259
struct intel_gt *gt = ctx->engine->gt;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
267
static bool needs_mi_store_dword(struct context *ctx)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
269
if (intel_gt_is_wedged(ctx->engine->gt))
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
272
return intel_engine_can_store_dword(ctx->engine);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
277
int (*set)(struct context *ctx, unsigned long offset, u32 v);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
278
int (*get)(struct context *ctx, unsigned long offset, u32 *v);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
279
bool (*valid)(struct context *ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
30
i915_gem_object_lock(ctx->obj, NULL);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
31
err = i915_gem_object_prepare_write(ctx->obj, &needs_clflush);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
314
struct context ctx;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
332
ctx.engine = random_engine(i915, &prng);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
333
if (!ctx.engine) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
337
pr_info("%s: using %s\n", __func__, ctx.engine->name);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
338
intel_engine_pm_get(ctx.engine);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
344
if (!over->valid(&ctx))
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
35
page = i915_gem_object_get_page(ctx->obj, offset >> PAGE_SHIFT);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
351
if (!write->valid(&ctx))
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
358
if (!read->valid(&ctx))
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
362
ctx.obj = i915_gem_object_create_internal(i915, PAGE_SIZE);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
363
if (IS_ERR(ctx.obj)) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
364
err = PTR_ERR(ctx.obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
373
err = over->set(&ctx, offsets[n], ~values[n]);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
382
err = write->set(&ctx, offsets[n], values[n]);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
393
err = read->get(&ctx, offsets[n], &found);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
411
i915_gem_object_put(ctx.obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
417
intel_engine_pm_put(ctx.engine);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
423
i915_gem_object_put(ctx.obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
47
i915_gem_object_finish_access(ctx->obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
50
i915_gem_object_unlock(ctx->obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
54
static int cpu_get(struct context *ctx, unsigned long offset, u32 *v)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
61
i915_gem_object_lock(ctx->obj, NULL);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
62
err = i915_gem_object_prepare_read(ctx->obj, &needs_clflush);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
66
page = i915_gem_object_get_page(ctx->obj, offset >> PAGE_SHIFT);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
75
i915_gem_object_finish_access(ctx->obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
78
i915_gem_object_unlock(ctx->obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
82
static int gtt_set(struct context *ctx, unsigned long offset, u32 v)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
89
i915_gem_object_lock(ctx->obj, NULL);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
90
err = i915_gem_object_set_to_gtt_domain(ctx->obj, true);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
91
i915_gem_object_unlock(ctx->obj);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_coherency.c
95
vma = i915_gem_object_ggtt_pin(ctx->obj, NULL, 0, 0, PIN_MAPPABLE);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
120
this = igt_request_alloc(ctx[n % nctx], engine);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1374
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1397
ctx = live_context(i915, file);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1398
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1399
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1403
vm = ctx->vm ?: &to_gt(i915)->ggtt->alias->vm;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1410
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1413
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1419
i915_gem_context_lock_engines(ctx), it) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1427
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1440
str_yes_no(i915_gem_context_has_full_ppgtt(ctx)),
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1442
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1448
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1458
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1508
static int write_to_scratch(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1513
struct drm_i915_private *i915 = ctx->i915;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1522
err = check_scratch(ctx->vm, offset);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1545
vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1556
rq = igt_request_alloc(ctx, engine);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1596
static int read_from_scratch(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1601
struct drm_i915_private *i915 = ctx->i915;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1612
err = check_scratch(ctx->vm, offset);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1619
vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1689
rq = igt_request_alloc(ctx, engine);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1744
static int check_scratch_page(struct i915_gem_context *ctx, u32 *out)
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
1750
vm = ctx->vm;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
177
kfree(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
294
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
311
ctx = live_context(i915, file);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
312
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
313
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
317
engines = i915_gem_context_lock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
322
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
331
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
336
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
340
ctx = live_context(i915, file);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
341
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
342
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
38
struct i915_gem_context **ctx;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
59
ctx = kcalloc(nctx, sizeof(*ctx), GFP_KERNEL);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
60
if (!ctx) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
66
ctx[n] = live_context(i915, file);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
67
if (IS_ERR(ctx[n])) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
68
err = PTR_ERR(ctx[n]);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
701
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
704
ctx = kernel_context(i915, NULL);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
705
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
706
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
710
ce = i915_gem_context_get_engine(ctx, engine->legacy_idx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
718
kernel_context_close(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
728
str_yes_no(i915_gem_context_has_full_ppgtt(ctx)),
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
731
kernel_context_close(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
738
kernel_context_close(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
751
kernel_context_close(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
82
this = igt_request_alloc(ctx[n], engine);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
834
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
837
ctx = kernel_context(i915, parent->vm);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
838
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
839
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
843
ce = i915_gem_context_get_engine(ctx, engine->legacy_idx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
852
kernel_context_close(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
862
str_yes_no(i915_gem_context_has_full_ppgtt(ctx)),
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
865
kernel_context_close(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
872
kernel_context_close(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_context.c
885
kernel_context_close(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_dmabuf.c
153
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/i915_gem_dmabuf.c
165
ctx = live_context(i915, file);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_dmabuf.c
166
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_dmabuf.c
167
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_dmabuf.c
171
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it) {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_dmabuf.c
175
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/gem/selftests/i915_gem_migrate.c
389
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/i915/gem/selftests/i915_gem_migrate.c
419
err = i915_deps_add_dependency(&deps, &rq->fence, &ctx);
sys/dev/pci/drm/i915/gem/selftests/igt_gem_utils.c
21
igt_request_alloc(struct i915_gem_context *ctx, struct intel_engine_cs *engine)
sys/dev/pci/drm/i915/gem/selftests/igt_gem_utils.c
31
ce = i915_gem_context_get_engine(ctx, engine->legacy_idx);
sys/dev/pci/drm/i915/gem/selftests/igt_gem_utils.h
22
igt_request_alloc(struct i915_gem_context *ctx, struct intel_engine_cs *engine);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
101
gem_context_register(ctx, fpriv, id);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
103
return ctx;
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
106
context_close(ctx);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
114
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
127
ctx = i915_gem_create_context(i915, pc);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
129
if (IS_ERR(ctx))
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
130
return ctx;
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
132
i915_gem_context_clear_bannable(ctx);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
133
i915_gem_context_set_persistence(ctx);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
134
i915_gem_context_set_no_error_capture(ctx);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
136
return ctx;
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
139
void kernel_context_close(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
141
context_close(ctx);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
16
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
20
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
21
if (!ctx)
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
24
kref_init(&ctx->ref);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
25
INIT_LIST_HEAD(&ctx->link);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
26
ctx->i915 = i915;
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
27
INIT_WORK(&ctx->release_work, i915_gem_context_release_work);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
29
rw_init(&ctx->mutex, "mkctx");
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
31
mtx_init(&ctx->stale.lock, IPL_TTY);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
32
INIT_LIST_HEAD(&ctx->stale.engines);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
34
i915_gem_context_set_persistence(ctx);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
39
strscpy(ctx->name, name, sizeof(ctx->name));
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
45
ctx->vm = &ppgtt->vm;
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
48
rw_init(&ctx->engines_mutex, "mkeng");
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
49
e = default_engines(ctx, null_sseu);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
52
RCU_INIT_POINTER(ctx->engines, e);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
54
INIT_RADIX_TREE(&ctx->handles_vma, GFP_KERNEL);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
55
rw_init(&ctx->lut_mutex, "lutmtx");
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
57
return ctx;
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
60
if (ctx->vm)
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
61
i915_vm_put(ctx->vm);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
63
kfree(ctx);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
67
void mock_context_close(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
69
context_close(ctx);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
82
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
90
ctx = i915_gem_create_context(i915, pc);
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
92
if (IS_ERR(ctx))
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
93
return ctx;
sys/dev/pci/drm/i915/gem/selftests/mock_context.c
95
i915_gem_context_set_no_error_capture(ctx);
sys/dev/pci/drm/i915/gem/selftests/mock_context.h
21
void mock_context_close(struct i915_gem_context *ctx);
sys/dev/pci/drm/i915/gem/selftests/mock_context.h
28
void kernel_context_close(struct i915_gem_context *ctx);
sys/dev/pci/drm/i915/gt/intel_context.c
64
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gt/intel_context.c
83
ctx = rcu_dereference(ce->gem_context);
sys/dev/pci/drm/i915/gt/intel_context.c
84
if (ctx && !kref_get_unless_zero(&ctx->ref))
sys/dev/pci/drm/i915/gt/intel_context.c
85
ctx = NULL;
sys/dev/pci/drm/i915/gt/intel_context.c
87
if (ctx) {
sys/dev/pci/drm/i915/gt/intel_context.c
88
if (ctx->client)
sys/dev/pci/drm/i915/gt/intel_context.c
89
i915_drm_client_add_context_objects(ctx->client,
sys/dev/pci/drm/i915/gt/intel_context.c
91
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/gt/intel_reset.c
100
banned = !i915_gem_context_is_recoverable(ctx);
sys/dev/pci/drm/i915/gt/intel_reset.c
104
drm_dbg(&ctx->i915->drm, "context %s: guilty %d, banned\n",
sys/dev/pci/drm/i915/gt/intel_reset.c
105
ctx->name, atomic_read(&ctx->guilty_count));
sys/dev/pci/drm/i915/gt/intel_reset.c
107
client_mark_guilty(ctx, banned);
sys/dev/pci/drm/i915/gt/intel_reset.c
110
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/gt/intel_reset.c
116
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gt/intel_reset.c
119
ctx = rcu_dereference(rq->context->gem_context);
sys/dev/pci/drm/i915/gt/intel_reset.c
120
if (ctx)
sys/dev/pci/drm/i915/gt/intel_reset.c
121
atomic_inc(&ctx->active_count);
sys/dev/pci/drm/i915/gt/intel_reset.c
36
static void client_mark_guilty(struct i915_gem_context *ctx, bool banned)
sys/dev/pci/drm/i915/gt/intel_reset.c
38
struct drm_i915_file_private *file_priv = ctx->file_priv;
sys/dev/pci/drm/i915/gt/intel_reset.c
56
drm_dbg(&ctx->i915->drm,
sys/dev/pci/drm/i915/gt/intel_reset.c
58
ctx->name, score,
sys/dev/pci/drm/i915/gt/intel_reset.c
65
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gt/intel_reset.c
74
ctx = rcu_dereference(rq->context->gem_context);
sys/dev/pci/drm/i915/gt/intel_reset.c
75
if (ctx && !kref_get_unless_zero(&ctx->ref))
sys/dev/pci/drm/i915/gt/intel_reset.c
76
ctx = NULL;
sys/dev/pci/drm/i915/gt/intel_reset.c
78
if (!ctx)
sys/dev/pci/drm/i915/gt/intel_reset.c
81
atomic_inc(&ctx->guilty_count);
sys/dev/pci/drm/i915/gt/intel_reset.c
84
if (!i915_gem_context_is_bannable(ctx)) {
sys/dev/pci/drm/i915/gt/intel_reset.c
89
drm_notice(&ctx->i915->drm,
sys/dev/pci/drm/i915/gt/intel_reset.c
91
ctx->name);
sys/dev/pci/drm/i915/gt/intel_reset.c
94
prev_hang = ctx->hang_timestamp[0];
sys/dev/pci/drm/i915/gt/intel_reset.c
95
for (i = 0; i < ARRAY_SIZE(ctx->hang_timestamp) - 1; i++)
sys/dev/pci/drm/i915/gt/intel_reset.c
96
ctx->hang_timestamp[i] = ctx->hang_timestamp[i + 1];
sys/dev/pci/drm/i915/gt/intel_reset.c
97
ctx->hang_timestamp[i] = jiffies;
sys/dev/pci/drm/i915/gt/intel_ring_submission.c
880
struct i915_gem_context *ctx = i915_request_gem_context(rq);
sys/dev/pci/drm/i915/gt/intel_ring_submission.c
883
if (!ctx || !ctx->remap_slice)
sys/dev/pci/drm/i915/gt/intel_ring_submission.c
887
if (!(ctx->remap_slice & BIT(i)))
sys/dev/pci/drm/i915/gt/intel_ring_submission.c
895
ctx->remap_slice = 0;
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1716
struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1723
ce = i915_gem_context_get_engine(ctx, engine->legacy_idx);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1928
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1933
c->ctx = kernel_context(gt->i915, NULL);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1934
if (!c->ctx)
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1943
kernel_context_close(c->ctx);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1950
kernel_context_close(c->ctx);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1970
b.ctx->sched.priority = I915_PRIORITY_MAX;
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1981
a.ctx, engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
1998
b.ctx, engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2069
arg->a.ctx, arg->engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2113
arg->a.ctx, arg->engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2127
arg->b.ctx, arg->engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2184
arg->a.ctx, arg->engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2197
rq[1] = igt_request_alloc(arg->b.ctx, arg->engine);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2211
arg->a.ctx, arg->engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2280
arg->a.ctx, arg->engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2336
arg->a.ctx, engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2480
a.ctx, engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2499
b.ctx, engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2583
lo.ctx, engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2613
hi.ctx, engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2622
lo.ctx, engine,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2629
rq = igt_request_alloc(lo.ctx, engine);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2635
rq = igt_request_alloc(hi.ctx, engine);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
2658
rq = igt_request_alloc(lo.ctx, engine);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
3487
struct i915_gem_context *ctx, int prio,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
3497
vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
3508
ctx->sched.priority = prio;
sys/dev/pci/drm/i915/gt/selftest_execlists.c
3510
rq = igt_request_alloc(ctx, smoke->engine);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
3541
struct i915_gem_context *ctx = smoke_context(smoke);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
3543
smoke->result = smoke_submit(smoke, ctx,
sys/dev/pci/drm/i915/gt/selftest_execlists.c
3617
struct i915_gem_context *ctx = smoke_context(smoke);
sys/dev/pci/drm/i915/gt/selftest_execlists.c
3621
ctx, random_priority(&smoke->prng),
sys/dev/pci/drm/i915/gt/selftest_hangcheck.c
107
struct i915_address_space *vm = i915_gem_context_get_eb_vm(h->ctx);
sys/dev/pci/drm/i915/gt/selftest_hangcheck.c
157
rq = igt_request_alloc(h->ctx, engine);
sys/dev/pci/drm/i915/gt/selftest_hangcheck.c
269
kernel_context_close(h->ctx);
sys/dev/pci/drm/i915/gt/selftest_hangcheck.c
36
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gt/selftest_hangcheck.c
49
h->ctx = kernel_context(gt->i915, NULL);
sys/dev/pci/drm/i915/gt/selftest_hangcheck.c
50
if (IS_ERR(h->ctx))
sys/dev/pci/drm/i915/gt/selftest_hangcheck.c
51
return PTR_ERR(h->ctx);
sys/dev/pci/drm/i915/gt/selftest_hangcheck.c
53
GEM_BUG_ON(i915_gem_context_is_bannable(h->ctx));
sys/dev/pci/drm/i915/gt/selftest_hangcheck.c
92
kernel_context_close(h->ctx);
sys/dev/pci/drm/i915/gt/selftest_hangcheck.c
986
h.ctx->sched.priority = 1024;
sys/dev/pci/drm/i915/gt/selftest_timeline.c
205
u64 ctx,
sys/dev/pci/drm/i915/gt/selftest_timeline.c
211
if (__intel_timeline_sync_is_later(tl, ctx, p->seqno) != p->expected) {
sys/dev/pci/drm/i915/gt/selftest_timeline.c
213
name, p->name, ctx, p->seqno, str_yes_no(p->expected));
sys/dev/pci/drm/i915/gt/selftest_timeline.c
218
ret = __intel_timeline_sync_set(tl, ctx, p->seqno);
sys/dev/pci/drm/i915/gt/selftest_timeline.c
254
u64 ctx = BIT_ULL(order) + offset;
sys/dev/pci/drm/i915/gt/selftest_timeline.c
256
ret = __igt_sync(&tl, ctx, p, "1");
sys/dev/pci/drm/i915/gt/selftest_timeline.c
267
u64 ctx = BIT_ULL(order) + offset;
sys/dev/pci/drm/i915/gt/selftest_timeline.c
270
ret = __igt_sync(&tl, ctx, p, "2");
sys/dev/pci/drm/i915/gt/uc/intel_guc_submission.c
3860
const struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gt/uc/intel_guc_submission.c
3864
ctx = rcu_dereference(ce->gem_context);
sys/dev/pci/drm/i915/gt/uc/intel_guc_submission.c
3865
if (ctx)
sys/dev/pci/drm/i915/gt/uc/intel_guc_submission.c
3866
prio = ctx->sched.priority;
sys/dev/pci/drm/i915/gt/uc/selftest_guc_hangcheck.c
143
kernel_context_close(ctx);
sys/dev/pci/drm/i915/gt/uc/selftest_guc_hangcheck.c
33
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/gt/uc/selftest_guc_hangcheck.c
47
ctx = kernel_context(gt->i915, NULL);
sys/dev/pci/drm/i915/gt/uc/selftest_guc_hangcheck.c
48
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/gt/uc/selftest_guc_hangcheck.c
49
gt_err(gt, "Failed get kernel context: %pe\n", ctx);
sys/dev/pci/drm/i915/gt/uc/selftest_guc_hangcheck.c
50
return PTR_ERR(ctx);
sys/dev/pci/drm/i915/gvt/execlist.c
182
struct execlist_ctx_descriptor_format *ctx)
sys/dev/pci/drm/i915/gvt/execlist.c
187
struct execlist_ctx_descriptor_format *ctx0 = &running->ctx[0];
sys/dev/pci/drm/i915/gvt/execlist.c
188
struct execlist_ctx_descriptor_format *ctx1 = &running->ctx[1];
sys/dev/pci/drm/i915/gvt/execlist.c
193
gvt_dbg_el("schedule out context id %x\n", ctx->context_id);
sys/dev/pci/drm/i915/gvt/execlist.c
195
if (WARN_ON(!same_context(ctx, execlist->running_context))) {
sys/dev/pci/drm/i915/gvt/execlist.c
198
ctx->context_id,
sys/dev/pci/drm/i915/gvt/execlist.c
204
if (valid_context(ctx1) && same_context(ctx0, ctx)) {
sys/dev/pci/drm/i915/gvt/execlist.c
212
status.context_id = ctx->context_id;
sys/dev/pci/drm/i915/gvt/execlist.c
223
} else if ((!valid_context(ctx1) && same_context(ctx0, ctx))
sys/dev/pci/drm/i915/gvt/execlist.c
224
|| (valid_context(ctx1) && same_context(ctx1, ctx))) {
sys/dev/pci/drm/i915/gvt/execlist.c
232
status.context_id = ctx->context_id;
sys/dev/pci/drm/i915/gvt/execlist.c
274
struct execlist_ctx_descriptor_format ctx[2])
sys/dev/pci/drm/i915/gvt/execlist.c
292
memset(slot->ctx, 0, sizeof(slot->ctx));
sys/dev/pci/drm/i915/gvt/execlist.c
294
slot->ctx[0] = ctx[0];
sys/dev/pci/drm/i915/gvt/execlist.c
295
slot->ctx[1] = ctx[1];
sys/dev/pci/drm/i915/gvt/execlist.c
298
slot->index, ctx[0].context_id,
sys/dev/pci/drm/i915/gvt/execlist.c
299
ctx[1].context_id);
sys/dev/pci/drm/i915/gvt/execlist.c
310
execlist->running_context = &slot->ctx[0];
sys/dev/pci/drm/i915/gvt/execlist.c
325
ctx0 = &running->ctx[0];
sys/dev/pci/drm/i915/gvt/execlist.c
326
ctx1 = &running->ctx[1];
sys/dev/pci/drm/i915/gvt/execlist.c
339
if ((valid_context(ctx1) && same_context(ctx1, &slot->ctx[0]) &&
sys/dev/pci/drm/i915/gvt/execlist.c
343
same_context(ctx0, &slot->ctx[0]))) { /* condition b */
sys/dev/pci/drm/i915/gvt/execlist.c
352
status.context_id = ctx[0].context_id;
sys/dev/pci/drm/i915/gvt/execlist.c
374
struct execlist_ctx_descriptor_format ctx[2];
sys/dev/pci/drm/i915/gvt/execlist.c
380
ctx[0] = *get_desc_from_elsp_dwords(&workload->elsp_dwords, 0);
sys/dev/pci/drm/i915/gvt/execlist.c
381
ctx[1] = *get_desc_from_elsp_dwords(&workload->elsp_dwords, 1);
sys/dev/pci/drm/i915/gvt/execlist.c
384
ctx);
sys/dev/pci/drm/i915/gvt/execlist.c
44
#define valid_context(ctx) ((ctx)->valid)
sys/dev/pci/drm/i915/gvt/execlist.c
77
&execlist->running_slot->ctx[0] : NULL;
sys/dev/pci/drm/i915/gvt/execlist.h
164
struct execlist_ctx_descriptor_format ctx[2];
sys/dev/pci/drm/i915/gvt/scheduler.c
1020
shadow_ring_context = (void *) ctx->lrc_reg_state;
sys/dev/pci/drm/i915/gvt/scheduler.c
131
struct intel_context *ctx = workload->req->context;
sys/dev/pci/drm/i915/gvt/scheduler.c
144
GEM_BUG_ON(!intel_context_is_pinned(ctx));
sys/dev/pci/drm/i915/gvt/scheduler.c
146
context_base = (void *) ctx->lrc_reg_state -
sys/dev/pci/drm/i915/gvt/scheduler.c
149
shadow_ring_context = (void *) ctx->lrc_reg_state;
sys/dev/pci/drm/i915/gvt/scheduler.c
66
struct intel_context *ctx = workload->req->context;
sys/dev/pci/drm/i915/gvt/scheduler.c
74
shadow_ring_context = (struct execlist_ring_context *)ctx->lrc_reg_state;
sys/dev/pci/drm/i915/gvt/scheduler.c
942
struct intel_context *ctx = workload->req->context;
sys/dev/pci/drm/i915/gvt/scheduler.c
956
GEM_BUG_ON(!intel_context_is_pinned(ctx));
sys/dev/pci/drm/i915/gvt/scheduler.c
981
context_base = (void *) ctx->lrc_reg_state -
sys/dev/pci/drm/i915/i915_deps.c
100
if (ctx->no_wait_gpu && !dma_fence_is_signaled(fence)) {
sys/dev/pci/drm/i915/i915_deps.c
105
ret = dma_fence_wait(fence, ctx->interruptible);
sys/dev/pci/drm/i915/i915_deps.c
132
int i915_deps_sync(const struct i915_deps *deps, const struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/i915/i915_deps.c
139
if (ctx->no_wait_gpu && !dma_fence_is_signaled(*fences)) {
sys/dev/pci/drm/i915/i915_deps.c
144
ret = dma_fence_wait(*fences, ctx->interruptible);
sys/dev/pci/drm/i915/i915_deps.c
178
const struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/i915/i915_deps.c
207
return i915_deps_grow(deps, fence, ctx);
sys/dev/pci/drm/i915/i915_deps.c
223
const struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/i915/i915_deps.c
230
int ret = i915_deps_add_dependency(deps, fence, ctx);
sys/dev/pci/drm/i915/i915_deps.c
76
const struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/i915/i915_deps.h
38
const struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/i915/i915_deps.h
41
const struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/i915/i915_deps.h
44
const struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/i915/i915_drm_client.c
119
static u64 busy_add(struct i915_gem_context *ctx, unsigned int class)
sys/dev/pci/drm/i915/i915_drm_client.c
125
for_each_gem_engine(ce, rcu_dereference(ctx->engines), it) {
sys/dev/pci/drm/i915/i915_drm_client.c
143
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/i915_drm_client.c
146
list_for_each_entry_rcu(ctx, &client->ctx_list, client_link)
sys/dev/pci/drm/i915/i915_drm_client.c
147
total += busy_add(ctx, class);
sys/dev/pci/drm/i915/i915_gem_evict.c
492
(ww && (dma_resv_locking_ctx(vma->obj->base.resv) == &ww->ctx))) {
sys/dev/pci/drm/i915/i915_gem_ww.c
11
ww_acquire_init(&ww->ctx, &reservation_ww_class);
sys/dev/pci/drm/i915/i915_gem_ww.c
39
ww_acquire_fini(&ww->ctx);
sys/dev/pci/drm/i915/i915_gem_ww.c
51
ret = dma_resv_lock_slow_interruptible(ww->contended->base.resv, &ww->ctx);
sys/dev/pci/drm/i915/i915_gem_ww.c
53
dma_resv_lock_slow(ww->contended->base.resv, &ww->ctx);
sys/dev/pci/drm/i915/i915_gem_ww.h
11
struct ww_acquire_ctx ctx;
sys/dev/pci/drm/i915/i915_gem_ww.h
17
void i915_gem_ww_ctx_init(struct i915_gem_ww_ctx *ctx, bool intr);
sys/dev/pci/drm/i915/i915_gem_ww.h
18
void i915_gem_ww_ctx_fini(struct i915_gem_ww_ctx *ctx);
sys/dev/pci/drm/i915/i915_gem_ww.h
19
int __must_check i915_gem_ww_ctx_backoff(struct i915_gem_ww_ctx *ctx);
sys/dev/pci/drm/i915/i915_gpu_error.c
1482
const struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/i915_gpu_error.c
1484
ctx = rcu_dereference(request->context->gem_context);
sys/dev/pci/drm/i915/i915_gpu_error.c
1485
if (ctx)
sys/dev/pci/drm/i915/i915_gpu_error.c
1487
erq->pid = pid_nr(ctx->pid);
sys/dev/pci/drm/i915/i915_gpu_error.c
1489
erq->pid = ctx->pid;
sys/dev/pci/drm/i915/i915_gpu_error.c
1510
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/i915_gpu_error.c
1515
ctx = rcu_dereference(ce->gem_context);
sys/dev/pci/drm/i915/i915_gpu_error.c
1516
if (ctx && !kref_get_unless_zero(&ctx->ref))
sys/dev/pci/drm/i915/i915_gpu_error.c
1517
ctx = NULL;
sys/dev/pci/drm/i915/i915_gpu_error.c
1519
if (!ctx)
sys/dev/pci/drm/i915/i915_gpu_error.c
1524
task = pid_task(ctx->pid, PIDTYPE_PID);
sys/dev/pci/drm/i915/i915_gpu_error.c
1532
e->sched_attr = ctx->sched;
sys/dev/pci/drm/i915/i915_gpu_error.c
1533
e->guilty = atomic_read(&ctx->guilty_count);
sys/dev/pci/drm/i915/i915_gpu_error.c
1534
e->active = atomic_read(&ctx->active_count);
sys/dev/pci/drm/i915/i915_gpu_error.c
1541
simulated = i915_gem_context_no_error_capture(ctx);
sys/dev/pci/drm/i915/i915_gpu_error.c
1543
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/i915_gpu_error.c
532
const struct i915_gem_context_coredump *ctx)
sys/dev/pci/drm/i915/i915_gpu_error.c
535
header, ctx->comm, ctx->pid, ctx->sched_attr.priority,
sys/dev/pci/drm/i915/i915_gpu_error.c
536
ctx->guilty, ctx->active,
sys/dev/pci/drm/i915/i915_gpu_error.c
537
ctx->total_runtime, ctx->avg_runtime);
sys/dev/pci/drm/i915/i915_gpu_error.c
538
err_printf(m, " context timeline seqno %u\n", ctx->hwsp_seqno);
sys/dev/pci/drm/i915/i915_perf.c
1296
struct i915_gem_context *ctx = stream->ctx;
sys/dev/pci/drm/i915/i915_perf.c
1301
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it) {
sys/dev/pci/drm/i915/i915_perf.c
1308
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/i915_perf.c
1704
if (stream->ctx)
sys/dev/pci/drm/i915/i915_perf.c
2602
struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/i915_perf.c
2609
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it) {
sys/dev/pci/drm/i915/i915_perf.c
2626
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/i915_perf.c
2715
struct i915_gem_context *ctx, *cn;
sys/dev/pci/drm/i915/i915_perf.c
2737
list_for_each_entry_safe(ctx, cn, &i915->gem.contexts.list, link) {
sys/dev/pci/drm/i915/i915_perf.c
2738
if (!kref_get_unless_zero(&ctx->ref))
sys/dev/pci/drm/i915/i915_perf.c
2743
err = gen8_configure_context(stream, ctx, regs, num_regs);
sys/dev/pci/drm/i915/i915_perf.c
2745
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/i915_perf.c
2750
list_safe_reset_next(ctx, cn, link);
sys/dev/pci/drm/i915/i915_perf.c
2751
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/i915_perf.c
2930
if (stream->ctx) {
sys/dev/pci/drm/i915/i915_perf.c
2979
if (stream->ctx)
sys/dev/pci/drm/i915/i915_perf.c
2995
struct i915_gem_context *ctx = stream->ctx;
sys/dev/pci/drm/i915/i915_perf.c
3018
(ctx ? GEN7_OACONTROL_PER_CTX_ENABLE : 0) |
sys/dev/pci/drm/i915/i915_perf.c
3291
(GRAPHICS_VER(perf->i915) < 12 || !stream->ctx)) {
sys/dev/pci/drm/i915/i915_perf.c
3338
if (stream->ctx) {
sys/dev/pci/drm/i915/i915_perf.c
3421
if (stream->ctx)
sys/dev/pci/drm/i915/i915_perf.c
3751
if (stream->ctx)
sys/dev/pci/drm/i915/i915_perf.c
3752
i915_gem_context_put(stream->ctx);
sys/dev/pci/drm/i915/i915_perf.c
3921
stream->ctx = specific_ctx;
sys/dev/pci/drm/i915/i915_perf.c
869
if (!stream->ctx ||
sys/dev/pci/drm/i915/i915_perf.c
878
if (stream->ctx &&
sys/dev/pci/drm/i915/i915_perf_types.h
208
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/i915_request.c
1932
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/i915_request.c
1942
ctx = rcu_dereference(rq->context->gem_context);
sys/dev/pci/drm/i915/i915_request.c
1943
if (ctx)
sys/dev/pci/drm/i915/i915_request.c
1944
attr = ctx->sched;
sys/dev/pci/drm/i915/i915_request.c
67
const struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/i915_request.c
81
ctx = i915_request_gem_context(to_request(fence));
sys/dev/pci/drm/i915/i915_request.c
82
if (!ctx)
sys/dev/pci/drm/i915/i915_request.c
85
return ctx->name;
sys/dev/pci/drm/i915/i915_sysfs.c
100
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/i915_sysfs.c
127
list_for_each_entry(ctx, &i915->gem.contexts.list, link)
sys/dev/pci/drm/i915/i915_sysfs.c
128
ctx->remap_slice |= BIT(slice);
sys/dev/pci/drm/i915/pxp/intel_pxp.c
495
struct i915_gem_context *ctx, *cn;
sys/dev/pci/drm/i915/pxp/intel_pxp.c
499
list_for_each_entry_safe(ctx, cn, &i915->gem.contexts.list, link) {
sys/dev/pci/drm/i915/pxp/intel_pxp.c
503
if (!kref_get_unless_zero(&ctx->ref))
sys/dev/pci/drm/i915/pxp/intel_pxp.c
506
if (likely(!i915_gem_context_uses_protected_content(ctx))) {
sys/dev/pci/drm/i915/pxp/intel_pxp.c
507
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/pxp/intel_pxp.c
522
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it)
sys/dev/pci/drm/i915/pxp/intel_pxp.c
524
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/pxp/intel_pxp.c
531
if (ctx->pxp_wakeref) {
sys/dev/pci/drm/i915/pxp/intel_pxp.c
533
ctx->pxp_wakeref);
sys/dev/pci/drm/i915/pxp/intel_pxp.c
534
ctx->pxp_wakeref = NULL;
sys/dev/pci/drm/i915/pxp/intel_pxp.c
538
list_safe_reset_next(ctx, cn, link);
sys/dev/pci/drm/i915/pxp/intel_pxp.c
539
i915_gem_context_put(ctx);
sys/dev/pci/drm/i915/selftests/i915_gem.c
143
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/selftests/i915_gem.c
152
ctx = live_context(i915, file);
sys/dev/pci/drm/i915/selftests/i915_gem.c
153
if (!IS_ERR(ctx))
sys/dev/pci/drm/i915/selftests/i915_gem.c
154
err = switch_to_context(ctx);
sys/dev/pci/drm/i915/selftests/i915_gem.c
169
err = switch_to_context(ctx);
sys/dev/pci/drm/i915/selftests/i915_gem.c
178
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/selftests/i915_gem.c
187
ctx = live_context(i915, file);
sys/dev/pci/drm/i915/selftests/i915_gem.c
188
if (!IS_ERR(ctx))
sys/dev/pci/drm/i915/selftests/i915_gem.c
189
err = switch_to_context(ctx);
sys/dev/pci/drm/i915/selftests/i915_gem.c
204
err = switch_to_context(ctx);
sys/dev/pci/drm/i915/selftests/i915_gem.c
21
static int switch_to_context(struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/selftests/i915_gem.c
27
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it) {
sys/dev/pci/drm/i915/selftests/i915_gem.c
38
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/selftests/i915_gem_gtt.c
1463
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/selftests/i915_gem_gtt.c
1467
ctx = mock_context(i915, "mock");
sys/dev/pci/drm/i915/selftests/i915_gem_gtt.c
1468
if (!ctx)
sys/dev/pci/drm/i915/selftests/i915_gem_gtt.c
1471
vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/selftests/i915_gem_gtt.c
1475
mock_context_close(ctx);
sys/dev/pci/drm/i915/selftests/i915_request.c
1687
max_batches(struct i915_gem_context *ctx, struct intel_engine_cs *engine)
sys/dev/pci/drm/i915/selftests/i915_request.c
1701
if (HAS_EXECLISTS(ctx->i915))
sys/dev/pci/drm/i915/selftests/i915_request.c
1704
rq = igt_request_alloc(ctx, engine);
sys/dev/pci/drm/i915/selftests/i915_request.c
207
struct i915_gem_context *ctx[2];
sys/dev/pci/drm/i915/selftests/i915_request.c
211
ctx[0] = mock_context(i915, "A");
sys/dev/pci/drm/i915/selftests/i915_request.c
212
if (!ctx[0]) {
sys/dev/pci/drm/i915/selftests/i915_request.c
217
ce = i915_gem_context_get_engine(ctx[0], RCS0);
sys/dev/pci/drm/i915/selftests/i915_request.c
229
ctx[1] = mock_context(i915, "B");
sys/dev/pci/drm/i915/selftests/i915_request.c
230
if (!ctx[1]) {
sys/dev/pci/drm/i915/selftests/i915_request.c
235
ce = i915_gem_context_get_engine(ctx[1], RCS0);
sys/dev/pci/drm/i915/selftests/i915_request.c
271
mock_context_close(ctx[1]);
sys/dev/pci/drm/i915/selftests/i915_request.c
275
mock_context_close(ctx[0]);
sys/dev/pci/drm/i915/selftests/i915_request.c
364
struct i915_gem_context *ctx =
sys/dev/pci/drm/i915/selftests/i915_request.c
369
ce = i915_gem_context_get_engine(ctx, t->engine->legacy_idx);
sys/dev/pci/drm/i915/selftests/i915_syncmap.c
574
I915_RND_STATE(ctx);
sys/dev/pci/drm/i915/selftests/i915_syncmap.c
582
u64 context = i915_prandom_u64_state(&ctx);
sys/dev/pci/drm/i915/selftests/i915_vma.c
112
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/selftests/i915_vma.c
117
list_for_each_entry(ctx, contexts, link) {
sys/dev/pci/drm/i915/selftests/i915_vma.c
122
vm = i915_gem_context_get_eb_vm(ctx);
sys/dev/pci/drm/i915/selftests/i915_vma.c
128
if (!assert_vma(vma, obj, ctx)) {
sys/dev/pci/drm/i915/selftests/i915_vma.c
154
struct i915_gem_context *ctx, *cn;
sys/dev/pci/drm/i915/selftests/i915_vma.c
180
ctx = mock_context(i915, "mock");
sys/dev/pci/drm/i915/selftests/i915_vma.c
181
if (!ctx)
sys/dev/pci/drm/i915/selftests/i915_vma.c
184
list_move(&ctx->link, &contexts);
sys/dev/pci/drm/i915/selftests/i915_vma.c
197
list_for_each_entry_safe(ctx, cn, &contexts, link) {
sys/dev/pci/drm/i915/selftests/i915_vma.c
198
list_del_init(&ctx->link);
sys/dev/pci/drm/i915/selftests/i915_vma.c
199
mock_context_close(ctx);
sys/dev/pci/drm/i915/selftests/i915_vma.c
209
list_for_each_entry_safe(ctx, cn, &contexts, link) {
sys/dev/pci/drm/i915/selftests/i915_vma.c
210
list_del_init(&ctx->link);
sys/dev/pci/drm/i915/selftests/i915_vma.c
211
mock_context_close(ctx);
sys/dev/pci/drm/i915/selftests/i915_vma.c
39
struct i915_gem_context *ctx)
sys/dev/pci/drm/i915/selftests/i915_vma.c
43
if (vma->vm != ctx->vm) {
sys/dev/pci/drm/i915/selftests/intel_memory_region.c
705
static int igt_gpu_write(struct i915_gem_context *ctx,
sys/dev/pci/drm/i915/selftests/intel_memory_region.c
724
for_each_gem_engine(ce, i915_gem_context_lock_engines(ctx), it) {
sys/dev/pci/drm/i915/selftests/intel_memory_region.c
732
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/selftests/intel_memory_region.c
751
engines = i915_gem_context_lock_engines(ctx);
sys/dev/pci/drm/i915/selftests/intel_memory_region.c
771
i915_gem_context_unlock_engines(ctx);
sys/dev/pci/drm/i915/selftests/intel_memory_region.c
951
struct i915_gem_context *ctx;
sys/dev/pci/drm/i915/selftests/intel_memory_region.c
961
ctx = live_context(i915, file);
sys/dev/pci/drm/i915/selftests/intel_memory_region.c
962
if (IS_ERR(ctx)) {
sys/dev/pci/drm/i915/selftests/intel_memory_region.c
963
err = PTR_ERR(ctx);
sys/dev/pci/drm/i915/selftests/intel_memory_region.c
979
err = igt_gpu_write(ctx, obj);
sys/dev/pci/drm/include/drm/display/drm_dp_mst_helper.h
866
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/include/drm/drm_atomic.h
630
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_atomic_helper.h
156
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_atomic_helper.h
158
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_atomic_helper.h
160
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_atomic_helper.h
163
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_atomic_helper.h
165
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_atomic_helper.h
169
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_atomic_helper.h
172
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_atomic_helper.h
180
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_atomic_helper.h
187
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_crtc.h
495
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_crtc.h
521
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_crtc.h
580
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_crtc.h
599
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_crtc_helper.h
50
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_gpusvm.h
273
const struct drm_gpusvm_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_gpusvm.h
291
const struct drm_gpusvm_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_gpusvm.h
295
const struct drm_gpusvm_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_gpusvm.h
316
const struct drm_gpusvm_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_gpusvm.h
321
const struct drm_gpusvm_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_modeset_helper_vtables.h
1010
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/include/drm/drm_modeset_helper_vtables.h
932
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
100
void drm_modeset_acquire_init(struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
102
void drm_modeset_acquire_fini(struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
103
void drm_modeset_drop_locks(struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
104
int drm_modeset_backoff(struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
136
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
149
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
175
#define DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, flags, ret) \
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
178
drm_modeset_acquire_init(&ctx, flags); \
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
180
ret = drm_modeset_lock_all_ctx(dev, &ctx); \
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
203
#define DRM_MODESET_LOCK_ALL_END(dev, ctx, ret) \
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
206
ret = drm_modeset_backoff(&ctx); \
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
210
drm_modeset_drop_locks(&ctx); \
sys/dev/pci/drm/include/drm/drm_modeset_lock.h
211
drm_modeset_acquire_fini(&ctx); \
sys/dev/pci/drm/include/drm/drm_plane.h
325
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_plane.h
343
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_plane_helper.h
40
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_plane_helper.h
42
struct drm_modeset_acquire_ctx *ctx);
sys/dev/pci/drm/include/drm/drm_probe_helper.h
17
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/include/drm/drm_probe_helper.h
43
struct drm_modeset_acquire_ctx *ctx,
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
216
struct ttm_operation_ctx *ctx;
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
250
long ttm_bo_shrink(struct ttm_operation_ctx *ctx, struct ttm_buffer_object *bo,
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
253
bool ttm_bo_shrink_suitable(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
392
struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
395
struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
403
uint32_t alignment, struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
422
s64 ttm_bo_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
429
struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
457
struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
472
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
485
struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/drm/ttm/ttm_bo.h
487
struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/drm/ttm/ttm_device.h
150
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/include/drm/ttm/ttm_device.h
276
int ttm_global_swapout(struct ttm_operation_ctx *ctx, gfp_t gfp_flags);
sys/dev/pci/drm/include/drm/ttm/ttm_device.h
277
int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/include/drm/ttm/ttm_device.h
87
struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/drm/ttm/ttm_pool.h
105
const struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/drm/ttm/ttm_pool.h
91
struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/drm/ttm/ttm_tt.h
259
struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/drm/ttm/ttm_tt.h
305
const struct ttm_operation_ctx *ctx);
sys/dev/pci/drm/include/linux/dma-resv.h
344
struct ww_acquire_ctx *ctx)
sys/dev/pci/drm/include/linux/dma-resv.h
346
return ww_mutex_lock(&obj->lock, ctx);
sys/dev/pci/drm/include/linux/dma-resv.h
371
struct ww_acquire_ctx *ctx)
sys/dev/pci/drm/include/linux/dma-resv.h
373
return ww_mutex_lock_interruptible(&obj->lock, ctx);
sys/dev/pci/drm/include/linux/dma-resv.h
388
struct ww_acquire_ctx *ctx)
sys/dev/pci/drm/include/linux/dma-resv.h
390
ww_mutex_lock_slow(&obj->lock, ctx);
sys/dev/pci/drm/include/linux/dma-resv.h
404
struct ww_acquire_ctx *ctx)
sys/dev/pci/drm/include/linux/dma-resv.h
406
return ww_mutex_lock_slow_interruptible(&obj->lock, ctx);
sys/dev/pci/drm/include/linux/dma-resv.h
453
return READ_ONCE(obj->lock.ctx);
sys/dev/pci/drm/include/linux/ww_mutex.h
108
ww_mutex_trylock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) {
sys/dev/pci/drm/include/linux/ww_mutex.h
116
KASSERT(lock->ctx == NULL);
sys/dev/pci/drm/include/linux/ww_mutex.h
133
__ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx, bool slow, bool intr) {
sys/dev/pci/drm/include/linux/ww_mutex.h
142
KASSERT(lock->ctx == NULL);
sys/dev/pci/drm/include/linux/ww_mutex.h
144
lock->ctx = ctx;
sys/dev/pci/drm/include/linux/ww_mutex.h
175
if (slow || ctx == NULL ||
sys/dev/pci/drm/include/linux/ww_mutex.h
176
(lock->ctx && ctx->stamp < lock->ctx->stamp)) {
sys/dev/pci/drm/include/linux/ww_mutex.h
180
ctx ? ctx->ww_class->name : "ww_mutex_lock",
sys/dev/pci/drm/include/linux/ww_mutex.h
209
ww_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) {
sys/dev/pci/drm/include/linux/ww_mutex.h
210
return __ww_mutex_lock(lock, ctx, false, false);
sys/dev/pci/drm/include/linux/ww_mutex.h
214
ww_mutex_lock_slow(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) {
sys/dev/pci/drm/include/linux/ww_mutex.h
215
(void)__ww_mutex_lock(lock, ctx, true, false);
sys/dev/pci/drm/include/linux/ww_mutex.h
219
ww_mutex_lock_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) {
sys/dev/pci/drm/include/linux/ww_mutex.h
220
return __ww_mutex_lock(lock, ctx, false, true);
sys/dev/pci/drm/include/linux/ww_mutex.h
224
ww_mutex_lock_slow_interruptible(struct ww_mutex *lock, struct ww_acquire_ctx *ctx) {
sys/dev/pci/drm/include/linux/ww_mutex.h
225
return __ww_mutex_lock(lock, ctx, true, true);
sys/dev/pci/drm/include/linux/ww_mutex.h
235
lock->ctx = NULL;
sys/dev/pci/drm/include/linux/ww_mutex.h
244
KASSERT(lock->ctx == NULL);
sys/dev/pci/drm/include/linux/ww_mutex.h
57
struct ww_acquire_ctx *ctx;
sys/dev/pci/drm/include/linux/ww_mutex.h
74
ww_acquire_init(struct ww_acquire_ctx *ctx, struct ww_class *ww_class) {
sys/dev/pci/drm/include/linux/ww_mutex.h
75
ctx->stamp = __sync_fetch_and_add(&ww_class->stamp, 1);
sys/dev/pci/drm/include/linux/ww_mutex.h
76
ctx->ww_class = ww_class;
sys/dev/pci/drm/include/linux/ww_mutex.h
80
ww_acquire_done(__unused struct ww_acquire_ctx *ctx) {
sys/dev/pci/drm/include/linux/ww_mutex.h
84
ww_acquire_fini(__unused struct ww_acquire_ctx *ctx) {
sys/dev/pci/drm/include/linux/ww_mutex.h
91
lock->ctx = NULL;
sys/dev/pci/drm/radeon/atom-bits.h
32
#define U8(ptr) get_u8(ctx->ctx->bios, (ptr))
sys/dev/pci/drm/radeon/atom-bits.h
33
#define CU8(ptr) get_u8(ctx->bios, (ptr))
sys/dev/pci/drm/radeon/atom-bits.h
38
#define U16(ptr) get_u16(ctx->ctx->bios, (ptr))
sys/dev/pci/drm/radeon/atom-bits.h
39
#define CU16(ptr) get_u16(ctx->bios, (ptr))
sys/dev/pci/drm/radeon/atom-bits.h
44
#define U32(ptr) get_u32(ctx->ctx->bios, (ptr))
sys/dev/pci/drm/radeon/atom-bits.h
45
#define CU32(ptr) get_u32(ctx->bios, (ptr))
sys/dev/pci/drm/radeon/atom-bits.h
46
#define CSTR(ptr) (((char *)(ctx->bios))+(ptr))
sys/dev/pci/drm/radeon/atom.c
1004
*ptr = ctx->start + target;
sys/dev/pci/drm/radeon/atom.c
1015
static void atom_op_test(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
1020
dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1);
sys/dev/pci/drm/radeon/atom.c
1022
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
1023
ctx->ctx->cs_equal = ((dst & src) == 0);
sys/dev/pci/drm/radeon/atom.c
1024
SDEBUG(" result: %s\n", ctx->ctx->cs_equal ? "EQ" : "NE");
sys/dev/pci/drm/radeon/atom.c
1027
static void atom_op_xor(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
1033
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/radeon/atom.c
1035
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
1038
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/radeon/atom.c
1041
static void atom_op_debug(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
113
static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
sys/dev/pci/drm/radeon/atom.c
116
struct radeon_device *rdev = ctx->card->dev->dev_private;
sys/dev/pci/drm/radeon/atom.c
1174
static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t *params, int params_size)
sys/dev/pci/drm/radeon/atom.c
1176
int base = CU16(ctx->cmd_table + 4 + 2 * index);
sys/dev/pci/drm/radeon/atom.c
1192
ectx.ctx = ctx;
sys/dev/pci/drm/radeon/atom.c
1238
int atom_execute_table_scratch_unlocked(struct atom_context *ctx, int index, uint32_t *params, int params_size)
sys/dev/pci/drm/radeon/atom.c
1242
mutex_lock(&ctx->mutex);
sys/dev/pci/drm/radeon/atom.c
1244
ctx->data_block = 0;
sys/dev/pci/drm/radeon/atom.c
1246
ctx->reg_block = 0;
sys/dev/pci/drm/radeon/atom.c
1248
ctx->fb_base = 0;
sys/dev/pci/drm/radeon/atom.c
125
temp = ctx->card->ioreg_read(ctx->card, CU16(base + 1));
sys/dev/pci/drm/radeon/atom.c
1250
ctx->io_mode = ATOM_IO_MM;
sys/dev/pci/drm/radeon/atom.c
1252
ctx->divmul[0] = 0;
sys/dev/pci/drm/radeon/atom.c
1253
ctx->divmul[1] = 0;
sys/dev/pci/drm/radeon/atom.c
1254
r = atom_execute_table_locked(ctx, index, params, params_size);
sys/dev/pci/drm/radeon/atom.c
1255
mutex_unlock(&ctx->mutex);
sys/dev/pci/drm/radeon/atom.c
1259
int atom_execute_table(struct atom_context *ctx, int index, uint32_t *params, int params_size)
sys/dev/pci/drm/radeon/atom.c
1262
mutex_lock(&ctx->scratch_mutex);
sys/dev/pci/drm/radeon/atom.c
1263
r = atom_execute_table_scratch_unlocked(ctx, index, params, params_size);
sys/dev/pci/drm/radeon/atom.c
1264
mutex_unlock(&ctx->scratch_mutex);
sys/dev/pci/drm/radeon/atom.c
1270
static void atom_index_iio(struct atom_context *ctx, int base)
sys/dev/pci/drm/radeon/atom.c
1272
ctx->iio = kzalloc(2 * 256, GFP_KERNEL);
sys/dev/pci/drm/radeon/atom.c
1273
if (!ctx->iio)
sys/dev/pci/drm/radeon/atom.c
1276
ctx->iio[CU8(base + 1)] = base + 2;
sys/dev/pci/drm/radeon/atom.c
1287
struct atom_context *ctx =
sys/dev/pci/drm/radeon/atom.c
1293
if (!ctx)
sys/dev/pci/drm/radeon/atom.c
1296
ctx->card = card;
sys/dev/pci/drm/radeon/atom.c
1297
ctx->bios = bios;
sys/dev/pci/drm/radeon/atom.c
130
(void)ctx->card->ioreg_read(ctx->card, CU16(base + 1));
sys/dev/pci/drm/radeon/atom.c
1301
kfree(ctx);
sys/dev/pci/drm/radeon/atom.c
1308
kfree(ctx);
sys/dev/pci/drm/radeon/atom.c
131
ctx->card->ioreg_write(ctx->card, CU16(base + 1), temp);
sys/dev/pci/drm/radeon/atom.c
1317
kfree(ctx);
sys/dev/pci/drm/radeon/atom.c
1321
ctx->cmd_table = CU16(base + ATOM_ROM_CMD_PTR);
sys/dev/pci/drm/radeon/atom.c
1322
ctx->data_table = CU16(base + ATOM_ROM_DATA_PTR);
sys/dev/pci/drm/radeon/atom.c
1323
atom_index_iio(ctx, CU16(ctx->data_table + ATOM_DATA_IIO_PTR) + 4);
sys/dev/pci/drm/radeon/atom.c
1324
if (!ctx->iio) {
sys/dev/pci/drm/radeon/atom.c
1325
atom_destroy(ctx);
sys/dev/pci/drm/radeon/atom.c
1342
return ctx;
sys/dev/pci/drm/radeon/atom.c
1345
int atom_asic_init(struct atom_context *ctx)
sys/dev/pci/drm/radeon/atom.c
1347
struct radeon_device *rdev = ctx->card->dev->dev_private;
sys/dev/pci/drm/radeon/atom.c
1348
int hwi = CU16(ctx->data_table + ATOM_DATA_FWI_PTR);
sys/dev/pci/drm/radeon/atom.c
1359
if (!CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_INIT))
sys/dev/pci/drm/radeon/atom.c
1361
ret = atom_execute_table(ctx, ATOM_CMD_INIT, ps, 16);
sys/dev/pci/drm/radeon/atom.c
1368
if (CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_SPDFANCNTL))
sys/dev/pci/drm/radeon/atom.c
1369
atom_execute_table(ctx, ATOM_CMD_SPDFANCNTL, ps, 16);
sys/dev/pci/drm/radeon/atom.c
1374
void atom_destroy(struct atom_context *ctx)
sys/dev/pci/drm/radeon/atom.c
1376
kfree(ctx->iio);
sys/dev/pci/drm/radeon/atom.c
1377
kfree(ctx);
sys/dev/pci/drm/radeon/atom.c
1380
bool atom_parse_data_header(struct atom_context *ctx, int index,
sys/dev/pci/drm/radeon/atom.c
1385
int idx = CU16(ctx->data_table + offset);
sys/dev/pci/drm/radeon/atom.c
1386
u16 *mdt = (u16 *)(ctx->bios + ctx->data_table + 4);
sys/dev/pci/drm/radeon/atom.c
1401
bool atom_parse_cmd_header(struct atom_context *ctx, int index, uint8_t *frev,
sys/dev/pci/drm/radeon/atom.c
1405
int idx = CU16(ctx->cmd_table + offset);
sys/dev/pci/drm/radeon/atom.c
1406
u16 *mct = (u16 *)(ctx->bios + ctx->cmd_table + 4);
sys/dev/pci/drm/radeon/atom.c
1418
int atom_allocate_fb_scratch(struct atom_context *ctx)
sys/dev/pci/drm/radeon/atom.c
1425
if (atom_parse_data_header(ctx, index, NULL, NULL, NULL, &data_offset)) {
sys/dev/pci/drm/radeon/atom.c
1426
firmware_usage = (struct _ATOM_VRAM_USAGE_BY_FIRMWARE *)(ctx->bios + data_offset);
sys/dev/pci/drm/radeon/atom.c
1434
ctx->scratch_size_bytes = 0;
sys/dev/pci/drm/radeon/atom.c
1438
ctx->scratch = kzalloc(usage_bytes, GFP_KERNEL);
sys/dev/pci/drm/radeon/atom.c
1439
if (!ctx->scratch)
sys/dev/pci/drm/radeon/atom.c
1441
ctx->scratch_size_bytes = usage_bytes;
sys/dev/pci/drm/radeon/atom.c
171
((ctx->io_attr >> CU8(base + 2)) &
sys/dev/pci/drm/radeon/atom.c
184
static uint32_t atom_get_src_int(atom_exec_context *ctx, uint8_t attr,
sys/dev/pci/drm/radeon/atom.c
188
struct atom_context *gctx = ctx->ctx;
sys/dev/pci/drm/radeon/atom.c
229
if (idx < ctx->ps_size)
sys/dev/pci/drm/radeon/atom.c
230
val = get_unaligned_le32((u32 *)&ctx->ps[idx]);
sys/dev/pci/drm/radeon/atom.c
232
pr_info("PS index out of range: %i > %i\n", idx, ctx->ps_size);
sys/dev/pci/drm/radeon/atom.c
270
if (idx < ctx->ws_size)
sys/dev/pci/drm/radeon/atom.c
271
val = ctx->ws[idx];
sys/dev/pci/drm/radeon/atom.c
273
pr_info("WS index out of range: %i > %i\n", idx, ctx->ws_size);
sys/dev/pci/drm/radeon/atom.c
375
static void atom_skip_src_int(atom_exec_context *ctx, uint8_t attr, int *ptr)
sys/dev/pci/drm/radeon/atom.c
411
static uint32_t atom_get_src(atom_exec_context *ctx, uint8_t attr, int *ptr)
sys/dev/pci/drm/radeon/atom.c
413
return atom_get_src_int(ctx, attr, ptr, NULL, 1);
sys/dev/pci/drm/radeon/atom.c
416
static uint32_t atom_get_src_direct(atom_exec_context *ctx, uint8_t align, int *ptr)
sys/dev/pci/drm/radeon/atom.c
442
static uint32_t atom_get_dst(atom_exec_context *ctx, int arg, uint8_t attr,
sys/dev/pci/drm/radeon/atom.c
445
return atom_get_src_int(ctx,
sys/dev/pci/drm/radeon/atom.c
451
static void atom_skip_dst(atom_exec_context *ctx, int arg, uint8_t attr, int *ptr)
sys/dev/pci/drm/radeon/atom.c
453
atom_skip_src_int(ctx,
sys/dev/pci/drm/radeon/atom.c
458
static void atom_put_dst(atom_exec_context *ctx, int arg, uint8_t attr,
sys/dev/pci/drm/radeon/atom.c
464
struct atom_context *gctx = ctx->ctx;
sys/dev/pci/drm/radeon/atom.c
508
if (idx >= ctx->ps_size) {
sys/dev/pci/drm/radeon/atom.c
509
pr_info("PS index out of range: %i > %i\n", idx, ctx->ps_size);
sys/dev/pci/drm/radeon/atom.c
512
ctx->ps[idx] = cpu_to_le32(val);
sys/dev/pci/drm/radeon/atom.c
544
if (idx >= ctx->ws_size) {
sys/dev/pci/drm/radeon/atom.c
545
pr_info("WS index out of range: %i > %i\n", idx, ctx->ws_size);
sys/dev/pci/drm/radeon/atom.c
548
ctx->ws[idx] = val;
sys/dev/pci/drm/radeon/atom.c
602
static void atom_op_add(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
608
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/radeon/atom.c
61
struct atom_context *ctx;
sys/dev/pci/drm/radeon/atom.c
610
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
613
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/radeon/atom.c
616
static void atom_op_and(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
622
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/radeon/atom.c
624
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
627
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/radeon/atom.c
630
static void atom_op_beep(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
635
static void atom_op_calltable(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
644
if (U16(ctx->ctx->cmd_table + 4 + 2 * idx))
sys/dev/pci/drm/radeon/atom.c
645
r = atom_execute_table_locked(ctx->ctx, idx, ctx->ps + ctx->ps_shift, ctx->ps_size - ctx->ps_shift);
sys/dev/pci/drm/radeon/atom.c
647
ctx->abort = true;
sys/dev/pci/drm/radeon/atom.c
651
static void atom_op_clear(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
658
atom_get_dst(ctx, arg, attr, ptr, &saved, 0);
sys/dev/pci/drm/radeon/atom.c
660
atom_put_dst(ctx, arg, attr, &dptr, 0, saved);
sys/dev/pci/drm/radeon/atom.c
663
static void atom_op_compare(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
668
dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1);
sys/dev/pci/drm/radeon/atom.c
670
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
671
ctx->ctx->cs_equal = (dst == src);
sys/dev/pci/drm/radeon/atom.c
672
ctx->ctx->cs_above = (dst > src);
sys/dev/pci/drm/radeon/atom.c
673
SDEBUG(" result: %s %s\n", ctx->ctx->cs_equal ? "EQ" : "NE",
sys/dev/pci/drm/radeon/atom.c
674
ctx->ctx->cs_above ? "GT" : "LE");
sys/dev/pci/drm/radeon/atom.c
677
static void atom_op_delay(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
689
static void atom_op_div(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
694
dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1);
sys/dev/pci/drm/radeon/atom.c
696
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
698
ctx->ctx->divmul[0] = dst / src;
sys/dev/pci/drm/radeon/atom.c
699
ctx->ctx->divmul[1] = dst % src;
sys/dev/pci/drm/radeon/atom.c
701
ctx->ctx->divmul[0] = 0;
sys/dev/pci/drm/radeon/atom.c
702
ctx->ctx->divmul[1] = 0;
sys/dev/pci/drm/radeon/atom.c
706
static void atom_op_eot(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
711
static void atom_op_jump(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
719
execute = ctx->ctx->cs_above;
sys/dev/pci/drm/radeon/atom.c
72
static int atom_execute_table_locked(struct atom_context *ctx, int index, uint32_t *params, int params_size);
sys/dev/pci/drm/radeon/atom.c
722
execute = ctx->ctx->cs_above || ctx->ctx->cs_equal;
sys/dev/pci/drm/radeon/atom.c
728
execute = !(ctx->ctx->cs_above || ctx->ctx->cs_equal);
sys/dev/pci/drm/radeon/atom.c
73
int atom_execute_table(struct atom_context *ctx, int index, uint32_t *params, int params_size);
sys/dev/pci/drm/radeon/atom.c
731
execute = !ctx->ctx->cs_above;
sys/dev/pci/drm/radeon/atom.c
734
execute = ctx->ctx->cs_equal;
sys/dev/pci/drm/radeon/atom.c
737
execute = !ctx->ctx->cs_equal;
sys/dev/pci/drm/radeon/atom.c
744
if (ctx->last_jump == (ctx->start + target)) {
sys/dev/pci/drm/radeon/atom.c
746
if (time_after(cjiffies, ctx->last_jump_jiffies)) {
sys/dev/pci/drm/radeon/atom.c
747
cjiffies -= ctx->last_jump_jiffies;
sys/dev/pci/drm/radeon/atom.c
750
ctx->abort = true;
sys/dev/pci/drm/radeon/atom.c
754
ctx->last_jump_jiffies = jiffies;
sys/dev/pci/drm/radeon/atom.c
757
ctx->last_jump = ctx->start + target;
sys/dev/pci/drm/radeon/atom.c
758
ctx->last_jump_jiffies = jiffies;
sys/dev/pci/drm/radeon/atom.c
760
*ptr = ctx->start + target;
sys/dev/pci/drm/radeon/atom.c
764
static void atom_op_mask(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
770
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/radeon/atom.c
771
mask = atom_get_src_direct(ctx, ((attr >> 3) & 7), ptr);
sys/dev/pci/drm/radeon/atom.c
774
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
778
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/radeon/atom.c
781
static void atom_op_move(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
787
atom_get_dst(ctx, arg, attr, ptr, &saved, 0);
sys/dev/pci/drm/radeon/atom.c
789
atom_skip_dst(ctx, arg, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
793
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
795
atom_put_dst(ctx, arg, attr, &dptr, src, saved);
sys/dev/pci/drm/radeon/atom.c
798
static void atom_op_mul(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
803
dst = atom_get_dst(ctx, arg, attr, ptr, NULL, 1);
sys/dev/pci/drm/radeon/atom.c
805
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
806
ctx->ctx->divmul[0] = dst * src;
sys/dev/pci/drm/radeon/atom.c
809
static void atom_op_nop(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
814
static void atom_op_or(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
820
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/radeon/atom.c
822
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
825
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/radeon/atom.c
828
static void atom_op_postcard(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
834
static void atom_op_repeat(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
839
static void atom_op_restorereg(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
844
static void atom_op_savereg(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
849
static void atom_op_setdatablock(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
855
ctx->ctx->data_block = 0;
sys/dev/pci/drm/radeon/atom.c
857
ctx->ctx->data_block = ctx->start;
sys/dev/pci/drm/radeon/atom.c
859
ctx->ctx->data_block = U16(ctx->ctx->data_table + 4 + 2 * idx);
sys/dev/pci/drm/radeon/atom.c
860
SDEBUG(" base: 0x%04X\n", ctx->ctx->data_block);
sys/dev/pci/drm/radeon/atom.c
863
static void atom_op_setfbbase(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
867
ctx->ctx->fb_base = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
870
static void atom_op_setport(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
881
ctx->ctx->io_mode = ATOM_IO_MM;
sys/dev/pci/drm/radeon/atom.c
883
ctx->ctx->io_mode = ATOM_IO_IIO | port;
sys/dev/pci/drm/radeon/atom.c
887
ctx->ctx->io_mode = ATOM_IO_PCI;
sys/dev/pci/drm/radeon/atom.c
891
ctx->ctx->io_mode = ATOM_IO_SYSIO;
sys/dev/pci/drm/radeon/atom.c
897
static void atom_op_setregblock(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
899
ctx->ctx->reg_block = U16(*ptr);
sys/dev/pci/drm/radeon/atom.c
901
SDEBUG(" base: 0x%04X\n", ctx->ctx->reg_block);
sys/dev/pci/drm/radeon/atom.c
904
static void atom_op_shift_left(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
912
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/radeon/atom.c
913
shift = atom_get_src_direct(ctx, ATOM_SRC_BYTE0, ptr);
sys/dev/pci/drm/radeon/atom.c
917
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/radeon/atom.c
920
static void atom_op_shift_right(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
928
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/radeon/atom.c
929
shift = atom_get_src_direct(ctx, ATOM_SRC_BYTE0, ptr);
sys/dev/pci/drm/radeon/atom.c
933
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/radeon/atom.c
936
static void atom_op_shl(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
943
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/radeon/atom.c
946
shift = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
952
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/radeon/atom.c
955
static void atom_op_shr(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
962
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/radeon/atom.c
965
shift = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
971
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/radeon/atom.c
974
static void atom_op_sub(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
980
dst = atom_get_dst(ctx, arg, attr, ptr, &saved, 1);
sys/dev/pci/drm/radeon/atom.c
982
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
985
atom_put_dst(ctx, arg, attr, &dptr, dst, saved);
sys/dev/pci/drm/radeon/atom.c
988
static void atom_op_switch(atom_exec_context *ctx, int *ptr, int arg)
sys/dev/pci/drm/radeon/atom.c
993
src = atom_get_src(ctx, attr, ptr);
sys/dev/pci/drm/radeon/atom.c
999
atom_get_src(ctx, (attr & 0x38) | ATOM_ARG_IMM,
sys/dev/pci/drm/radeon/atom.h
152
bool atom_parse_data_header(struct atom_context *ctx, int index, uint16_t *size,
sys/dev/pci/drm/radeon/atom.h
154
bool atom_parse_cmd_header(struct atom_context *ctx, int index,
sys/dev/pci/drm/radeon/atom.h
156
int atom_allocate_fb_scratch(struct atom_context *ctx);
sys/dev/pci/drm/radeon/radeon_atombios.c
131
struct atom_context *ctx = rdev->mode_info.atom_context;
sys/dev/pci/drm/radeon/radeon_atombios.c
142
if (atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset)) {
sys/dev/pci/drm/radeon/radeon_atombios.c
143
i2c_info = (struct _ATOM_GPIO_I2C_INFO *)(ctx->bios + data_offset);
sys/dev/pci/drm/radeon/radeon_atombios.c
167
struct atom_context *ctx = rdev->mode_info.atom_context;
sys/dev/pci/drm/radeon/radeon_atombios.c
176
if (atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset)) {
sys/dev/pci/drm/radeon/radeon_atombios.c
177
i2c_info = (struct _ATOM_GPIO_I2C_INFO *)(ctx->bios + data_offset);
sys/dev/pci/drm/radeon/radeon_atombios.c
201
struct atom_context *ctx = rdev->mode_info.atom_context;
sys/dev/pci/drm/radeon/radeon_atombios.c
212
if (atom_parse_data_header(ctx, index, &size, NULL, NULL, &data_offset)) {
sys/dev/pci/drm/radeon/radeon_atombios.c
213
gpio_info = (struct _ATOM_GPIO_PIN_LUT *)(ctx->bios + data_offset);
sys/dev/pci/drm/radeon/radeon_atombios.c
525
struct atom_context *ctx = mode_info->atom_context;
sys/dev/pci/drm/radeon/radeon_atombios.c
542
if (!atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset))
sys/dev/pci/drm/radeon/radeon_atombios.c
548
obj_header = (ATOM_OBJECT_HEADER *) (ctx->bios + data_offset);
sys/dev/pci/drm/radeon/radeon_atombios.c
550
(ctx->bios + data_offset +
sys/dev/pci/drm/radeon/radeon_atombios.c
553
(ctx->bios + data_offset +
sys/dev/pci/drm/radeon/radeon_atombios.c
556
(ctx->bios + data_offset +
sys/dev/pci/drm/radeon/radeon_atombios.c
559
(ctx->bios + data_offset +
sys/dev/pci/drm/radeon/radeon_atombios.c
597
if (atom_parse_data_header(ctx, index, &size, &frev,
sys/dev/pci/drm/radeon/radeon_atombios.c
603
*) (ctx->bios + igp_offset);
sys/dev/pci/drm/radeon/radeon_atombios.c
656
(ctx->bios + data_offset +
sys/dev/pci/drm/radeon/radeon_atombios.c
687
(ctx->bios + data_offset +
sys/dev/pci/drm/radeon/radeon_atombios.c
695
(ctx->bios + data_offset +
sys/dev/pci/drm/radeon/radeon_atombios.c
765
(ctx->bios + data_offset +
sys/dev/pci/drm/radeon/radeon_atombios.c
850
struct atom_context *ctx = mode_info->atom_context;
sys/dev/pci/drm/radeon/radeon_atombios.c
856
if (atom_parse_data_header(ctx, index, &size, &frev, &crev, &data_offset)) {
sys/dev/pci/drm/radeon/radeon_atombios.c
857
xtmds = (ATOM_XTMDS_INFO *)(ctx->bios + data_offset);
sys/dev/pci/drm/radeon/radeon_atombios.c
894
struct atom_context *ctx = mode_info->atom_context;
sys/dev/pci/drm/radeon/radeon_atombios.c
913
if (!atom_parse_data_header(ctx, index, &size, &frev, &crev,
sys/dev/pci/drm/radeon/radeon_atombios.c
920
(union atom_supported_devices *)(ctx->bios + data_offset);
sys/dev/pci/drm/radeon/radeon_display.c
241
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/radeon/radeon_display.c
483
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/radeon/radeon_display.c
622
struct drm_modeset_acquire_ctx *ctx)
sys/dev/pci/drm/radeon/radeon_display.c
641
ret = drm_crtc_helper_set_config(set, ctx);
sys/dev/pci/drm/radeon/radeon_drv.c
923
struct drm_modeset_acquire_ctx ctx;
sys/dev/pci/drm/radeon/radeon_drv.c
930
DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
sys/dev/pci/drm/radeon/radeon_drv.c
941
DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
sys/dev/pci/drm/radeon/radeon_gem.c
440
struct ttm_operation_ctx ctx = { true, false };
sys/dev/pci/drm/radeon/radeon_gem.c
501
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/radeon/radeon_mn.c
54
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/radeon/radeon_mn.c
75
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/radeon/radeon_object.c
275
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/radeon/radeon_object.c
316
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/radeon/radeon_object.c
489
struct ttm_operation_ctx ctx = { true, false };
sys/dev/pci/drm/radeon/radeon_object.c
534
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/radeon/radeon_object.c
738
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/radeon/radeon_object.c
770
r = ttm_bo_validate(bo, &rbo->placement, &ctx);
sys/dev/pci/drm/radeon/radeon_object.c
773
r = ttm_bo_validate(bo, &rbo->placement, &ctx);
sys/dev/pci/drm/radeon/radeon_ttm.c
197
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/radeon/radeon_ttm.c
211
r = ttm_bo_wait_ctx(bo, ctx);
sys/dev/pci/drm/radeon/radeon_ttm.c
252
r = ttm_bo_move_memcpy(bo, ctx, new_mem);
sys/dev/pci/drm/radeon/radeon_ttm.c
544
struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/radeon/radeon_ttm.c
565
return ttm_pool_alloc(&rdev->mman.bdev.pool, ttm, ctx);
sys/dev/pci/drm/radeon/radeon_vm.c
389
struct ttm_operation_ctx ctx = { true, false };
sys/dev/pci/drm/radeon/radeon_vm.c
399
r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
sys/dev/pci/drm/scheduler/gpu_scheduler_trace.h
118
__field(u64, ctx)
sys/dev/pci/drm/scheduler/gpu_scheduler_trace.h
125
__entry->ctx = fence->context;
sys/dev/pci/drm/scheduler/gpu_scheduler_trace.h
130
__entry->ctx, __entry->seqno)
sys/dev/pci/drm/scheduler/gpu_scheduler_trace.h
139
__field(u64, ctx)
sys/dev/pci/drm/scheduler/gpu_scheduler_trace.h
146
__entry->ctx = fence->context;
sys/dev/pci/drm/scheduler/gpu_scheduler_trace.h
151
__entry->ctx, __entry->seqno)
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
103
err = ttm_bo_reserve(bo, interruptible, no_wait, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
106
ww_acquire_fini(&ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
112
struct ww_acquire_ctx ctx;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
117
ww_acquire_init(&ctx, &reservation_ww_class);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
121
err = ttm_bo_reserve(bo, interruptible, no_wait, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
124
err = ttm_bo_reserve(bo, interruptible, no_wait, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
127
ww_acquire_fini(&ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
156
bo2->base.resv->lock.ctx = &ctx2;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
173
struct ww_acquire_ctx *ctx;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
179
struct task_struct *task = s_timer->ctx->task;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
188
struct ww_acquire_ctx ctx;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
193
ww_acquire_init(&ctx, &reservation_ww_class);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
197
s_timer.ctx = &ctx;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
201
err = ttm_bo_reserve(bo, interruptible, no_wait, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
206
ww_acquire_fini(&ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
94
struct ww_acquire_ctx ctx;
sys/dev/pci/drm/ttm/tests/ttm_bo_test.c
99
ww_acquire_init(&ctx, &reservation_ww_class);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
110
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
125
PAGE_SIZE, &ctx, NULL, NULL,
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
140
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, size);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
156
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
174
PAGE_SIZE, &ctx, NULL, NULL,
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
182
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, size);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
198
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
216
PAGE_SIZE, &ctx, NULL, &resv,
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
277
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
290
err = ttm_bo_validate(bo, placement, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
303
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
319
err = ttm_bo_validate(bo, placement, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
332
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
347
err = ttm_bo_validate(bo, placement, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
523
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
541
ttm_pool_alloc(&priv->ttm_dev->pool, old_tt, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
554
err = ttm_bo_validate(bo, placement, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
560
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
594
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
623
err = ttm_bo_validate(bo, placement, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
630
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, 0);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
646
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
664
err = ttm_bo_validate(bo, placement, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_bo_validate_test.c
669
KUNIT_EXPECT_EQ(test, ctx.bytes_moved, size);
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
64
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/ttm/tests/ttm_kunit_helpers.c
92
return ttm_bo_move_memcpy(bo, ctx, new_mem);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
262
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
265
err = ttm_tt_populate(devs->ttm_dev, NULL, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
272
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
286
err = ttm_tt_populate(devs->ttm_dev, tt, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
290
err = ttm_tt_populate(devs->ttm_dev, tt, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
297
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
310
err = ttm_tt_populate(devs->ttm_dev, tt, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
341
struct ttm_operation_ctx ctx = { };
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
354
err = ttm_tt_populate(devs->ttm_dev, tt, &ctx);
sys/dev/pci/drm/ttm/tests/ttm_tt_test.c
364
err = ttm_pool_alloc(&devs->ttm_dev->pool, tt, &ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
1027
struct ttm_operation_ctx ctx = { interruptible, false };
sys/dev/pci/drm/ttm/ttm_bo.c
1030
ret = ttm_bo_init_reserved(bdev, bo, type, placement, alignment, &ctx,
sys/dev/pci/drm/ttm/ttm_bo.c
1096
int ttm_bo_wait_ctx(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_bo.c
1100
if (ctx->no_wait_gpu) {
sys/dev/pci/drm/ttm/ttm_bo.c
1109
ctx->interruptible, 15 * HZ);
sys/dev/pci/drm/ttm/ttm_bo.c
1137
struct ttm_operation_ctx *ctx = walk->arg.ctx;
sys/dev/pci/drm/ttm/ttm_bo.c
1161
ret = ttm_bo_wait_ctx(bo, ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
1183
ret = ttm_bo_handle_move_mem(bo, evict_mem, true, ctx, &hop);
sys/dev/pci/drm/ttm/ttm_bo.c
1195
ret = ttm_bo_wait_ctx(bo, ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
120
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/ttm/ttm_bo.c
1241
s64 ttm_bo_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/ttm/ttm_bo.c
1249
.ctx = ctx,
sys/dev/pci/drm/ttm/ttm_bo.c
1285
struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_bo.c
1297
ret = ttm_tt_populate(bo->bdev, tt, ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
1314
struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_bo.c
1322
ret = ttm_bo_populate(bo, ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
145
ret = ttm_bo_populate(bo, ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
155
ret = bdev->funcs->move(bo, evict, ctx, mem, hop);
sys/dev/pci/drm/ttm/ttm_bo.c
162
ctx->bytes_moved += bo->base.size;
sys/dev/pci/drm/ttm/ttm_bo.c
335
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/ttm/ttm_bo.c
346
ret = ttm_bo_mem_space(bo, &hop_placement, &hop_mem, ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
350
ret = ttm_bo_handle_move_mem(bo, hop_mem, false, ctx, NULL);
sys/dev/pci/drm/ttm/ttm_bo.c
359
struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_bo.c
375
ret = ttm_bo_wait_ctx(bo, ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
386
ret = ttm_bo_mem_space(bo, &placement, &evict_mem, ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
397
ret = ttm_bo_handle_move_mem(bo, evict_mem, true, ctx, &hop);
sys/dev/pci/drm/ttm/ttm_bo.c
401
ret = ttm_bo_bounce_temp_buffer(bo, ctx, &hop);
sys/dev/pci/drm/ttm/ttm_bo.c
447
struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_bo.c
468
ret = ttm_bo_reserve(bo, ctx->interruptible, ctx->no_wait_gpu, NULL);
sys/dev/pci/drm/ttm/ttm_bo.c
475
ret = ttm_bo_wait_ctx(bo, ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
479
ret = ttm_bo_evict(bo, ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
529
lret = ttm_bo_wait_ctx(bo, walk->arg.ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
533
lret = ttm_bo_evict(bo, walk->arg.ctx);
sys/dev/pci/drm/ttm/ttm_bo.c
561
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/ttm/ttm_bo.c
570
.ctx = ctx,
sys/dev/pci/drm/ttm/ttm_bo.c
712
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/ttm/ttm_bo.c
751
ret = ttm_bo_evict_alloc(bdev, man, place, bo, ctx,
sys/dev/pci/drm/ttm/ttm_bo.c
760
ret = ttm_bo_add_move_fence(bo, man, ctx->no_wait_gpu);
sys/dev/pci/drm/ttm/ttm_bo.c
788
struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_bo.c
794
ret = ttm_bo_alloc_resource(bo, placement, ctx,
sys/dev/pci/drm/ttm/ttm_bo.c
820
struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_bo.c
856
ret = ttm_bo_alloc_resource(bo, placement, ctx, force_space,
sys/dev/pci/drm/ttm/ttm_bo.c
865
ret = ttm_bo_handle_move_mem(bo, res, false, ctx, &hop);
sys/dev/pci/drm/ttm/ttm_bo.c
867
ret = ttm_bo_bounce_temp_buffer(bo, ctx, &hop);
sys/dev/pci/drm/ttm/ttm_bo.c
930
uint32_t alignment, struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/ttm/ttm_bo.c
969
ret = ttm_bo_validate(bo, placement, ctx);
sys/dev/pci/drm/ttm/ttm_bo_util.c
1009
else if (!arg->ticket || arg->ctx->no_wait_gpu || arg->trylock_only)
sys/dev/pci/drm/ttm/ttm_bo_util.c
1088
long ttm_bo_shrink(struct ttm_operation_ctx *ctx, struct ttm_buffer_object *bo,
sys/dev/pci/drm/ttm/ttm_bo_util.c
1107
int ret = ttm_bo_validate(bo, &sys_placement, ctx);
sys/dev/pci/drm/ttm/ttm_bo_util.c
1118
lret = ttm_bo_wait_ctx(bo, ctx);
sys/dev/pci/drm/ttm/ttm_bo_util.c
1156
bool ttm_bo_shrink_suitable(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_bo_util.c
1159
(!ctx->no_wait_gpu ||
sys/dev/pci/drm/ttm/ttm_bo_util.c
148
struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/ttm/ttm_bo_util.c
171
ret = ttm_bo_populate(bo, ctx);
sys/dev/pci/drm/ttm/ttm_bo_util.c
357
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/ttm/ttm_bo_util.c
369
ret = ttm_bo_populate(bo, &ctx);
sys/dev/pci/drm/ttm/ttm_bo_util.c
555
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/ttm/ttm_bo_util.c
563
ret = ttm_bo_populate(bo, &ctx);
sys/dev/pci/drm/ttm/ttm_bo_util.c
830
struct ttm_operation_ctx *ctx = curs->arg->ctx;
sys/dev/pci/drm/ttm/ttm_bo_util.c
839
if (bo->base.resv == ctx->resv && ctx->allow_res_evict) {
sys/dev/pci/drm/ttm/ttm_bo_util.c
854
if (arg->ctx->interruptible)
sys/dev/pci/drm/ttm/ttm_bo_vm.c
224
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/ttm/ttm_bo_vm.c
230
err = ttm_bo_populate(bo, &ctx);
sys/dev/pci/drm/ttm/ttm_bo_vm.c
526
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/ttm/ttm_bo_vm.c
532
err = ttm_bo_populate(bo, &ctx);
sys/dev/pci/drm/ttm/ttm_device.c
135
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/ttm/ttm_device.c
142
ret = ttm_device_swapout(bdev, &ctx, GFP_KERNEL);
sys/dev/pci/drm/ttm/ttm_device.c
153
int ttm_global_swapout(struct ttm_operation_ctx *ctx, gfp_t gfp_flags)
sys/dev/pci/drm/ttm/ttm_device.c
161
ret = ttm_device_swapout(bdev, ctx, gfp_flags);
sys/dev/pci/drm/ttm/ttm_device.c
171
int ttm_device_swapout(struct ttm_device *bdev, struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/ttm/ttm_device.c
183
lret = ttm_bo_swapout(bdev, ctx, man, gfp_flags, 1);
sys/dev/pci/drm/ttm/ttm_pool.c
1007
if (ctx->gfp_retry_mayfail)
sys/dev/pci/drm/ttm/ttm_pool.c
1023
ret = ttm_pool_restore_commit(restore, tt->backup, ctx, &alloc);
sys/dev/pci/drm/ttm/ttm_pool.c
1031
return __ttm_pool_alloc(pool, tt, ctx, &alloc, tt->restore);
sys/dev/pci/drm/ttm/ttm_pool.c
662
const struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/ttm/ttm_pool.c
679
if (IS_ENABLED(CONFIG_FAULT_INJECTION) && ctx->interruptible &&
sys/dev/pci/drm/ttm/ttm_pool.c
691
handle, ctx->interruptible);
sys/dev/pci/drm/ttm/ttm_pool.c
857
const struct ttm_operation_ctx *ctx,
sys/dev/pci/drm/ttm/ttm_pool.c
878
if (ctx->gfp_retry_mayfail)
sys/dev/pci/drm/ttm/ttm_pool.c
926
r = ttm_pool_restore_commit(restore, tt->backup, ctx, alloc);
sys/dev/pci/drm/ttm/ttm_pool.c
969
struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_pool.c
978
return __ttm_pool_alloc(pool, tt, ctx, &alloc, NULL);
sys/dev/pci/drm/ttm/ttm_pool.c
996
const struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_resource.c
549
struct ttm_operation_ctx ctx = {
sys/dev/pci/drm/ttm/ttm_resource.c
557
ret = ttm_bo_evict_first(bdev, man, &ctx);
sys/dev/pci/drm/ttm/ttm_tt.c
341
const struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_tt.c
343
int ret = ttm_pool_restore_and_alloc(&bdev->pool, tt, ctx);
sys/dev/pci/drm/ttm/ttm_tt.c
424
struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
sys/dev/pci/drm/ttm/ttm_tt.c
445
ret = ttm_global_swapout(ctx, GFP_KERNEL);
sys/dev/pci/drm/ttm/ttm_tt.c
453
ret = bdev->funcs->ttm_tt_populate(bdev, ttm, ctx);
sys/dev/pci/drm/ttm/ttm_tt.c
455
ret = ttm_pool_alloc(&bdev->pool, ttm, ctx);
sys/dev/pci/drm/ttm/ttm_tt.c
511
struct ttm_operation_ctx ctx = { false, false };
sys/dev/pci/drm/ttm/ttm_tt.c
513
seq_printf(m, "%d\n", ttm_global_swapout(&ctx, GFP_KERNEL));
sys/dev/pci/gdt_pci.c
619
gdt_pci_intr(struct gdt_softc *sc, struct gdt_intr_ctx *ctx)
sys/dev/pci/gdt_pci.c
661
gdt_pcinew_intr(struct gdt_softc *sc, struct gdt_intr_ctx *ctx)
sys/dev/pci/gdt_pci.c
719
gdt_mpr_intr(struct gdt_softc *sc, struct gdt_intr_ctx *ctx)
sys/dev/pci/gdt_pci.c
723
if (ctx->istatus & 0x80) { /* error flag */
sys/dev/pci/gdt_pci.c
724
ctx->istatus &= ~0x80;
sys/dev/pci/gdt_pci.c
725
ctx->cmd_status = bus_space_read_2(sc->sc_dpmemt,
sys/dev/pci/gdt_pci.c
727
if (ctx->istatus == GDT_ASYNCINDEX) {
sys/dev/pci/gdt_pci.c
728
ctx->service = bus_space_read_2(sc->sc_dpmemt,
sys/dev/pci/gdt_pci.c
730
ctx->info2 = bus_space_read_4(sc->sc_dpmemt,
sys/dev/pci/gdt_pci.c
734
ctx->cmd_status = GDT_S_OK;
sys/dev/pci/gdt_pci.c
736
ctx->info =
sys/dev/pci/gdt_pci.c
740
ctx->info2 = bus_space_read_4(sc->sc_dpmemt, sc->sc_dpmemh,
sys/dev/pci/if_ice.c
20953
struct ice_vsi_ctx ctx = { 0 };
sys/dev/pci/if_ice.c
20961
ctx.info = vsi->info;
sys/dev/pci/if_ice.c
20975
status = ice_free_vsi(hw, vsi->idx, &ctx, false, NULL);
sys/dev/pci/if_ice.c
21414
ice_set_default_vsi_ctx(struct ice_vsi_ctx *ctx)
sys/dev/pci/if_ice.c
21418
memset(&ctx->info, 0, sizeof(ctx->info));
sys/dev/pci/if_ice.c
21420
ctx->alloc_from_pool = true;
sys/dev/pci/if_ice.c
21422
ctx->info.sw_flags = ICE_AQ_VSI_SW_FLAG_SRC_PRUNE;
sys/dev/pci/if_ice.c
21424
ctx->info.sw_flags2 = ICE_AQ_VSI_SW_FLAG_LAN_ENA;
sys/dev/pci/if_ice.c
21426
ctx->info.inner_vlan_flags = ((ICE_AQ_VSI_INNER_VLAN_TX_MODE_ALL &
sys/dev/pci/if_ice.c
21430
ctx->info.inner_vlan_flags |= ((ICE_AQ_VSI_INNER_VLAN_EMODE_STR_BOTH &
sys/dev/pci/if_ice.c
21442
ctx->info.ingress_table = htole32(table);
sys/dev/pci/if_ice.c
21443
ctx->info.egress_table = htole32(table);
sys/dev/pci/if_ice.c
21445
ctx->info.outer_up_table = htole32(table);
sys/dev/pci/if_ice.c
21457
ice_set_rss_vsi_ctx(struct ice_vsi_ctx *ctx, enum ice_vsi_type type)
sys/dev/pci/if_ice.c
21476
ctx->info.q_opt_rss = (((lut_type << ICE_AQ_VSI_Q_OPT_RSS_LUT_S) &
sys/dev/pci/if_ice.c
21526
ice_setup_vsi_qmap(struct ice_vsi *vsi, struct ice_vsi_ctx *ctx)
sys/dev/pci/if_ice.c
21535
ctx->info.mapping_flags |= htole16(ICE_AQ_VSI_Q_MAP_CONTIG);
sys/dev/pci/if_ice.c
21537
ctx->info.q_mapping[0] = htole16(vsi->rx_qmap[0]);
sys/dev/pci/if_ice.c
21538
ctx->info.q_mapping[1] = htole16(vsi->num_rx_queues);
sys/dev/pci/if_ice.c
21542
ctx->info.mapping_flags |= htole16(ICE_AQ_VSI_Q_MAP_NONCONTIG);
sys/dev/pci/if_ice.c
21545
ctx->info.q_mapping[i] = htole16(vsi->rx_qmap[i]);
sys/dev/pci/if_ice.c
21557
ctx->info.tc_mapping[0] = htole16(qmap);
sys/dev/pci/if_ice.c
22475
struct ice_vsi_ctx ctx = { 0 };
sys/dev/pci/if_ice.c
22484
ctx.flags = ICE_AQ_VSI_TYPE_PF;
sys/dev/pci/if_ice.c
22487
ctx.flags = ICE_AQ_VSI_TYPE_VMDQ2;
sys/dev/pci/if_ice.c
22493
ice_set_default_vsi_ctx(&ctx);
sys/dev/pci/if_ice.c
22494
ice_set_rss_vsi_ctx(&ctx, vsi->type);
sys/dev/pci/if_ice.c
22497
ctx.info.sw_id = hw->port_info->sw_id;
sys/dev/pci/if_ice.c
22503
err = ice_setup_vsi_qmap(vsi, &ctx);
sys/dev/pci/if_ice.c
22508
status = ice_add_vsi(hw, vsi->idx, &ctx, NULL);
sys/dev/pci/if_ice.c
22515
vsi->info = ctx.info;
sys/dev/pci/if_icereg.h
11181
uint8_t ctx;
sys/dev/pci/if_icereg.h
11259
uint8_t ctx; /* Used in command, reserved in response */
sys/dev/pci/if_icereg.h
11277
uint8_t ctx;
sys/dev/pci/if_icereg.h
11310
uint8_t ctx;
sys/dev/pci/if_icevar.h
4676
struct sysctl_ctx_list ctx;
sys/dev/pci/if_mcx.c
4218
struct mcx_nic_vport_ctx *ctx;
sys/dev/pci/if_mcx.c
4273
ctx = (struct mcx_nic_vport_ctx *)
sys/dev/pci/if_mcx.c
4275
ctx->vp_mtu = htobe32(sc->sc_hardmtu);
sys/dev/pci/if_mcx.c
4281
ctx->vp_flags = htobe16(MCX_NIC_VPORT_CTX_PROMISC_ALL);
sys/dev/pci/if_mcx.c
4523
struct mcx_nic_vport_ctx *ctx;
sys/dev/pci/if_mcx.c
4529
mcx_cmdq_init(sc, cqe, sizeof(*in), sizeof(*out) + sizeof(*ctx), token);
sys/dev/pci/if_mcx.c
4563
ctx = (struct mcx_nic_vport_ctx *)
sys/dev/pci/if_mcx.c
4565
addr = (uint8_t *)&ctx->vp_perm_addr;
sys/dev/pci/if_mcx.c
6617
struct mcx_cq_ctx *ctx;
sys/dev/pci/if_mcx.c
6625
mcx_cmdq_init(sc, cqe, sizeof(*in), sizeof(*out) + sizeof(*ctx) + 16,
sys/dev/pci/if_mcx.c
6633
CTASSERT(sizeof(*ctx) <= MCX_CMDQ_MAILBOX_DATASIZE*2);
sys/dev/pci/if_mcx.c
6664
ctx = (struct mcx_cq_ctx *)(mcx_cq_mbox_data(mcx_cq_mbox(&mxm, 0)));
sys/dev/pci/if_mcx.c
6665
memcpy(cq_ctx, ctx, sizeof(*cq_ctx));
sys/dev/pci/if_mcx.c
6678
struct mcx_eq_ctx *ctx;
sys/dev/pci/if_mcx.c
6686
mcx_cmdq_init(sc, cqe, sizeof(*in), sizeof(*out) + sizeof(*ctx) + 16,
sys/dev/pci/if_mcx.c
6694
CTASSERT(sizeof(*ctx) <= MCX_CMDQ_MAILBOX_DATASIZE*2);
sys/dev/pci/if_mcx.c
6725
ctx = (struct mcx_eq_ctx *)(mcx_cq_mbox_data(mcx_cq_mbox(&mxm, 0)));
sys/dev/pci/if_mcx.c
6726
memcpy(eq_ctx, ctx, sizeof(*eq_ctx));
sys/dev/pci/if_nxe.c
1069
struct nxe_ctx ctx;
sys/dev/pci/if_nxe.c
1072
struct nxe_ctx *ctx;
sys/dev/pci/if_nxe.c
1098
ctx = &dmamem->ctx;
sys/dev/pci/if_nxe.c
1099
ctx->ctx_cmd_consumer_addr = htole64(dva + sizeof(dmamem->ctx));
sys/dev/pci/if_nxe.c
1100
ctx->ctx_id = htole32(sc->sc_function);
sys/dev/pci/if_nxe.c
1111
ctx->ctx_cmd_ring.r_addr =
sys/dev/pci/if_nxe.c
1113
ctx->ctx_cmd_ring.r_size = htole32(sc->sc_cmd_ring->nr_nentries);
sys/dev/pci/if_nxe.c
1121
ctx->ctx_status_ring_addr =
sys/dev/pci/if_nxe.c
1123
ctx->ctx_status_ring_size = htole32(sc->sc_status_ring->nr_nentries);
sys/dev/pci/if_nxe.c
1132
ring = &ctx->ctx_rx_rings[i];
sys/dev/pci/if_oce.c
3324
union oce_mq_ext_ctx *ctx;
sys/dev/pci/if_oce.c
3336
ctx = &cmd.params.req.context;
sys/dev/pci/if_oce.c
3337
ctx->v0.num_pages = npages;
sys/dev/pci/if_oce.c
3338
ctx->v0.cq_id = mq->cq->id;
sys/dev/pci/if_oce.c
3339
ctx->v0.ring_size = ilog2(mq->nitems) + 1;
sys/dev/pci/if_oce.c
3340
ctx->v0.valid = 1;
sys/dev/pci/if_oce.c
3342
ctx->v0.async_evt_bitmap = 0xffffffff;
sys/dev/pci/if_oce.c
3369
cmd.params.req.ctx.num_pages = htole16(npages);
sys/dev/pci/if_oce.c
3370
cmd.params.req.ctx.valid = 1;
sys/dev/pci/if_oce.c
3371
cmd.params.req.ctx.size = (eq->isize == 4) ? 0 : 1;
sys/dev/pci/if_oce.c
3372
cmd.params.req.ctx.count = ilog2(eq->nitems / 256);
sys/dev/pci/if_oce.c
3373
cmd.params.req.ctx.armed = 0;
sys/dev/pci/if_oce.c
3374
cmd.params.req.ctx.delay_mult = htole32(eq->delay);
sys/dev/pci/if_oce.c
3390
union oce_cq_ctx *ctx;
sys/dev/pci/if_oce.c
3402
ctx = &cmd.params.req.cq_ctx;
sys/dev/pci/if_oce.c
3405
ctx->v2.num_pages = htole16(npages);
sys/dev/pci/if_oce.c
3406
ctx->v2.page_size = 1; /* for 4K */
sys/dev/pci/if_oce.c
3407
ctx->v2.eventable = cq->eventable;
sys/dev/pci/if_oce.c
3408
ctx->v2.valid = 1;
sys/dev/pci/if_oce.c
3409
ctx->v2.count = ilog2(cq->nitems / 256);
sys/dev/pci/if_oce.c
3410
ctx->v2.nodelay = cq->nodelay;
sys/dev/pci/if_oce.c
3411
ctx->v2.coalesce_wm = cq->ncoalesce;
sys/dev/pci/if_oce.c
3412
ctx->v2.armed = 0;
sys/dev/pci/if_oce.c
3413
ctx->v2.eq_id = cq->eq->id;
sys/dev/pci/if_oce.c
3414
if (ctx->v2.count == 3) {
sys/dev/pci/if_oce.c
3416
ctx->v2.cqe_count = (4*1024)-1;
sys/dev/pci/if_oce.c
3418
ctx->v2.cqe_count = cq->nitems;
sys/dev/pci/if_oce.c
3421
ctx->v0.num_pages = htole16(npages);
sys/dev/pci/if_oce.c
3422
ctx->v0.eventable = cq->eventable;
sys/dev/pci/if_oce.c
3423
ctx->v0.valid = 1;
sys/dev/pci/if_oce.c
3424
ctx->v0.count = ilog2(cq->nitems / 256);
sys/dev/pci/if_oce.c
3425
ctx->v0.nodelay = cq->nodelay;
sys/dev/pci/if_oce.c
3426
ctx->v0.coalesce_wm = cq->ncoalesce;
sys/dev/pci/if_oce.c
3427
ctx->v0.armed = 0;
sys/dev/pci/if_oce.c
3428
ctx->v0.eq_id = cq->eq->id;
sys/dev/pci/if_ocereg.h
725
struct oce_eq_ctx ctx;
sys/dev/pci/mfii.c
1125
struct mfii_raid_context *ctx = (struct mfii_raid_context *)(io + 1);
sys/dev/pci/mfii.c
1126
struct mfii_sge *sge = (struct mfii_sge *)(ctx + 1);
sys/dev/pci/mfii.c
1830
struct mfii_raid_context *ctx = (struct mfii_raid_context *)(io + 1);
sys/dev/pci/mfii.c
1831
struct mfii_sge *sge = (struct mfii_sge *)(ctx + 1);
sys/dev/pci/mfii.c
2215
struct mfii_raid_context *ctx = (struct mfii_raid_context *)(io + 1);
sys/dev/pci/mfii.c
2221
switch (ctx->status) {
sys/dev/pci/mfii.c
2354
struct mfii_raid_context *ctx = (struct mfii_raid_context *)(io + 1);
sys/dev/pci/mfii.c
2362
io->sgl_offset0 = (sizeof(*io) + sizeof(*ctx)) / 4;
sys/dev/pci/mfii.c
2381
ctx->type_nseg = sc->sc_iop->ldio_ctx_type_nseg;
sys/dev/pci/mfii.c
2382
ctx->timeout_value = htole16(0x14); /* XXX */
sys/dev/pci/mfii.c
2383
ctx->reg_lock_flags = htole16(sc->sc_iop->ldio_ctx_reg_lock_flags);
sys/dev/pci/mfii.c
2384
ctx->virtual_disk_target_id = htole16(link->target);
sys/dev/pci/mfii.c
2386
if (mfii_load_ccb(sc, ccb, ctx + 1,
sys/dev/pci/mfii.c
2393
ctx->num_sge = segs;
sys/dev/pci/mfii.c
2397
ctx->span_arm = segs;
sys/dev/pci/mfii.c
2413
struct mfii_raid_context *ctx = (struct mfii_raid_context *)(io + 1);
sys/dev/pci/mfii.c
2420
io->sgl_offset0 = (sizeof(*io) + sizeof(*ctx)) / 4;
sys/dev/pci/mfii.c
2440
ctx->virtual_disk_target_id = htole16(link->target);
sys/dev/pci/mfii.c
2442
if (mfii_load_ccb(sc, ccb, ctx + 1,
sys/dev/pci/mfii.c
2446
ctx->num_sge = (ccb->ccb_len == 0) ? 0 : ccb->ccb_dmamap->dm_nsegs;
sys/dev/pci/mfii.c
2524
struct mfii_raid_context *ctx = (struct mfii_raid_context *)(io + 1);
sys/dev/pci/mfii.c
2536
io->sgl_offset0 = (sizeof(*io) + sizeof(*ctx)) / 4;
sys/dev/pci/mfii.c
2556
ctx->virtual_disk_target_id = htole16(link->target);
sys/dev/pci/mfii.c
2557
ctx->raid_flags = MFII_RAID_CTX_IO_TYPE_SYSPD;
sys/dev/pci/mfii.c
2558
ctx->timeout_value = sc->sc_pd->pd_timeout;
sys/dev/pci/mfii.c
2560
if (mfii_load_ccb(sc, ccb, ctx + 1,
sys/dev/pci/mfii.c
2564
ctx->num_sge = (ccb->ccb_len == 0) ? 0 : ccb->ccb_dmamap->dm_nsegs;
sys/dev/pci/sti_pci.c
221
struct sti_pcirom_walk_ctx ctx;
sys/dev/pci/sti_pci.c
249
ctx.sc = sc;
sys/dev/pci/sti_pci.c
251
ctx.romoffs = (bus_addr_t)-1;
sys/dev/pci/sti_pci.c
253
&ctx);
sys/dev/pci/sti_pci.c
255
if (ctx.romoffs == (bus_addr_t)-1) {
sys/dev/pci/sti_pci.c
268
offs = ctx.romoffs +
sys/dev/pci/sti_pci.c
269
(bus_addr_t)bus_space_read_2(pa->pa_memt, romh, ctx.romoffs + 0x0e);
sys/dev/pci/sti_pci.c
292
offs = ctx.romoffs +
sys/dev/pci/sti_pci.c
293
(bus_addr_t)bus_space_read_4(pa->pa_memt, romh, ctx.romoffs + 0x08);
sys/dev/pci/sti_pci.c
319
(offs - ctx.romoffs);
sys/dev/pci/sti_pci.c
378
struct sti_pcirom_walk_ctx *ctx = v;
sys/dev/pci/sti_pci.c
380
struct sti_softc *sc = ctx->sc;
sys/dev/pci/sti_pci.c
422
if (ctx->romoffs == (bus_addr_t)-1)
sys/dev/pci/sti_pci.c
423
ctx->romoffs = offs;
sys/dev/pci/sti_pci.c
428
if (ctx->romoffs == (bus_addr_t)-1)
sys/dev/pci/sti_pci.c
429
ctx->romoffs = offs;
sys/dev/pci/sti_pci.c
440
if (ctx->romoffs == offs)
sys/dev/pci/vmwpvs.c
1015
u_int64_t ctx = c->context;
sys/dev/pci/vmwpvs.c
1016
struct vmwpvs_ccb *ccb = &sc->sc_ccbs[ctx & 0xffffffff];
sys/dev/rasops/rasops.c
1889
struct rasops_list_font_ctx *ctx = cbarg;
sys/dev/rasops/rasops.c
1891
if (ctx->cnt-- == 0) {
sys/dev/rasops/rasops.c
1892
ctx->font = font;
sys/dev/rasops/rasops.c
1903
struct rasops_list_font_ctx ctx;
sys/dev/rasops/rasops.c
1912
ctx.ri = ri;
sys/dev/rasops/rasops.c
1913
ctx.cnt = font->index;
sys/dev/rasops/rasops.c
1914
ctx.font = NULL;
sys/dev/rasops/rasops.c
1915
wsfont_enum(rasops_list_font_cb, &ctx);
sys/dev/rasops/rasops.c
1917
if (ctx.font == NULL)
sys/dev/rasops/rasops.c
1921
*font = *ctx.font; /* struct copy */
sys/dev/rnd.c
553
chacha_ctx *ctx = malloc(sizeof(chacha_ctx), M_TEMP, M_WAITOK);
sys/dev/rnd.c
555
chacha_keysetup(ctx, keybuf, KEYSZ * 8);
sys/dev/rnd.c
556
chacha_ivsetup(ctx, keybuf + KEYSZ, NULL);
sys/dev/rnd.c
558
return (struct arc4random_ctx *)ctx;
sys/dev/rnd.c
565
arc4random_ctx_free(struct arc4random_ctx *ctx)
sys/dev/rnd.c
567
explicit_bzero(ctx, sizeof(chacha_ctx));
sys/dev/rnd.c
568
free(ctx, M_TEMP, sizeof(chacha_ctx));
sys/dev/rnd.c
575
arc4random_ctx_buf(struct arc4random_ctx *ctx, void *buf, size_t n)
sys/dev/rnd.c
580
chacha_encrypt_bytes((chacha_ctx *)ctx, buf, buf, n);
sys/dev/softraid.c
4455
MD5_CTX ctx;
sys/dev/softraid.c
4460
MD5Init(&ctx);
sys/dev/softraid.c
4461
MD5Update(&ctx, src, len);
sys/dev/softraid.c
4462
MD5Final(md5, &ctx);
sys/dev/softraid.c
5093
struct aes_xts_ctx ctx;
sys/dev/softraid.c
5183
bzero(&ctx, sizeof(ctx));
sys/dev/softraid.c
5190
aes_xts_setkey(&ctx, my->srd->mds.mdd_crypto.scr_key[0], 64);
sys/dev/softraid.c
5196
aes_xts_reinit(&ctx, iv);
sys/dev/softraid.c
5200
aes_xts_encrypt(&ctx, my->buf + j);
sys/dev/softraid_crypto.c
392
rijndael_ctx ctx;
sys/dev/softraid_crypto.c
397
if (rijndael_set_key_enc_only(&ctx, key, 256) != 0)
sys/dev/softraid_crypto.c
400
rijndael_encrypt(&ctx, &p[i], &c[i]);
sys/dev/softraid_crypto.c
411
explicit_bzero(&ctx, sizeof(ctx));
sys/dev/softraid_crypto.c
418
rijndael_ctx ctx;
sys/dev/softraid_crypto.c
423
if (rijndael_set_key(&ctx, key, 256) != 0)
sys/dev/softraid_crypto.c
426
rijndael_decrypt(&ctx, &c[i], &p[i]);
sys/dev/softraid_crypto.c
437
explicit_bzero(&ctx, sizeof(ctx));
sys/isofs/cd9660/cd9660_node.c
86
SIPHASH_CTX ctx;
sys/isofs/cd9660/cd9660_node.c
88
SipHash24_Init(&ctx, &isohashkey);
sys/isofs/cd9660/cd9660_node.c
89
SipHash24_Update(&ctx, &device, sizeof(device));
sys/isofs/cd9660/cd9660_node.c
90
SipHash24_Update(&ctx, &inum, sizeof(inum));
sys/isofs/cd9660/cd9660_node.c
91
return (SipHash24_End(&ctx) & isohash);
sys/kern/exec_subr.c
325
struct arc4random_ctx *ctx;
sys/kern/exec_subr.c
341
ctx = arc4random_ctx_new();
sys/kern/exec_subr.c
344
arc4random_ctx_buf(ctx, buf, sublen);
sys/kern/exec_subr.c
352
arc4random_ctx_free(ctx);
sys/kern/kern_sig.c
2095
struct sigctx ctx;
sys/kern/kern_sig.c
2120
si.si_signo = cursig(p, &ctx, 0);
sys/kern/kern_sig.c
2190
struct sigctx ctx;
sys/kern/kern_sig.c
2207
while ((signum = cursig(p, &ctx, 0)) != 0)
sys/kern/kern_sig.c
2208
postsig(p, signum, &ctx);
sys/kern/kern_sig.c
2221
while ((signum = cursig(p, &ctx, 0)) != 0)
sys/kern/kern_sig.c
2222
postsig(p, signum, &ctx);
sys/kern/kern_sig.c
792
struct sigctx ctx;
sys/kern/kern_sig.c
809
setsigctx(p, signum, &ctx);
sys/kern/kern_sig.c
810
if ((pr->ps_flags & PS_TRACED) == 0 && ctx.sig_catch != 0 &&
sys/kern/kern_sig.c
817
ktrpsig(p, signum, ctx.sig_action,
sys/kern/kern_sig.c
821
if (sendsig(ctx.sig_action, signum, p->p_sigmask, &si,
sys/kern/kern_sig.c
822
ctx.sig_info, ctx.sig_onstack)) {
sys/kern/kern_sig.c
827
postsig_done(p, signum, ctx.sig_catchmask, ctx.sig_reset);
sys/kern/kern_sig.c
844
setsigctx(p, signum, &ctx);
sys/kern/kern_sig.c
870
((p->p_sigmask & mask) || ctx.sig_ignore) &&
sys/kern/kern_srp.c
142
struct srp_gc_ctx *ctx;
sys/kern/kern_srp.c
152
ctx = pool_get(&srp_gc_ctx_pool, PR_WAITOK);
sys/kern/kern_srp.c
153
ctx->srp_gc = srp_gc;
sys/kern/kern_srp.c
154
ctx->hzrd.sh_p = srp;
sys/kern/kern_srp.c
155
ctx->hzrd.sh_v = v;
sys/kern/kern_srp.c
157
timeout_set(&ctx->tick, srp_v_gc, ctx);
sys/kern/kern_srp.c
158
timeout_add(&ctx->tick, 1);
sys/kern/kern_srp.c
164
struct srp_gc_ctx *ctx = x;
sys/kern/kern_srp.c
166
if (srp_v_referenced(ctx->hzrd.sh_p, ctx->hzrd.sh_v)) {
sys/kern/kern_srp.c
168
timeout_add(&ctx->tick, 1);
sys/kern/kern_srp.c
172
srp_v_dtor(ctx->srp_gc, ctx->hzrd.sh_v);
sys/kern/kern_srp.c
173
pool_put(&srp_gc_ctx_pool, ctx);
sys/kern/kern_synch.c
448
struct sigctx ctx;
sys/kern/kern_synch.c
467
if ((sig = cursig(p, &ctx, 1)) != 0) {
sys/kern/kern_synch.c
468
if (ctx.sig_stop) {
sys/kern/kern_synch.c
490
} else if (ctx.sig_intr && !ctx.sig_ignore)
sys/kern/subr_hibernate.c
561
SHA2_CTX ctx;
sys/kern/subr_hibernate.c
602
SHA256Init(&ctx);
sys/kern/subr_hibernate.c
603
SHA256Update(&ctx, version, strlen(version));
sys/kern/subr_hibernate.c
605
SHA256Update(&ctx, &fn, sizeof(fn));
sys/kern/subr_hibernate.c
607
SHA256Update(&ctx, &fn, sizeof(fn));
sys/kern/subr_hibernate.c
609
SHA256Update(&ctx, &fn, sizeof(fn));
sys/kern/subr_hibernate.c
611
SHA256Update(&ctx, &fn, sizeof(fn));
sys/kern/subr_hibernate.c
612
SHA256Final((u_int8_t *)&hib->kern_hash, &ctx);
sys/lib/libsa/aes_xts.c
101
explicit_bzero(ctx, sizeof(struct aes_xts_ctx));
sys/lib/libsa/aes_xts.c
26
aes_xts_reinit(struct aes_xts_ctx *ctx, u_int8_t *iv)
sys/lib/libsa/aes_xts.c
37
ctx->tweak[i] = blocknum & 0xff;
sys/lib/libsa/aes_xts.c
41
bzero(ctx->tweak + AES_XTS_IVSIZE, AES_XTS_IVSIZE);
sys/lib/libsa/aes_xts.c
43
rijndael_encrypt(&ctx->key2, ctx->tweak, ctx->tweak);
sys/lib/libsa/aes_xts.c
47
aes_xts_crypt(struct aes_xts_ctx *ctx, u_int8_t *data, u_int do_encrypt)
sys/lib/libsa/aes_xts.c
53
block[i] = data[i] ^ ctx->tweak[i];
sys/lib/libsa/aes_xts.c
56
rijndael_encrypt(&ctx->key1, block, data);
sys/lib/libsa/aes_xts.c
58
rijndael_decrypt(&ctx->key1, block, data);
sys/lib/libsa/aes_xts.c
61
data[i] ^= ctx->tweak[i];
sys/lib/libsa/aes_xts.c
66
carry_out = ctx->tweak[i] & 0x80;
sys/lib/libsa/aes_xts.c
67
ctx->tweak[i] = (ctx->tweak[i] << 1) | carry_in;
sys/lib/libsa/aes_xts.c
70
ctx->tweak[0] ^= (AES_XTS_ALPHA & -carry_in);
sys/lib/libsa/aes_xts.c
75
aes_xts_encrypt(struct aes_xts_ctx *ctx, u_int8_t *data)
sys/lib/libsa/aes_xts.c
77
aes_xts_crypt(ctx, data, 1);
sys/lib/libsa/aes_xts.c
81
aes_xts_decrypt(struct aes_xts_ctx *ctx, u_int8_t *data)
sys/lib/libsa/aes_xts.c
83
aes_xts_crypt(ctx, data, 0);
sys/lib/libsa/aes_xts.c
87
aes_xts_setkey(struct aes_xts_ctx *ctx, u_int8_t *key, int len)
sys/lib/libsa/aes_xts.c
92
rijndael_set_key(&ctx->key1, key, len * 4);
sys/lib/libsa/aes_xts.c
93
rijndael_set_key(&ctx->key2, key + (len / 2), len * 4);
sys/lib/libsa/aes_xts.c
99
aes_xts_zerokey(struct aes_xts_ctx *ctx)
sys/lib/libsa/arc4.c
24
u_int8_t t = ctx->state[x]; \
sys/lib/libsa/arc4.c
25
ctx->state[x] = ctx->state[y]; \
sys/lib/libsa/arc4.c
26
ctx->state[y] = t; \
sys/lib/libsa/arc4.c
30
rc4_keysetup(struct rc4_ctx *ctx, u_char *key, u_int32_t klen)
sys/lib/libsa/arc4.c
37
ctx->state[i] = i;
sys/lib/libsa/arc4.c
39
y = (key[x] + ctx->state[i] + y) & (RC4STATE - 1);
sys/lib/libsa/arc4.c
43
ctx->x = ctx->y = 0;
sys/lib/libsa/arc4.c
48
rc4_crypt(struct rc4_ctx *ctx, u_char *src, u_char *dst,
sys/lib/libsa/arc4.c
54
ctx->x = (ctx->x + 1) & (RC4STATE - 1);
sys/lib/libsa/arc4.c
55
ctx->y = (ctx->state[ctx->x] + ctx->y) & (RC4STATE - 1);
sys/lib/libsa/arc4.c
56
RC4SWAP(ctx->x, ctx->y);
sys/lib/libsa/arc4.c
57
dst[i] = src[i] ^ ctx->state[
sys/lib/libsa/arc4.c
58
(ctx->state[ctx->x] + ctx->state[ctx->y]) & (RC4STATE - 1)];
sys/lib/libsa/arc4.c
64
rc4_getbytes(struct rc4_ctx *ctx, u_char *dst, u_int32_t len)
sys/lib/libsa/arc4.c
69
ctx->x = (ctx->x + 1) & (RC4STATE - 1);
sys/lib/libsa/arc4.c
70
ctx->y = (ctx->state[ctx->x] + ctx->y) & (RC4STATE - 1);
sys/lib/libsa/arc4.c
71
RC4SWAP(ctx->x, ctx->y);
sys/lib/libsa/arc4.c
72
dst[i] = ctx->state[
sys/lib/libsa/arc4.c
73
(ctx->state[ctx->x] + ctx->state[ctx->y]) & (RC4STATE - 1)];
sys/lib/libsa/arc4.c
78
rc4_skip(struct rc4_ctx *ctx, u_int32_t len)
sys/lib/libsa/arc4.c
81
ctx->x = (ctx->x + 1) & (RC4STATE - 1);
sys/lib/libsa/arc4.c
82
ctx->y = (ctx->state[ctx->x] + ctx->y) & (RC4STATE - 1);
sys/lib/libsa/arc4.c
83
RC4SWAP(ctx->x, ctx->y);
sys/lib/libsa/bcrypt_pbkdf.c
119
SHA512Init(&ctx);
sys/lib/libsa/bcrypt_pbkdf.c
120
SHA512Update(&ctx, pass, passlen);
sys/lib/libsa/bcrypt_pbkdf.c
121
SHA512Final(sha2pass, &ctx);
sys/lib/libsa/bcrypt_pbkdf.c
132
SHA512Init(&ctx);
sys/lib/libsa/bcrypt_pbkdf.c
133
SHA512Update(&ctx, salt, saltlen);
sys/lib/libsa/bcrypt_pbkdf.c
134
SHA512Update(&ctx, countsalt, sizeof(countsalt));
sys/lib/libsa/bcrypt_pbkdf.c
135
SHA512Final(sha2salt, &ctx);
sys/lib/libsa/bcrypt_pbkdf.c
141
SHA512Init(&ctx);
sys/lib/libsa/bcrypt_pbkdf.c
142
SHA512Update(&ctx, tmpout, sizeof(tmpout));
sys/lib/libsa/bcrypt_pbkdf.c
143
SHA512Final(sha2salt, &ctx);
sys/lib/libsa/bcrypt_pbkdf.c
163
explicit_bzero(&ctx, sizeof(ctx));
sys/lib/libsa/bcrypt_pbkdf.c
99
SHA2_CTX ctx;
sys/lib/libsa/hmac_sha1.c
32
SHA1_CTX ctx;
sys/lib/libsa/hmac_sha1.c
38
SHA1Init(&ctx);
sys/lib/libsa/hmac_sha1.c
39
SHA1Update(&ctx, key, key_len);
sys/lib/libsa/hmac_sha1.c
40
SHA1Final(tk, &ctx);
sys/lib/libsa/hmac_sha1.c
51
SHA1Init(&ctx);
sys/lib/libsa/hmac_sha1.c
52
SHA1Update(&ctx, k_pad, SHA1_BLOCK_LENGTH);
sys/lib/libsa/hmac_sha1.c
53
SHA1Update(&ctx, text, text_len);
sys/lib/libsa/hmac_sha1.c
54
SHA1Final(digest, &ctx);
sys/lib/libsa/hmac_sha1.c
61
SHA1Init(&ctx);
sys/lib/libsa/hmac_sha1.c
62
SHA1Update(&ctx, k_pad, SHA1_BLOCK_LENGTH);
sys/lib/libsa/hmac_sha1.c
63
SHA1Update(&ctx, digest, SHA1_DIGEST_LENGTH);
sys/lib/libsa/hmac_sha1.c
64
SHA1Final(digest, &ctx);
sys/lib/libsa/rijndael.c
1223
rijndael_set_key_enc_only(rijndael_ctx *ctx, const u_char *key, int bits)
sys/lib/libsa/rijndael.c
1227
rounds = rijndaelKeySetupEnc(ctx->ek, key, bits);
sys/lib/libsa/rijndael.c
1231
ctx->Nr = rounds;
sys/lib/libsa/rijndael.c
1232
ctx->enc_only = 1;
sys/lib/libsa/rijndael.c
1239
rijndael_set_key(rijndael_ctx *ctx, const u_char *key, int bits)
sys/lib/libsa/rijndael.c
1243
rounds = rijndaelKeySetupEnc(ctx->ek, key, bits);
sys/lib/libsa/rijndael.c
1246
if (rijndaelKeySetupDec(ctx->dk, key, bits) != rounds)
sys/lib/libsa/rijndael.c
1249
ctx->Nr = rounds;
sys/lib/libsa/rijndael.c
1250
ctx->enc_only = 0;
sys/lib/libsa/rijndael.c
1256
rijndael_decrypt(rijndael_ctx *ctx, const u_char *src, u_char *dst)
sys/lib/libsa/rijndael.c
1258
rijndaelDecrypt(ctx->dk, ctx->Nr, src, dst);
sys/lib/libsa/rijndael.c
1262
rijndael_encrypt(rijndael_ctx *ctx, const u_char *src, u_char *dst)
sys/lib/libsa/rijndael.c
1264
rijndaelEncrypt(ctx->ek, ctx->Nr, src, dst);
sys/lib/libsa/softraid.c
115
rijndael_ctx ctx;
sys/lib/libsa/softraid.c
120
if (rijndael_set_key(&ctx, kdfinfo->maskkey, 256) != 0)
sys/lib/libsa/softraid.c
125
rijndael_decrypt(&ctx, (u_char *)(cp + i), (u_char *)(kp + i));
sys/miscfs/fuse/fuse_ihash.c
58
SIPHASH_CTX ctx;
sys/miscfs/fuse/fuse_ihash.c
60
SipHash24_Init(&ctx, &fuse_ihashkey);
sys/miscfs/fuse/fuse_ihash.c
61
SipHash24_Update(&ctx, &dev, sizeof(dev));
sys/miscfs/fuse/fuse_ihash.c
62
SipHash24_Update(&ctx, &inum, sizeof(inum));
sys/miscfs/fuse/fuse_ihash.c
64
return (&fuse_ihashtbl[SipHash24_End(&ctx) & fuse_ihashsz]);
sys/msdosfs/msdosfs_denode.c
92
SIPHASH_CTX ctx;
sys/msdosfs/msdosfs_denode.c
94
SipHash24_Init(&ctx, &dehashkey);
sys/msdosfs/msdosfs_denode.c
95
SipHash24_Update(&ctx, &dev, sizeof(dev));
sys/msdosfs/msdosfs_denode.c
96
SipHash24_Update(&ctx, &dirclust, sizeof(dirclust));
sys/msdosfs/msdosfs_denode.c
97
SipHash24_Update(&ctx, &diroff, sizeof(diroff));
sys/msdosfs/msdosfs_denode.c
99
return (SipHash24_End(&ctx) & dehash);
sys/net/if_gre.c
1516
SIPHASH_CTX ctx;
sys/net/if_gre.c
1544
SipHash24_Init(&ctx, &sc->sc_ka_key);
sys/net/if_gre.c
1545
SipHash24_Update(&ctx, &gk->gk_uptime, sizeof(gk->gk_uptime));
sys/net/if_gre.c
1546
SipHash24_Update(&ctx, &gk->gk_random, sizeof(gk->gk_random));
sys/net/if_gre.c
1547
SipHash24_Final(digest, &ctx);
sys/net/if_gre.c
3044
SIPHASH_CTX ctx;
sys/net/if_gre.c
3095
SipHash24_Init(&ctx, &sc->sc_ka_key);
sys/net/if_gre.c
3096
SipHash24_Update(&ctx, &gk->gk_uptime, sizeof(gk->gk_uptime));
sys/net/if_gre.c
3097
SipHash24_Update(&ctx, &gk->gk_random, sizeof(gk->gk_random));
sys/net/if_gre.c
3098
SipHash24_Final(gk->gk_digest, &ctx);
sys/net/if_spppsubr.c
3378
MD5_CTX ctx;
sys/net/if_spppsubr.c
3427
MD5Init(&ctx);
sys/net/if_spppsubr.c
3428
MD5Update(&ctx, &h->ident, 1);
sys/net/if_spppsubr.c
3429
MD5Update(&ctx, sp->myauth.secret, strlen(sp->myauth.secret));
sys/net/if_spppsubr.c
3430
MD5Update(&ctx, value, value_len);
sys/net/if_spppsubr.c
3431
MD5Final(digest, &ctx);
sys/net/if_spppsubr.c
3545
MD5Init(&ctx);
sys/net/if_spppsubr.c
3546
MD5Update(&ctx, &h->ident, 1);
sys/net/if_spppsubr.c
3547
MD5Update(&ctx, sp->hisauth.secret, strlen(sp->hisauth.secret));
sys/net/if_spppsubr.c
3548
MD5Update(&ctx, sp->chap_challenge, AUTHCHALEN);
sys/net/if_spppsubr.c
3549
MD5Final(digest, &ctx);
sys/net/if_trunk.c
1005
SipHash24_Update(&ctx, &eh->ether_shost, ETHER_ADDR_LEN);
sys/net/if_trunk.c
1006
SipHash24_Update(&ctx, &eh->ether_dhost, ETHER_ADDR_LEN);
sys/net/if_trunk.c
1011
SipHash24_Update(&ctx, ðer_vtag, sizeof(ether_vtag));
sys/net/if_trunk.c
1017
SipHash24_Update(&ctx, ðer_vtag, sizeof(ether_vtag));
sys/net/if_trunk.c
1027
SipHash24_Update(&ctx, &ip->ip_src, sizeof(struct in_addr));
sys/net/if_trunk.c
1028
SipHash24_Update(&ctx, &ip->ip_dst, sizeof(struct in_addr));
sys/net/if_trunk.c
1035
SipHash24_Update(&ctx, &ip6->ip6_src, sizeof(struct in6_addr));
sys/net/if_trunk.c
1036
SipHash24_Update(&ctx, &ip6->ip6_dst, sizeof(struct in6_addr));
sys/net/if_trunk.c
1038
SipHash24_Update(&ctx, &flow, sizeof(flow)); /* IPv6 flow label */
sys/net/if_trunk.c
1044
return SipHash24_End(&ctx);
sys/net/if_trunk.c
994
SIPHASH_CTX ctx;
sys/net/if_trunk.c
999
SipHash24_Init(&ctx, key);
sys/net/if_veb.c
1001
vid = ctx->vp;
sys/net/if_veb.c
1007
vid = ctx->vs;
sys/net/if_veb.c
1016
ctx->src, ctx->dst, vid)) {
sys/net/if_veb.c
1042
(*tp->p_enqueue)(ifp0, m, ctx->ns); /* XXX count error */
sys/net/if_veb.c
1051
veb_transmit(struct veb_softc *sc, struct veb_ctx *ctx, struct mbuf *m,
sys/net/if_veb.c
1065
if (ctx->p == tp) {
sys/net/if_veb.c
1069
if (ctx->p->p_protected & tp->p_protected) {
sys/net/if_veb.c
1074
if (veb_pvlan_filter(sc, ctx, tvs)) {
sys/net/if_veb.c
1087
if (tvs != ctx->vp) {
sys/net/if_veb.c
1096
vid = ctx->vs;
sys/net/if_veb.c
1106
ctx->src, ctx->dst, vid)) {
sys/net/if_veb.c
1124
(m = veb_pf(ifp0, PF_FWD, m, ctx->ns)) == NULL)
sys/net/if_veb.c
1140
(*tp->p_enqueue)(ifp0, m, ctx->ns); /* XXX count error */
sys/net/if_veb.c
1185
struct veb_ctx ctx = {
sys/net/if_veb.c
1259
ctx.vs = tvid;
sys/net/if_veb.c
1280
if (ctx.vs == IFBR_PVID_DECLINE)
sys/net/if_veb.c
1282
if (ctx.vs == IFBR_PVID_NONE) {
sys/net/if_veb.c
1288
if (ctx.vs < IFBR_PVID_MIN ||
sys/net/if_veb.c
1289
ctx.vs > IFBR_PVID_MAX) {
sys/net/if_veb.c
1291
ifp0->if_xname, ctx.vs);
sys/net/if_veb.c
1296
pvlan = veb_pvlan(sc, ctx.vs);
sys/net/if_veb.c
1299
ctx.vp = pvlan & VEB_PVLAN_V_MASK;
sys/net/if_veb.c
1300
ctx.vt = pvlan & VEB_PVLAN_T_MASK;
sys/net/if_veb.c
1301
ctx.src = ether_addr_to_e64((struct ether_addr *)eh->ether_shost);
sys/net/if_veb.c
1307
ctx.vt != VEB_PVLAN_T_PRIMARY) {
sys/net/if_veb.c
1317
ebe = etherbridge_resolve_entry(&sc->sc_eb, ctx.vp, ctx.src);
sys/net/if_veb.c
1318
if (ebe != NULL && ctx.vs == etherbridge_vs(ebe))
sys/net/if_veb.c
1333
m->m_pkthdr.ether_vtag |= ctx.vs;
sys/net/if_veb.c
1364
ctx.src, ctx.dst, ctx.vs)) {
sys/net/if_veb.c
1370
if (ISSET(ifp->if_flags, IFF_LINK1) && p->p_pvid == ctx.vs &&
sys/net/if_veb.c
1371
(m = veb_pf(ifp0, PF_IN, m, ctx.ns)) == NULL)
sys/net/if_veb.c
1378
etherbridge_map(&sc->sc_eb, ctx.p, ctx.vp, ctx.vs, ctx.src);
sys/net/if_veb.c
1389
if (!ETH64_IS_MULTICAST(ctx.dst)) {
sys/net/if_veb.c
1396
ebe = etherbridge_resolve_entry(&sc->sc_eb, ctx.vp, ctx.dst);
sys/net/if_veb.c
1404
m = veb_transmit(sc, &ctx, m, tp, tvs);
sys/net/if_veb.c
1414
ETH64_IS_BROADCAST(ctx.dst) ? M_BCAST : M_MCAST);
sys/net/if_veb.c
1417
veb_broadcast(sc, &ctx, m);
sys/net/if_veb.c
876
veb_pvlan_filter(struct veb_softc *sc, const struct veb_ctx *ctx, uint16_t vs)
sys/net/if_veb.c
885
if (ctx->vp != (pvlan & VEB_PVLAN_V_MASK))
sys/net/if_veb.c
888
switch (ctx->vt) {
sys/net/if_veb.c
895
if (ctx->vs == vs)
sys/net/if_veb.c
901
if (ctx->vp == vs)
sys/net/if_veb.c
930
veb_broadcast(struct veb_softc *sc, struct veb_ctx *ctx, struct mbuf *m0)
sys/net/if_veb.c
939
if (ctx->p->p_pvid == ctx->vs) { /* XXX which vlan is the right one? */
sys/net/if_veb.c
947
(m0 = veb_pf(ifp, PF_FWD, m0, ctx->ns)) == NULL)
sys/net/if_veb.c
969
if (ctx->p == tp || (ctx->p->p_protected & tp->p_protected)) {
sys/net/if_veb.c
994
veb_pvlan_filter(sc, ctx, pvid)) {
sys/net/pf.c
4380
SHA2_CTX ctx;
sys/net/pf.c
4393
ctx = pf_tcp_secret_ctx;
sys/net/pf.c
4395
SHA512Update(&ctx, &pd->rdomain, sizeof(pd->rdomain));
sys/net/pf.c
4396
SHA512Update(&ctx, &pd->hdr.tcp.th_sport, sizeof(u_short));
sys/net/pf.c
4397
SHA512Update(&ctx, &pd->hdr.tcp.th_dport, sizeof(u_short));
sys/net/pf.c
4400
SHA512Update(&ctx, &pd->src->v4, sizeof(struct in_addr));
sys/net/pf.c
4401
SHA512Update(&ctx, &pd->dst->v4, sizeof(struct in_addr));
sys/net/pf.c
4405
SHA512Update(&ctx, &pd->src->v6, sizeof(struct in6_addr));
sys/net/pf.c
4406
SHA512Update(&ctx, &pd->dst->v6, sizeof(struct in6_addr));
sys/net/pf.c
4410
SHA512Final(digest.bytes, &ctx);
sys/net/pf.c
4451
pf_match_rule(struct pf_test_ctx *ctx, struct pf_ruleset *ruleset)
sys/net/pf.c
4470
(pfi_kif_match(r->kif, ctx->pd->kif) == r->ifnot),
sys/net/pf.c
4472
PF_TEST_ATTRIB((r->direction && r->direction != ctx->pd->dir),
sys/net/pf.c
4475
(r->onrdomain == ctx->pd->rdomain) == r->ifnot),
sys/net/pf.c
4477
PF_TEST_ATTRIB((r->af && r->af != ctx->pd->af),
sys/net/pf.c
4479
PF_TEST_ATTRIB((r->proto && r->proto != ctx->pd->proto),
sys/net/pf.c
4481
PF_TEST_ATTRIB((PF_MISMATCHAW(&r->src.addr, &ctx->pd->nsaddr,
sys/net/pf.c
4482
ctx->pd->naf, r->src.neg, ctx->pd->kif,
sys/net/pf.c
4483
ctx->act.rtableid)),
sys/net/pf.c
4485
PF_TEST_ATTRIB((PF_MISMATCHAW(&r->dst.addr, &ctx->pd->ndaddr,
sys/net/pf.c
4486
ctx->pd->af, r->dst.neg, NULL, ctx->act.rtableid)),
sys/net/pf.c
4489
switch (ctx->pd->virtual_proto) {
sys/net/pf.c
4494
PF_TEST_ATTRIB((ctx->pd->proto == IPPROTO_TCP &&
sys/net/pf.c
4506
PF_TEST_ATTRIB(((r->flagset & ctx->th->th_flags) !=
sys/net/pf.c
4510
!pf_osfp_match(pf_osfp_fingerprint(ctx->pd),
sys/net/pf.c
4519
r->src.port[1], ctx->pd->nsport)),
sys/net/pf.c
4523
r->dst.port[1], ctx->pd->ndport)),
sys/net/pf.c
4526
PF_TEST_ATTRIB((r->uid.op && (ctx->pd->lookup.done ||
sys/net/pf.c
4527
(ctx->pd->lookup.done =
sys/net/pf.c
4528
pf_socket_lookup(ctx->pd), 1)) &&
sys/net/pf.c
4530
r->uid.uid[1], ctx->pd->lookup.uid)),
sys/net/pf.c
4533
PF_TEST_ATTRIB((r->gid.op && (ctx->pd->lookup.done ||
sys/net/pf.c
4534
(ctx->pd->lookup.done =
sys/net/pf.c
4535
pf_socket_lookup(ctx->pd), 1)) &&
sys/net/pf.c
4537
r->gid.gid[1], ctx->pd->lookup.gid)),
sys/net/pf.c
4544
r->type != ctx->icmptype + 1),
sys/net/pf.c
4548
r->code != ctx->icmpcode + 1),
sys/net/pf.c
4551
PF_TEST_ATTRIB((r->keep_state && !ctx->state_icmp &&
sys/net/pf.c
4553
ctx->icmp_dir != PF_IN),
sys/net/pf.c
4560
r->type != ctx->icmptype + 1),
sys/net/pf.c
4564
r->code != ctx->icmpcode + 1),
sys/net/pf.c
4567
PF_TEST_ATTRIB((r->keep_state && !ctx->state_icmp &&
sys/net/pf.c
4569
ctx->icmp_dir != PF_IN &&
sys/net/pf.c
4570
ctx->icmptype != ND_NEIGHBOR_ADVERT),
sys/net/pf.c
4579
ctx->pd->virtual_proto != PF_VPROTO_FRAGMENT),
sys/net/pf.c
4581
PF_TEST_ATTRIB((r->tos && !(r->tos == ctx->pd->tos)),
sys/net/pf.c
4587
!pf_match_tag(ctx->pd->m, r, &ctx->tag)),
sys/net/pf.c
4589
PF_TEST_ATTRIB((r->rcv_kif && pf_match_rcvif(ctx->pd->m, r) ==
sys/net/pf.c
4594
ctx->pd->m->m_pkthdr.pf.prio),
sys/net/pf.c
4617
ctx->limiter_drop = 1;
sys/net/pf.c
4618
REASON_SET(&ctx->reason, PFRES_MAXSTATES);
sys/net/pf.c
4639
ctx->limiter_drop = 1;
sys/net/pf.c
4640
REASON_SET(&ctx->reason,
sys/net/pf.c
4670
ctx->pd->af, ctx->pd->rdomain, ctx->pd->src);
sys/net/pf.c
4684
ctx->limiter_drop = 1;
sys/net/pf.c
4685
REASON_SET(&ctx->reason,
sys/net/pf.c
4708
ctx->limiter_drop = 1;
sys/net/pf.c
4709
REASON_SET(&ctx->reason,
sys/net/pf.c
4736
ctx->limiter_drop = 1;
sys/net/pf.c
4737
REASON_SET(&ctx->reason,
sys/net/pf.c
4757
ctx->tag = r->tag;
sys/net/pf.c
4775
if ((ctx->ri = pool_get(&pf_rule_item_pl,
sys/net/pf.c
4777
REASON_SET(&ctx->reason, PFRES_MEMORY);
sys/net/pf.c
4780
ctx->ri->r = r;
sys/net/pf.c
4782
SLIST_INSERT_HEAD(&ctx->rules, ctx->ri, entry);
sys/net/pf.c
4783
ctx->ri = NULL;
sys/net/pf.c
4784
pf_rule_to_actions(r, &ctx->act);
sys/net/pf.c
4786
ctx->pd->naf = r->naf;
sys/net/pf.c
4787
if (pf_get_transaddr(r, ctx->pd, ctx->sns,
sys/net/pf.c
4788
&ctx->nr) == -1) {
sys/net/pf.c
4789
REASON_SET(&ctx->reason,
sys/net/pf.c
4795
REASON_SET(&ctx->reason, PFRES_MATCH);
sys/net/pf.c
4796
pflog_packet(ctx->pd, ctx->reason, r,
sys/net/pf.c
4797
ctx->a, ruleset, NULL);
sys/net/pf.c
4804
*ctx->rm = r;
sys/net/pf.c
4808
*ctx->am = ctx->a;
sys/net/pf.c
4812
*ctx->rsm = ruleset;
sys/net/pf.c
4816
ctx->arsm = ctx->aruleset;
sys/net/pf.c
4821
ctx->statelim = stlim;
sys/net/pf.c
4822
ctx->sourcelim = srlim;
sys/net/pf.c
4823
ctx->source = sr;
sys/net/pf.c
4827
if (ctx->act.log & PF_LOG_MATCHES)
sys/net/pf.c
4828
pf_log_matches(ctx->pd, r, ctx->a, ruleset,
sys/net/pf.c
4829
&ctx->rules);
sys/net/pf.c
4835
ctx->aruleset = &r->anchor->ruleset;
sys/net/pf.c
4840
ctx->a, r, child,
sys/net/pf.c
4844
ctx->a = r;
sys/net/pf.c
4851
if (pf_anchor_stack_push(ruleset, ctx->a,
sys/net/pf.c
4855
ctx->a = r;
sys/net/pf.c
4866
if (pf_anchor_stack_pop(&ruleset, &ctx->a, &r, &child,
sys/net/pf.c
4870
if (r->quick && *ctx->am == r)
sys/net/pf.c
4897
struct pf_test_ctx ctx;
sys/net/pf.c
4902
memset(&ctx, 0, sizeof(ctx));
sys/net/pf.c
4903
ctx.pd = pd;
sys/net/pf.c
4904
ctx.rm = rm;
sys/net/pf.c
4905
ctx.am = am;
sys/net/pf.c
4906
ctx.rsm = rsm;
sys/net/pf.c
4907
ctx.th = &pd->hdr.tcp;
sys/net/pf.c
4908
ctx.act.rtableid = pd->rdomain;
sys/net/pf.c
4909
ctx.tag = -1;
sys/net/pf.c
4910
SLIST_INIT(&ctx.rules);
sys/net/pf.c
4913
REASON_SET(&ctx.reason, PFRES_CONGEST);
sys/net/pf.c
4919
ctx.icmptype = pd->hdr.icmp.icmp_type;
sys/net/pf.c
4920
ctx.icmpcode = pd->hdr.icmp.icmp_code;
sys/net/pf.c
4921
ctx.state_icmp = pf_icmp_mapping(pd, ctx.icmptype,
sys/net/pf.c
4922
&ctx.icmp_dir, &virtual_id, &virtual_type);
sys/net/pf.c
4923
if (ctx.icmp_dir == PF_IN) {
sys/net/pf.c
4933
ctx.icmptype = pd->hdr.icmp6.icmp6_type;
sys/net/pf.c
4934
ctx.icmpcode = pd->hdr.icmp6.icmp6_code;
sys/net/pf.c
4935
ctx.state_icmp = pf_icmp_mapping(pd, ctx.icmptype,
sys/net/pf.c
4936
&ctx.icmp_dir, &virtual_id, &virtual_type);
sys/net/pf.c
4937
if (ctx.icmp_dir == PF_IN) {
sys/net/pf.c
4949
rv = pf_match_rule(&ctx, ruleset);
sys/net/pf.c
4950
if (rv == PF_TEST_FAIL || ctx.limiter_drop == 1) {
sys/net/pf.c
4951
REASON_SET(reason, ctx.reason);
sys/net/pf.c
4955
r = *ctx.rm; /* matching rule */
sys/net/pf.c
4956
a = *ctx.am; /* rule that defines an anchor containing 'r' */
sys/net/pf.c
4957
ruleset = *ctx.rsm;/* ruleset of the anchor defined by the rule 'a' */
sys/net/pf.c
4958
ctx.aruleset = ctx.arsm;/* ruleset of the 'a' rule itself */
sys/net/pf.c
4961
pf_rule_to_actions(r, &ctx.act);
sys/net/pf.c
4964
if (pf_get_transaddr(r, pd, ctx.sns, &ctx.nr) == -1) {
sys/net/pf.c
4965
REASON_SET(&ctx.reason, PFRES_TRANSLATE);
sys/net/pf.c
4968
REASON_SET(&ctx.reason, PFRES_MATCH);
sys/net/pf.c
4972
pflog_packet(pd, ctx.reason, r, a, ruleset, NULL);
sys/net/pf.c
4973
if (ctx.act.log & PF_LOG_MATCHES)
sys/net/pf.c
4974
pf_log_matches(pd, r, a, ruleset, &ctx.rules);
sys/net/pf.c
4985
!(ctx.th->th_flags & TH_RST)) {
sys/net/pf.c
4987
ntohl(ctx.th->th_seq) + pd->p_len;
sys/net/pf.c
4991
REASON_SET(&ctx.reason, PFRES_PROTCKSUM);
sys/net/pf.c
4993
if (ctx.th->th_flags & TH_SYN)
sys/net/pf.c
4995
if (ctx.th->th_flags & TH_FIN)
sys/net/pf.c
4998
pd->src, ctx.th->th_dport,
sys/net/pf.c
4999
ctx.th->th_sport, ntohl(ctx.th->th_ack),
sys/net/pf.c
5001
1, 0, pd->rdomain, &ctx.reason);
sys/net/pf.c
5004
ICMP_INFOTYPE(ctx.icmptype)) && pd->af == AF_INET &&
sys/net/pf.c
5009
(ctx.icmptype >= ICMP6_ECHO_REQUEST &&
sys/net/pf.c
5010
ctx.icmptype != ND_REDIRECT)) && pd->af == AF_INET6 &&
sys/net/pf.c
5019
pf_tag_packet(pd->m, ctx.tag, ctx.act.rtableid);
sys/net/pf.c
5020
if (ctx.act.rtableid >= 0 &&
sys/net/pf.c
5021
rtable_l2(ctx.act.rtableid) != pd->rdomain)
sys/net/pf.c
5025
REASON_SET(&ctx.reason, PFRES_IPOPTIONS);
sys/net/pf.c
5035
&& !ctx.state_icmp && r->keep_state) {
sys/net/pf.c
5038
pf_insert_src_node(&ctx.sns[PF_SN_NONE], r, PF_SN_NONE,
sys/net/pf.c
5040
REASON_SET(&ctx.reason, PFRES_SRCLIMIT);
sys/net/pf.c
5046
REASON_SET(&ctx.reason, PFRES_MAXSTATES);
sys/net/pf.c
5050
action = pf_create_state(pd, r, a, ctx.nr, &skw, &sks,
sys/net/pf.c
5051
&rewrite, sm, ctx.tag, &ctx.rules, &ctx.act, ctx.sns,
sys/net/pf.c
5052
&ctx);
sys/net/pf.c
5059
action = pf_synproxy_ack(r, pd, sm, &ctx.act);
sys/net/pf.c
5076
virtual_type, ctx.icmp_dir);
sys/net/pf.c
5087
while ((ctx.ri = SLIST_FIRST(&ctx.rules))) {
sys/net/pf.c
5088
SLIST_REMOVE_HEAD(&ctx.rules, entry);
sys/net/pf.c
5089
pool_put(&pf_rule_item_pl, ctx.ri);
sys/net/pf.c
5115
while ((ctx.ri = SLIST_FIRST(&ctx.rules))) {
sys/net/pf.c
5116
SLIST_REMOVE_HEAD(&ctx.rules, entry);
sys/net/pf.c
5117
pool_put(&pf_rule_item_pl, ctx.ri);
sys/net/pf.c
5128
struct pf_test_ctx *ctx)
sys/net/pf.c
5278
stlim = ctx->statelim;
sys/net/pf.c
5304
srlim = ctx->sourcelim;
sys/net/pf.c
5308
sr = ctx->source;
sys/net/pf.c
5321
ctx->pd->af, ctx->pd->rdomain, ctx->pd->src);
sys/net/pf_ioctl.c
787
MD5Update(ctx, (u_int8_t *) &(st)->elm, sizeof((st)->elm))
sys/net/pf_ioctl.c
790
MD5Update(ctx, (u_int8_t *) (st)->elm, strlen((st)->elm))
sys/net/pf_ioctl.c
794
MD5Update(ctx, (u_int8_t *) &(stor), sizeof(u_int32_t));\
sys/net/pf_ioctl.c
799
MD5Update(ctx, (u_int8_t *) &(stor), sizeof(u_int16_t));\
sys/net/pf_ioctl.c
803
pf_hash_rule_addr(MD5_CTX *ctx, struct pf_rule_addr *pfr)
sys/net/pf_ioctl.c
833
pf_hash_rule(MD5_CTX *ctx, struct pf_rule *rule)
sys/net/pf_ioctl.c
838
pf_hash_rule_addr(ctx, &rule->src);
sys/net/pf_ioctl.c
839
pf_hash_rule_addr(ctx, &rule->dst);
sys/net/pf_ioctl.c
928
MD5_CTX ctx;
sys/net/pf_ioctl.c
932
MD5Init(&ctx);
sys/net/pf_ioctl.c
936
pf_hash_rule(&ctx, rule);
sys/net/pf_ioctl.c
940
MD5Final(digest, &ctx);
sys/net/pf_syncookies.c
284
SIPHASH_CTX ctx;
sys/net/pf_syncookies.c
289
SipHash24_Init(&ctx, &pf_syncookie_status.key[cookie.flags.oddeven]);
sys/net/pf_syncookies.c
293
SipHash24_Update(&ctx, pd->src, sizeof(pd->src->v4));
sys/net/pf_syncookies.c
294
SipHash24_Update(&ctx, pd->dst, sizeof(pd->dst->v4));
sys/net/pf_syncookies.c
297
SipHash24_Update(&ctx, pd->src, sizeof(pd->src->v6));
sys/net/pf_syncookies.c
298
SipHash24_Update(&ctx, pd->dst, sizeof(pd->dst->v6));
sys/net/pf_syncookies.c
304
SipHash24_Update(&ctx, pd->sport, sizeof(*pd->sport));
sys/net/pf_syncookies.c
305
SipHash24_Update(&ctx, pd->dport, sizeof(*pd->dport));
sys/net/pf_syncookies.c
306
SipHash24_Update(&ctx, &seq, sizeof(seq));
sys/net/pf_syncookies.c
307
SipHash24_Update(&ctx, &cookie, sizeof(cookie));
sys/net/pf_syncookies.c
308
SipHash24_Final((uint8_t *)&siphash, &ctx);
sys/net80211/ieee80211_crypto.c
330
HMAC_SHA1_CTX ctx;
sys/net80211/ieee80211_crypto.c
335
HMAC_SHA1_Init(&ctx, key, key_len);
sys/net80211/ieee80211_crypto.c
336
HMAC_SHA1_Update(&ctx, label, label_len);
sys/net80211/ieee80211_crypto.c
337
HMAC_SHA1_Update(&ctx, context, context_len);
sys/net80211/ieee80211_crypto.c
338
HMAC_SHA1_Update(&ctx, &count, 1);
sys/net80211/ieee80211_crypto.c
340
HMAC_SHA1_Final(digest, &ctx);
sys/net80211/ieee80211_crypto.c
345
HMAC_SHA1_Final(output, &ctx);
sys/net80211/ieee80211_crypto.c
359
HMAC_SHA256_CTX ctx;
sys/net80211/ieee80211_crypto.c
365
HMAC_SHA256_Init(&ctx, key, key_len);
sys/net80211/ieee80211_crypto.c
367
HMAC_SHA256_Update(&ctx, (u_int8_t *)&iter, sizeof iter);
sys/net80211/ieee80211_crypto.c
368
HMAC_SHA256_Update(&ctx, label, label_len);
sys/net80211/ieee80211_crypto.c
369
HMAC_SHA256_Update(&ctx, context, context_len);
sys/net80211/ieee80211_crypto.c
370
HMAC_SHA256_Update(&ctx, (u_int8_t *)&length, sizeof length);
sys/net80211/ieee80211_crypto.c
372
HMAC_SHA256_Final(digest, &ctx);
sys/net80211/ieee80211_crypto.c
377
HMAC_SHA256_Final(output, &ctx);
sys/net80211/ieee80211_crypto.c
421
HMAC_SHA1_CTX ctx;
sys/net80211/ieee80211_crypto.c
424
HMAC_SHA1_Init(&ctx, pmk, IEEE80211_PMK_LEN);
sys/net80211/ieee80211_crypto.c
425
HMAC_SHA1_Update(&ctx, "PMK Name", 8);
sys/net80211/ieee80211_crypto.c
426
HMAC_SHA1_Update(&ctx, aa, IEEE80211_ADDR_LEN);
sys/net80211/ieee80211_crypto.c
427
HMAC_SHA1_Update(&ctx, spa, IEEE80211_ADDR_LEN);
sys/net80211/ieee80211_crypto.c
428
HMAC_SHA1_Final(digest, &ctx);
sys/net80211/ieee80211_crypto.c
437
HMAC_SHA256_CTX ctx;
sys/net80211/ieee80211_crypto.c
440
HMAC_SHA256_Init(&ctx, pmk, IEEE80211_PMK_LEN);
sys/net80211/ieee80211_crypto.c
441
HMAC_SHA256_Update(&ctx, "PMK Name", 8);
sys/net80211/ieee80211_crypto.c
442
HMAC_SHA256_Update(&ctx, aa, IEEE80211_ADDR_LEN);
sys/net80211/ieee80211_crypto.c
443
HMAC_SHA256_Update(&ctx, spa, IEEE80211_ADDR_LEN);
sys/net80211/ieee80211_crypto.c
444
HMAC_SHA256_Final(digest, &ctx);
sys/net80211/ieee80211_crypto.c
477
ANY_CTX ctx; /* XXX off stack? */
sys/net80211/ieee80211_crypto.c
484
HMAC_MD5_Init(&ctx.md5, kck, 16);
sys/net80211/ieee80211_crypto.c
485
HMAC_MD5_Update(&ctx.md5, (u_int8_t *)key, len);
sys/net80211/ieee80211_crypto.c
486
HMAC_MD5_Final(key->mic, &ctx.md5);
sys/net80211/ieee80211_crypto.c
489
HMAC_SHA1_Init(&ctx.sha1, kck, 16);
sys/net80211/ieee80211_crypto.c
490
HMAC_SHA1_Update(&ctx.sha1, (u_int8_t *)key, len);
sys/net80211/ieee80211_crypto.c
491
HMAC_SHA1_Final(digest, &ctx.sha1);
sys/net80211/ieee80211_crypto.c
496
AES_CMAC_Init(&ctx.cmac);
sys/net80211/ieee80211_crypto.c
497
AES_CMAC_SetKey(&ctx.cmac, kck);
sys/net80211/ieee80211_crypto.c
498
AES_CMAC_Update(&ctx.cmac, (u_int8_t *)key, len);
sys/net80211/ieee80211_crypto.c
499
AES_CMAC_Final(key->mic, &ctx.cmac);
sys/net80211/ieee80211_crypto.c
534
} ctx; /* XXX off stack? */
sys/net80211/ieee80211_crypto.c
556
rc4_keysetup(&ctx.rc4, keybuf, sizeof keybuf);
sys/net80211/ieee80211_crypto.c
558
rc4_skip(&ctx.rc4, RC4STATE);
sys/net80211/ieee80211_crypto.c
559
rc4_crypt(&ctx.rc4, data, data, len);
sys/net80211/ieee80211_crypto.c
570
aes_key_wrap_set_key_wrap_only(&ctx.aes, kek, 16);
sys/net80211/ieee80211_crypto.c
571
aes_key_wrap(&ctx.aes, data, len / 8, data);
sys/net80211/ieee80211_crypto.c
594
} ctx; /* XXX off stack? */
sys/net80211/ieee80211_crypto.c
609
rc4_keysetup(&ctx.rc4, keybuf, sizeof keybuf);
sys/net80211/ieee80211_crypto.c
611
rc4_skip(&ctx.rc4, RC4STATE);
sys/net80211/ieee80211_crypto.c
612
rc4_crypt(&ctx.rc4, data, data, len);
sys/net80211/ieee80211_crypto.c
620
aes_key_wrap_set_key(&ctx.aes, kek, 16);
sys/net80211/ieee80211_crypto.c
621
return aes_key_unwrap(&ctx.aes, data, data, len / 8);
sys/net80211/ieee80211_crypto_bip.c
111
AES_CMAC_Init(&ctx->cmac);
sys/net80211/ieee80211_crypto_bip.c
112
AES_CMAC_Update(&ctx->cmac, (u_int8_t *)&aad, sizeof aad);
sys/net80211/ieee80211_crypto_bip.c
113
AES_CMAC_Update(&ctx->cmac, (u_int8_t *)&wh[1],
sys/net80211/ieee80211_crypto_bip.c
134
AES_CMAC_Update(&ctx->cmac, mmie, IEEE80211_MMIE_LEN);
sys/net80211/ieee80211_crypto_bip.c
135
AES_CMAC_Final(mic, &ctx->cmac);
sys/net80211/ieee80211_crypto_bip.c
155
struct ieee80211_bip_ctx *ctx = k->k_priv;
sys/net80211/ieee80211_crypto_bip.c
195
AES_CMAC_Init(&ctx->cmac);
sys/net80211/ieee80211_crypto_bip.c
196
AES_CMAC_Update(&ctx->cmac, (u_int8_t *)&aad, sizeof aad);
sys/net80211/ieee80211_crypto_bip.c
197
AES_CMAC_Update(&ctx->cmac, (u_int8_t *)&wh[1],
sys/net80211/ieee80211_crypto_bip.c
199
AES_CMAC_Final(mic, &ctx->cmac);
sys/net80211/ieee80211_crypto_bip.c
58
struct ieee80211_bip_ctx *ctx;
sys/net80211/ieee80211_crypto_bip.c
60
ctx = malloc(sizeof(*ctx), M_DEVBUF, M_NOWAIT | M_ZERO);
sys/net80211/ieee80211_crypto_bip.c
61
if (ctx == NULL)
sys/net80211/ieee80211_crypto_bip.c
63
AES_CMAC_SetKey(&ctx->cmac, k->k_key);
sys/net80211/ieee80211_crypto_bip.c
64
k->k_priv = ctx;
sys/net80211/ieee80211_crypto_bip.c
90
struct ieee80211_bip_ctx *ctx = k->k_priv;
sys/net80211/ieee80211_crypto_ccmp.c
149
AES_Encrypt(ctx, b, b);
sys/net80211/ieee80211_crypto_ccmp.c
153
AES_Encrypt(ctx, b, b);
sys/net80211/ieee80211_crypto_ccmp.c
156
AES_Encrypt(ctx, b, b);
sys/net80211/ieee80211_crypto_ccmp.c
162
AES_Encrypt(ctx, a, s0);
sys/net80211/ieee80211_crypto_ccmp.c
169
struct ieee80211_ccmp_ctx *ctx = k->k_priv;
sys/net80211/ieee80211_crypto_ccmp.c
213
ieee80211_ccmp_phase1(&ctx->aesctx, wh, k->k_tsc,
sys/net80211/ieee80211_crypto_ccmp.c
220
AES_Encrypt(&ctx->aesctx, a, s);
sys/net80211/ieee80211_crypto_ccmp.c
263
AES_Encrypt(&ctx->aesctx, b, b);
sys/net80211/ieee80211_crypto_ccmp.c
268
AES_Encrypt(&ctx->aesctx, a, s);
sys/net80211/ieee80211_crypto_ccmp.c
277
AES_Encrypt(&ctx->aesctx, b, b);
sys/net80211/ieee80211_crypto_ccmp.c
346
struct ieee80211_ccmp_ctx *ctx = k->k_priv;
sys/net80211/ieee80211_crypto_ccmp.c
397
ieee80211_ccmp_phase1(&ctx->aesctx, wh, pn,
sys/net80211/ieee80211_crypto_ccmp.c
409
AES_Encrypt(&ctx->aesctx, a, s);
sys/net80211/ieee80211_crypto_ccmp.c
452
AES_Encrypt(&ctx->aesctx, b, b);
sys/net80211/ieee80211_crypto_ccmp.c
457
AES_Encrypt(&ctx->aesctx, a, s);
sys/net80211/ieee80211_crypto_ccmp.c
466
AES_Encrypt(&ctx->aesctx, b, b);
sys/net80211/ieee80211_crypto_ccmp.c
56
struct ieee80211_ccmp_ctx *ctx;
sys/net80211/ieee80211_crypto_ccmp.c
58
ctx = malloc(sizeof(*ctx), M_DEVBUF, M_NOWAIT | M_ZERO);
sys/net80211/ieee80211_crypto_ccmp.c
59
if (ctx == NULL)
sys/net80211/ieee80211_crypto_ccmp.c
61
AES_Setkey(&ctx->aesctx, k->k_key, 16);
sys/net80211/ieee80211_crypto_ccmp.c
62
k->k_priv = ctx;
sys/net80211/ieee80211_crypto_ccmp.c
81
ieee80211_ccmp_phase1(AES_CTX *ctx, const struct ieee80211_frame *wh,
sys/net80211/ieee80211_crypto_tkip.c
124
MICHAEL_CTX ctx; /* small enough */
sys/net80211/ieee80211_crypto_tkip.c
158
michael_init(&ctx);
sys/net80211/ieee80211_crypto_tkip.c
159
michael_key(key, &ctx);
sys/net80211/ieee80211_crypto_tkip.c
161
michael_update(&ctx, (caddr_t)&wht, sizeof(wht));
sys/net80211/ieee80211_crypto_tkip.c
168
michael_update(&ctx, pos, len);
sys/net80211/ieee80211_crypto_tkip.c
175
michael_final(mic, &ctx);
sys/net80211/ieee80211_crypto_tkip.c
188
struct ieee80211_tkip_ctx *ctx = k->k_priv;
sys/net80211/ieee80211_crypto_tkip.c
231
if (!ctx->txttak_ok || (k->k_tsc & 0xffff) == 0) {
sys/net80211/ieee80211_crypto_tkip.c
232
Phase1(ctx->txttak, k->k_key, wh->i_addr2, k->k_tsc >> 16);
sys/net80211/ieee80211_crypto_tkip.c
233
ctx->txttak_ok = 1;
sys/net80211/ieee80211_crypto_tkip.c
235
Phase2((u_int8_t *)wepseed, k->k_key, ctx->txttak, k->k_tsc & 0xffff);
sys/net80211/ieee80211_crypto_tkip.c
236
rc4_keysetup(&ctx->rc4, (u_int8_t *)wepseed, 16);
sys/net80211/ieee80211_crypto_tkip.c
271
rc4_crypt(&ctx->rc4, mtod(m, caddr_t) + moff,
sys/net80211/ieee80211_crypto_tkip.c
290
ieee80211_tkip_mic(m0, hdrlen, ctx->txmic, mic);
sys/net80211/ieee80211_crypto_tkip.c
292
rc4_crypt(&ctx->rc4, mic, mic, IEEE80211_TKIP_MICLEN);
sys/net80211/ieee80211_crypto_tkip.c
302
rc4_crypt(&ctx->rc4, icvp, icvp, IEEE80211_WEP_CRCLEN);
sys/net80211/ieee80211_crypto_tkip.c
356
struct ieee80211_tkip_ctx *ctx = k->k_priv;
sys/net80211/ieee80211_crypto_tkip.c
412
if (!ctx->rxttak_ok || (tsc >> 16) != (*prsc >> 16)) {
sys/net80211/ieee80211_crypto_tkip.c
413
ctx->rxttak_ok = 0; /* invalidate cached TTAK (if any) */
sys/net80211/ieee80211_crypto_tkip.c
414
Phase1(ctx->rxttak, k->k_key, wh->i_addr2, tsc >> 16);
sys/net80211/ieee80211_crypto_tkip.c
416
Phase2((u_int8_t *)wepseed, k->k_key, ctx->rxttak, tsc & 0xffff);
sys/net80211/ieee80211_crypto_tkip.c
417
rc4_keysetup(&ctx->rc4, (u_int8_t *)wepseed, 16);
sys/net80211/ieee80211_crypto_tkip.c
451
rc4_crypt(&ctx->rc4, mtod(m, caddr_t) + moff,
sys/net80211/ieee80211_crypto_tkip.c
462
rc4_crypt(&ctx->rc4, buf, buf, IEEE80211_TKIP_TAILLEN);
sys/net80211/ieee80211_crypto_tkip.c
479
ieee80211_tkip_mic(n0, hdrlen, ctx->rxmic, mic);
sys/net80211/ieee80211_crypto_tkip.c
492
ctx->rxttak_ok = 1;
sys/net80211/ieee80211_crypto_tkip.c
71
struct ieee80211_tkip_ctx *ctx;
sys/net80211/ieee80211_crypto_tkip.c
73
ctx = malloc(sizeof(*ctx), M_DEVBUF, M_NOWAIT | M_ZERO);
sys/net80211/ieee80211_crypto_tkip.c
74
if (ctx == NULL)
sys/net80211/ieee80211_crypto_tkip.c
82
ctx->txmic = &k->k_key[16];
sys/net80211/ieee80211_crypto_tkip.c
83
ctx->rxmic = &k->k_key[24];
sys/net80211/ieee80211_crypto_tkip.c
87
ctx->rxmic = &k->k_key[16];
sys/net80211/ieee80211_crypto_tkip.c
88
ctx->txmic = &k->k_key[24];
sys/net80211/ieee80211_crypto_tkip.c
90
k->k_priv = ctx;
sys/net80211/ieee80211_crypto_wep.c
113
iv = (ctx->iv != 0) ? ctx->iv : arc4random();
sys/net80211/ieee80211_crypto_wep.c
117
ctx->iv = iv + 1;
sys/net80211/ieee80211_crypto_wep.c
127
rc4_keysetup(&ctx->rc4, wepseed, IEEE80211_WEP_IVLEN + k->k_len);
sys/net80211/ieee80211_crypto_wep.c
162
rc4_crypt(&ctx->rc4, mtod(m, caddr_t) + moff,
sys/net80211/ieee80211_crypto_wep.c
186
rc4_crypt(&ctx->rc4, icvp, icvp, IEEE80211_WEP_CRCLEN);
sys/net80211/ieee80211_crypto_wep.c
203
struct ieee80211_wep_ctx *ctx = k->k_priv;
sys/net80211/ieee80211_crypto_wep.c
223
rc4_keysetup(&ctx->rc4, wepseed, IEEE80211_WEP_IVLEN + k->k_len);
sys/net80211/ieee80211_crypto_wep.c
277
rc4_crypt(&ctx->rc4, mtod(m, caddr_t) + moff,
sys/net80211/ieee80211_crypto_wep.c
288
rc4_crypt(&ctx->rc4, (caddr_t)&crc0, (caddr_t)&crc0,
sys/net80211/ieee80211_crypto_wep.c
57
struct ieee80211_wep_ctx *ctx;
sys/net80211/ieee80211_crypto_wep.c
59
ctx = malloc(sizeof(*ctx), M_DEVBUF, M_NOWAIT | M_ZERO);
sys/net80211/ieee80211_crypto_wep.c
60
if (ctx == NULL)
sys/net80211/ieee80211_crypto_wep.c
62
k->k_priv = ctx;
sys/net80211/ieee80211_crypto_wep.c
84
struct ieee80211_wep_ctx *ctx = k->k_priv;
sys/netinet/in_pcb.c
157
SIPHASH_CTX ctx;
sys/netinet/in_pcb.c
160
SipHash24_Init(&ctx, &table->inpt_key);
sys/netinet/in_pcb.c
161
SipHash24_Update(&ctx, &nrdom, sizeof(nrdom));
sys/netinet/in_pcb.c
162
SipHash24_Update(&ctx, faddr, sizeof(*faddr));
sys/netinet/in_pcb.c
163
SipHash24_Update(&ctx, &fport, sizeof(fport));
sys/netinet/in_pcb.c
164
SipHash24_Update(&ctx, laddr, sizeof(*laddr));
sys/netinet/in_pcb.c
165
SipHash24_Update(&ctx, &lport, sizeof(lport));
sys/netinet/in_pcb.c
166
return SipHash24_End(&ctx);
sys/netinet/in_pcb.c
172
SIPHASH_CTX ctx;
sys/netinet/in_pcb.c
175
SipHash24_Init(&ctx, &table->inpt_lkey);
sys/netinet/in_pcb.c
176
SipHash24_Update(&ctx, &nrdom, sizeof(nrdom));
sys/netinet/in_pcb.c
177
SipHash24_Update(&ctx, &lport, sizeof(lport));
sys/netinet/in_pcb.c
178
return SipHash24_End(&ctx);
sys/netinet/ip_carp.c
284
carp_hmac_prepare_ctx(struct carp_vhost_entry *vhe, u_int8_t ctx)
sys/netinet/ip_carp.c
306
SHA1Init(&vhe->vhe_sha1[ctx]);
sys/netinet/ip_carp.c
307
SHA1Update(&vhe->vhe_sha1[ctx], vhe->vhe_pad, sizeof(vhe->vhe_pad));
sys/netinet/ip_carp.c
308
SHA1Update(&vhe->vhe_sha1[ctx], (void *)&version, sizeof(version));
sys/netinet/ip_carp.c
309
SHA1Update(&vhe->vhe_sha1[ctx], (void *)&type, sizeof(type));
sys/netinet/ip_carp.c
313
bcopy(&vhe->vhe_sha1[ctx], &sha1ctx, sizeof(sha1ctx));
sys/netinet/ip_carp.c
322
SHA1Update(&vhe->vhe_sha1[ctx], sc->sc_ac.ac_enaddr,
sys/netinet/ip_carp.c
325
SHA1Update(&vhe->vhe_sha1[ctx], (void *)&vhid, sizeof(vhid));
sys/netinet/ip_carp.c
344
SHA1Update(&vhe->vhe_sha1[ctx],
sys/netinet/ip_carp.c
358
if (ctx == HMAC_NOV6LL)
sys/netinet/ip_carp.c
369
SHA1Update(&vhe->vhe_sha1[ctx],
sys/netinet/ip_carp.c
381
unsigned char md[20], u_int8_t ctx)
sys/netinet/ip_carp.c
386
bcopy(&vhe->vhe_sha1[ctx], &sha1ctx, sizeof(sha1ctx));
sys/netinet/ip_ipsp.c
231
SIPHASH_CTX ctx;
sys/netinet/ip_ipsp.c
235
SipHash24_Init(&ctx, &tdbkey);
sys/netinet/ip_ipsp.c
236
SipHash24_Update(&ctx, &spi, sizeof(spi));
sys/netinet/ip_ipsp.c
237
SipHash24_Update(&ctx, &proto, sizeof(proto));
sys/netinet/ip_ipsp.c
238
SipHash24_Update(&ctx, dst, dst->sa.sa_len);
sys/netinet/ip_ipsp.c
240
return (SipHash24_End(&ctx) & tdb_hashmask);
sys/netinet/tcp_subr.c
1043
MD5_CTX ctx;
sys/netinet/tcp_subr.c
1047
MD5Init(&ctx);
sys/netinet/tcp_subr.c
1063
MD5Update(&ctx, (char *)&ippseudo,
sys/netinet/tcp_subr.c
1081
MD5Update(&ctx, (char *)&ip6pseudo,
sys/netinet/tcp_subr.c
1097
MD5Update(&ctx, (char *)&th0, sizeof(th0));
sys/netinet/tcp_subr.c
1103
tcp_signature_apply, (caddr_t)&ctx))
sys/netinet/tcp_subr.c
1106
MD5Update(&ctx, tdb->tdb_amxkey, tdb->tdb_amxkeylen);
sys/netinet/tcp_subr.c
1107
MD5Final(sig, &ctx);
sys/netinet/tcp_subr.c
948
SHA2_CTX ctx;
sys/netinet/tcp_subr.c
961
ctx = tcp_secret_ctx;
sys/netinet/tcp_subr.c
962
SHA512Update(&ctx, &rdomain, sizeof(rdomain));
sys/netinet/tcp_subr.c
963
SHA512Update(&ctx, &tp->t_inpcb->inp_lport, sizeof(u_short));
sys/netinet/tcp_subr.c
964
SHA512Update(&ctx, &tp->t_inpcb->inp_fport, sizeof(u_short));
sys/netinet/tcp_subr.c
966
SHA512Update(&ctx, &tp->t_inpcb->inp_laddr6,
sys/netinet/tcp_subr.c
968
SHA512Update(&ctx, &tp->t_inpcb->inp_faddr6,
sys/netinet/tcp_subr.c
971
SHA512Update(&ctx, &tp->t_inpcb->inp_laddr,
sys/netinet/tcp_subr.c
973
SHA512Update(&ctx, &tp->t_inpcb->inp_faddr,
sys/netinet/tcp_subr.c
976
SHA512Final(digest.bytes, &ctx);
sys/netinet6/in6_pcb.c
138
SIPHASH_CTX ctx;
sys/netinet6/in6_pcb.c
141
SipHash24_Init(&ctx, &table->inpt_key);
sys/netinet6/in6_pcb.c
142
SipHash24_Update(&ctx, &nrdom, sizeof(nrdom));
sys/netinet6/in6_pcb.c
143
SipHash24_Update(&ctx, faddr, sizeof(*faddr));
sys/netinet6/in6_pcb.c
144
SipHash24_Update(&ctx, &fport, sizeof(fport));
sys/netinet6/in6_pcb.c
145
SipHash24_Update(&ctx, laddr, sizeof(*laddr));
sys/netinet6/in6_pcb.c
146
SipHash24_Update(&ctx, &lport, sizeof(lport));
sys/netinet6/in6_pcb.c
147
return SipHash24_End(&ctx);
sys/ntfs/ntfs_ihash.c
84
SIPHASH_CTX ctx;
sys/ntfs/ntfs_ihash.c
86
SipHash24_Init(&ctx, &ntfs_nthashkey);
sys/ntfs/ntfs_ihash.c
87
SipHash24_Update(&ctx, &dev, sizeof(dev));
sys/ntfs/ntfs_ihash.c
88
SipHash24_Update(&ctx, &inum, sizeof(inum));
sys/ntfs/ntfs_ihash.c
90
return (SipHash24_End(&ctx) & ntfs_nthash);
sys/ufs/mfs/mfs_vfsops.c
170
struct sigctx ctx;
sys/ufs/mfs/mfs_vfsops.c
192
sig = cursig(p, &ctx, 0);
sys/ufs/ufs/ufs_ihash.c
62
SIPHASH_CTX ctx;
sys/ufs/ufs/ufs_ihash.c
64
SipHash24_Init(&ctx, &ihashkey);
sys/ufs/ufs/ufs_ihash.c
65
SipHash24_Update(&ctx, &dev, sizeof(dev));
sys/ufs/ufs/ufs_ihash.c
66
SipHash24_Update(&ctx, &inum, sizeof(inum));
sys/ufs/ufs/ufs_ihash.c
68
return (&ihashtbl[SipHash24_End(&ctx) & ihash]);
sys/ufs/ufs/ufs_quota.c
835
SIPHASH_CTX ctx;
sys/ufs/ufs/ufs_quota.c
851
SipHash24_Init(&ctx, &dqhashkey);
sys/ufs/ufs/ufs_quota.c
852
SipHash24_Update(&ctx, &dqvp, sizeof(dqvp));
sys/ufs/ufs/ufs_quota.c
853
SipHash24_Update(&ctx, &id, sizeof(id));
sys/ufs/ufs/ufs_quota.c
854
dqh = &dqhashtbl[SipHash24_End(&ctx) & dqhash];
usr.bin/aucat/dsp.c
385
adata_t *ctxbuf, *ctx;
usr.bin/aucat/dsp.c
399
ctxbuf = p->ctx;
usr.bin/aucat/dsp.c
416
ctx = ctxbuf + ctx_start;
usr.bin/aucat/dsp.c
418
*ctx = *idata++;
usr.bin/aucat/dsp.c
419
ctx += RESAMP_NCTX;
usr.bin/aucat/dsp.c
439
ctx = ctxbuf;
usr.bin/aucat/dsp.c
441
f[c] += (int64_t)ctx[n] * s;
usr.bin/aucat/dsp.c
442
ctx += RESAMP_NCTX;
usr.bin/aucat/dsp.c
528
memset(p->ctx, 0, sizeof(p->ctx));
usr.bin/aucat/dsp.h
85
adata_t ctx[NCHAN_MAX * RESAMP_NCTX];
usr.bin/dc/bcode.c
1026
bn_check(BN_mul(r->number, a->number, b->number, bmachine.ctx));
usr.bin/dc/bcode.c
1078
bn_check(BN_div(r->number, NULL, b->number, a->number, bmachine.ctx));
usr.bin/dc/bcode.c
1111
bn_check(BN_mod(r->number, b->number, a->number, bmachine.ctx));
usr.bin/dc/bcode.c
1147
b->number, a->number, bmachine.ctx));
usr.bin/dc/bcode.c
1244
r->number, bmachine.ctx));
usr.bin/dc/bcode.c
1281
bn_check(BN_div(y, NULL, n->number, x, bmachine.ctx));
usr.bin/dc/bcode.c
230
bmachine.ctx = BN_CTX_new();
usr.bin/dc/bcode.c
231
bn_checkp(bmachine.ctx);
usr.bin/dc/bcode.c
376
bn_check(BN_exp(a, a, p, bmachine.ctx));
usr.bin/dc/bcode.c
378
bn_check(BN_mul(n, n, a, bmachine.ctx));
usr.bin/dc/bcode.c
380
bn_check(BN_div(n, NULL, n, a, bmachine.ctx));
usr.bin/dc/bcode.c
410
bn_check(BN_exp(a, a, p, bmachine.ctx));
usr.bin/dc/bcode.c
411
bn_check(BN_div(i, f, n->number, a, bmachine.ctx));
usr.bin/dc/bcode.c
49
BN_CTX *ctx;
usr.bin/dc/bcode.c
726
bn_check(BN_exp(a, a, p, bmachine.ctx));
usr.bin/dig/lib/dns/masterdump.c
155
totext_ctx_init(const dns_master_style_t *style, dns_totext_ctx_t *ctx) {
usr.bin/dig/lib/dns/masterdump.c
160
ctx->style = *style;
usr.bin/dig/lib/dns/masterdump.c
161
ctx->class_printed = 0;
usr.bin/dig/lib/dns/masterdump.c
163
dns_fixedname_init(&ctx->origin_fixname);
usr.bin/dig/lib/dns/masterdump.c
168
if ((ctx->style.flags & DNS_STYLEFLAG_MULTILINE) != 0) {
usr.bin/dig/lib/dns/masterdump.c
173
isc_buffer_init(&buf, ctx->linebreak_buf,
usr.bin/dig/lib/dns/masterdump.c
174
sizeof(ctx->linebreak_buf));
usr.bin/dig/lib/dns/masterdump.c
182
if ((ctx->style.flags & DNS_STYLEFLAG_COMMENTDATA) != 0) {
usr.bin/dig/lib/dns/masterdump.c
190
result = indent(&col, ctx->style.rdata_column,
usr.bin/dig/lib/dns/masterdump.c
191
ctx->style.tab_width, &buf);
usr.bin/dig/lib/dns/masterdump.c
209
ctx->linebreak = ctx->linebreak_buf;
usr.bin/dig/lib/dns/masterdump.c
211
ctx->linebreak = NULL;
usr.bin/dig/lib/dns/masterdump.c
214
ctx->origin = NULL;
usr.bin/dig/lib/dns/masterdump.c
215
ctx->neworigin = NULL;
usr.bin/dig/lib/dns/masterdump.c
216
ctx->current_ttl = 0;
usr.bin/dig/lib/dns/masterdump.c
217
ctx->current_ttl_valid = 0;
usr.bin/dig/lib/dns/masterdump.c
224
if ((result = indent(&column, ctx->style.col, \
usr.bin/dig/lib/dns/masterdump.c
225
ctx->style.tab_width, target)) \
usr.bin/dig/lib/dns/masterdump.c
240
dns_totext_ctx_t *ctx,
usr.bin/dig/lib/dns/masterdump.c
254
current_ttl = ctx->current_ttl;
usr.bin/dig/lib/dns/masterdump.c
255
current_ttl_valid = ctx->current_ttl_valid;
usr.bin/dig/lib/dns/masterdump.c
263
if ((ctx->style.flags & DNS_STYLEFLAG_COMMENTDATA) != 0)
usr.bin/dig/lib/dns/masterdump.c
270
! ((ctx->style.flags & DNS_STYLEFLAG_OMIT_OWNER) != 0 &&
usr.bin/dig/lib/dns/masterdump.c
283
if ((ctx->style.flags & DNS_STYLEFLAG_NO_TTL) == 0 &&
usr.bin/dig/lib/dns/masterdump.c
284
!((ctx->style.flags & DNS_STYLEFLAG_OMIT_TTL) != 0 &&
usr.bin/dig/lib/dns/masterdump.c
307
if ((ctx->style.flags & DNS_STYLEFLAG_TTL) == 0) {
usr.bin/dig/lib/dns/masterdump.c
316
if ((ctx->style.flags & DNS_STYLEFLAG_NO_CLASS) == 0 &&
usr.bin/dig/lib/dns/masterdump.c
317
((ctx->style.flags & DNS_STYLEFLAG_OMIT_CLASS) == 0 ||
usr.bin/dig/lib/dns/masterdump.c
318
!ctx->class_printed))
usr.bin/dig/lib/dns/masterdump.c
341
if ((ctx->style.flags & DNS_STYLEFLAG_KEYDATA) != 0) {
usr.bin/dig/lib/dns/masterdump.c
367
ctx->origin,
usr.bin/dig/lib/dns/masterdump.c
369
ctx->style.flags,
usr.bin/dig/lib/dns/masterdump.c
370
ctx->style.line_length -
usr.bin/dig/lib/dns/masterdump.c
371
ctx->style.rdata_column,
usr.bin/dig/lib/dns/masterdump.c
372
ctx->style.split_width,
usr.bin/dig/lib/dns/masterdump.c
373
ctx->linebreak,
usr.bin/dig/lib/dns/masterdump.c
397
ctx->class_printed = 1;
usr.bin/dig/lib/dns/masterdump.c
398
ctx->current_ttl= current_ttl;
usr.bin/dig/lib/dns/masterdump.c
399
ctx->current_ttl_valid = current_ttl_valid;
usr.bin/dig/lib/dns/masterdump.c
412
dns_totext_ctx_t *ctx,
usr.bin/dig/lib/dns/masterdump.c
472
dns_totext_ctx_t ctx;
usr.bin/dig/lib/dns/masterdump.c
474
result = totext_ctx_init(&dns_master_style_debug, &ctx);
usr.bin/dig/lib/dns/masterdump.c
491
return (question_totext(rdataset, owner_name, &ctx,
usr.bin/dig/lib/dns/masterdump.c
494
return (rdataset_totext(rdataset, owner_name, &ctx,
usr.bin/dig/lib/dns/masterdump.c
504
dns_totext_ctx_t ctx;
usr.bin/dig/lib/dns/masterdump.c
506
result = totext_ctx_init(style, &ctx);
usr.bin/dig/lib/dns/masterdump.c
513
return (rdataset_totext(rdataset, owner_name, &ctx,
usr.bin/dig/lib/dns/masterdump.c
523
dns_totext_ctx_t ctx;
usr.bin/dig/lib/dns/masterdump.c
525
result = totext_ctx_init(style, &ctx);
usr.bin/dig/lib/dns/masterdump.c
532
return (question_totext(rdataset, owner_name, &ctx,
usr.bin/dig/lib/dns/tsig.c
1033
if (ctx != NULL)
usr.bin/dig/lib/dns/tsig.c
1034
dst_context_destroy(&ctx);
usr.bin/dig/lib/dns/tsig.c
418
dst_context_t *ctx = NULL;
usr.bin/dig/lib/dns/tsig.c
482
1, &ctx);
usr.bin/dig/lib/dns/tsig.c
511
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
522
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
531
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
540
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
548
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
553
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
567
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
580
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
590
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
606
ret = dst_context_sign(ctx, &sigbuf);
usr.bin/dig/lib/dns/tsig.c
609
dst_context_destroy(&ctx);
usr.bin/dig/lib/dns/tsig.c
697
if (ctx != NULL)
usr.bin/dig/lib/dns/tsig.c
698
dst_context_destroy(&ctx);
usr.bin/dig/lib/dns/tsig.c
716
dst_context_t *ctx = NULL;
usr.bin/dig/lib/dns/tsig.c
843
0, &ctx);
usr.bin/dig/lib/dns/tsig.c
851
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
857
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
889
ret = dst_context_adddata(ctx, &header_r);
usr.bin/dig/lib/dns/tsig.c
899
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
907
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
915
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
923
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
933
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
940
ret = dst_context_adddata(ctx, &r);
usr.bin/dig/lib/dns/tsig.c
945
ret = dst_context_verify(ctx, &sig_r);
usr.bin/dig/lib/isc/base32.c
126
base32_decode_init(base32_decode_ctx_t *ctx, int length, const char base[],
usr.bin/dig/lib/isc/base32.c
129
ctx->digits = 0;
usr.bin/dig/lib/isc/base32.c
130
ctx->seen_end = 0;
usr.bin/dig/lib/isc/base32.c
131
ctx->seen_32 = 0;
usr.bin/dig/lib/isc/base32.c
132
ctx->length = length;
usr.bin/dig/lib/isc/base32.c
133
ctx->target = target;
usr.bin/dig/lib/isc/base32.c
134
ctx->base = base;
usr.bin/dig/lib/isc/base32.c
135
ctx->pad = pad;
usr.bin/dig/lib/isc/base32.c
139
base32_decode_char(base32_decode_ctx_t *ctx, int c) {
usr.bin/dig/lib/isc/base32.c
143
if (ctx->seen_end)
usr.bin/dig/lib/isc/base32.c
145
if ((s = strchr(ctx->base, c)) == NULL)
usr.bin/dig/lib/isc/base32.c
147
last = (unsigned int)(s - ctx->base);
usr.bin/dig/lib/isc/base32.c
158
if (last != 32 && ctx->seen_32 != 0)
usr.bin/dig/lib/isc/base32.c
164
if (last == 32 && !ctx->pad)
usr.bin/dig/lib/isc/base32.c
172
if (last == 32 && ctx->seen_32 == 0)
usr.bin/dig/lib/isc/base32.c
173
switch (ctx->digits) {
usr.bin/dig/lib/isc/base32.c
178
if ((ctx->val[1]&0x03) != 0)
usr.bin/dig/lib/isc/base32.c
180
ctx->seen_32 = 1;
usr.bin/dig/lib/isc/base32.c
185
if ((ctx->val[3]&0x0f) != 0)
usr.bin/dig/lib/isc/base32.c
187
ctx->seen_32 = 3;
usr.bin/dig/lib/isc/base32.c
190
if ((ctx->val[4]&0x01) != 0)
usr.bin/dig/lib/isc/base32.c
192
ctx->seen_32 = 3;
usr.bin/dig/lib/isc/base32.c
197
if ((ctx->val[6]&0x07) != 0)
usr.bin/dig/lib/isc/base32.c
199
ctx->seen_32 = 4;
usr.bin/dig/lib/isc/base32.c
206
ctx->val[ctx->digits++] = (last == 32) ? 0 : last;
usr.bin/dig/lib/isc/base32.c
208
if (ctx->digits == 8) {
usr.bin/dig/lib/isc/base32.c
212
if (ctx->seen_32 != 0) {
usr.bin/dig/lib/isc/base32.c
213
ctx->seen_end = 1;
usr.bin/dig/lib/isc/base32.c
214
n = ctx->seen_32;
usr.bin/dig/lib/isc/base32.c
216
buf[0] = (ctx->val[0]<<3)|(ctx->val[1]>>2);
usr.bin/dig/lib/isc/base32.c
217
buf[1] = (ctx->val[1]<<6)|(ctx->val[2]<<1)|(ctx->val[3]>>4);
usr.bin/dig/lib/isc/base32.c
218
buf[2] = (ctx->val[3]<<4)|(ctx->val[4]>>1);
usr.bin/dig/lib/isc/base32.c
219
buf[3] = (ctx->val[4]<<7)|(ctx->val[5]<<2)|(ctx->val[6]>>3);
usr.bin/dig/lib/isc/base32.c
220
buf[4] = (ctx->val[6]<<5)|(ctx->val[7]);
usr.bin/dig/lib/isc/base32.c
221
RETERR(isc_mem_tobuffer(ctx->target, buf, n));
usr.bin/dig/lib/isc/base32.c
222
if (ctx->length >= 0) {
usr.bin/dig/lib/isc/base32.c
223
if (n > ctx->length)
usr.bin/dig/lib/isc/base32.c
226
ctx->length -= n;
usr.bin/dig/lib/isc/base32.c
228
ctx->digits = 0;
usr.bin/dig/lib/isc/base32.c
234
base32_decode_finish(base32_decode_ctx_t *ctx) {
usr.bin/dig/lib/isc/base32.c
236
if (ctx->length > 0)
usr.bin/dig/lib/isc/base32.c
241
if (!ctx->pad && ctx->digits != 0) {
usr.bin/dig/lib/isc/base32.c
242
ctx->pad = 1;
usr.bin/dig/lib/isc/base32.c
244
RETERR(base32_decode_char(ctx, '='));
usr.bin/dig/lib/isc/base32.c
245
} while (ctx->digits != 0);
usr.bin/dig/lib/isc/base32.c
247
if (ctx->digits != 0)
usr.bin/dig/lib/isc/base32.c
256
base32_decode_ctx_t ctx;
usr.bin/dig/lib/isc/base32.c
258
base32_decode_init(&ctx, -1, base, pad, target);
usr.bin/dig/lib/isc/base32.c
261
RETERR(base32_decode_char(&ctx, c));
usr.bin/dig/lib/isc/base32.c
264
RETERR(base32_decode_finish(&ctx));
usr.bin/dig/lib/isc/base64.c
101
ctx->digits = 0;
usr.bin/dig/lib/isc/base64.c
102
ctx->seen_end = 0;
usr.bin/dig/lib/isc/base64.c
103
ctx->length = length;
usr.bin/dig/lib/isc/base64.c
104
ctx->target = target;
usr.bin/dig/lib/isc/base64.c
108
base64_decode_char(base64_decode_ctx_t *ctx, int c) {
usr.bin/dig/lib/isc/base64.c
111
if (ctx->seen_end)
usr.bin/dig/lib/isc/base64.c
115
ctx->val[ctx->digits++] = (int)(s - base64);
usr.bin/dig/lib/isc/base64.c
116
if (ctx->digits == 4) {
usr.bin/dig/lib/isc/base64.c
119
if (ctx->val[0] == 64 || ctx->val[1] == 64)
usr.bin/dig/lib/isc/base64.c
121
if (ctx->val[2] == 64 && ctx->val[3] != 64)
usr.bin/dig/lib/isc/base64.c
126
if (ctx->val[2] == 64 && (ctx->val[1] & 0xf) != 0)
usr.bin/dig/lib/isc/base64.c
132
if (ctx->val[3] == 64 && (ctx->val[2] & 0x3) != 0)
usr.bin/dig/lib/isc/base64.c
134
n = (ctx->val[2] == 64) ? 1 :
usr.bin/dig/lib/isc/base64.c
135
(ctx->val[3] == 64) ? 2 : 3;
usr.bin/dig/lib/isc/base64.c
137
ctx->seen_end = 1;
usr.bin/dig/lib/isc/base64.c
138
if (ctx->val[2] == 64)
usr.bin/dig/lib/isc/base64.c
139
ctx->val[2] = 0;
usr.bin/dig/lib/isc/base64.c
140
if (ctx->val[3] == 64)
usr.bin/dig/lib/isc/base64.c
141
ctx->val[3] = 0;
usr.bin/dig/lib/isc/base64.c
143
buf[0] = (ctx->val[0]<<2)|(ctx->val[1]>>4);
usr.bin/dig/lib/isc/base64.c
144
buf[1] = (ctx->val[1]<<4)|(ctx->val[2]>>2);
usr.bin/dig/lib/isc/base64.c
145
buf[2] = (ctx->val[2]<<6)|(ctx->val[3]);
usr.bin/dig/lib/isc/base64.c
146
RETERR(isc_mem_tobuffer(ctx->target, buf, n));
usr.bin/dig/lib/isc/base64.c
147
if (ctx->length >= 0) {
usr.bin/dig/lib/isc/base64.c
148
if (n > ctx->length)
usr.bin/dig/lib/isc/base64.c
151
ctx->length -= n;
usr.bin/dig/lib/isc/base64.c
153
ctx->digits = 0;
usr.bin/dig/lib/isc/base64.c
159
base64_decode_finish(base64_decode_ctx_t *ctx) {
usr.bin/dig/lib/isc/base64.c
160
if (ctx->length > 0)
usr.bin/dig/lib/isc/base64.c
162
if (ctx->digits != 0)
usr.bin/dig/lib/isc/base64.c
169
base64_decode_ctx_t ctx;
usr.bin/dig/lib/isc/base64.c
171
base64_decode_init(&ctx, -1, target);
usr.bin/dig/lib/isc/base64.c
178
RETERR(base64_decode_char(&ctx, c));
usr.bin/dig/lib/isc/base64.c
180
RETERR(base64_decode_finish(&ctx));
usr.bin/dig/lib/isc/base64.c
99
base64_decode_init(base64_decode_ctx_t *ctx, int length, isc_buffer_t *target)
usr.bin/dig/lib/isc/hex.c
100
ctx->length -= 1;
usr.bin/dig/lib/isc/hex.c
102
ctx->digits = 0;
usr.bin/dig/lib/isc/hex.c
108
hex_decode_finish(hex_decode_ctx_t *ctx) {
usr.bin/dig/lib/isc/hex.c
109
if (ctx->length > 0)
usr.bin/dig/lib/isc/hex.c
111
if (ctx->digits != 0)
usr.bin/dig/lib/isc/hex.c
118
hex_decode_ctx_t ctx;
usr.bin/dig/lib/isc/hex.c
120
hex_decode_init(&ctx, -1, target);
usr.bin/dig/lib/isc/hex.c
127
RETERR(hex_decode_char(&ctx, c));
usr.bin/dig/lib/isc/hex.c
129
RETERR(hex_decode_finish(&ctx));
usr.bin/dig/lib/isc/hex.c
77
hex_decode_init(hex_decode_ctx_t *ctx, int length, isc_buffer_t *target)
usr.bin/dig/lib/isc/hex.c
79
ctx->digits = 0;
usr.bin/dig/lib/isc/hex.c
80
ctx->length = length;
usr.bin/dig/lib/isc/hex.c
81
ctx->target = target;
usr.bin/dig/lib/isc/hex.c
85
hex_decode_char(hex_decode_ctx_t *ctx, int c) {
usr.bin/dig/lib/isc/hex.c
90
ctx->val[ctx->digits++] = (int)(s - hex);
usr.bin/dig/lib/isc/hex.c
91
if (ctx->digits == 2) {
usr.bin/dig/lib/isc/hex.c
94
num = (ctx->val[0] << 4) + (ctx->val[1]);
usr.bin/dig/lib/isc/hex.c
95
RETERR(isc_mem_tobuffer(ctx->target, &num, 1));
usr.bin/dig/lib/isc/hex.c
96
if (ctx->length >= 0) {
usr.bin/dig/lib/isc/hex.c
97
if (ctx->length == 0)
usr.bin/dig/lib/isc/hmacsha.c
101
RUNTIME_CHECK(HMAC_Final(ctx->ctx, newdigest, NULL) == 1);
usr.bin/dig/lib/isc/hmacsha.c
102
HMAC_CTX_free(ctx->ctx);
usr.bin/dig/lib/isc/hmacsha.c
103
ctx->ctx = NULL;
usr.bin/dig/lib/isc/hmacsha.c
109
isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
usr.bin/dig/lib/isc/hmacsha.c
112
ctx->ctx = HMAC_CTX_new();
usr.bin/dig/lib/isc/hmacsha.c
113
RUNTIME_CHECK(ctx->ctx != NULL);
usr.bin/dig/lib/isc/hmacsha.c
114
RUNTIME_CHECK(HMAC_Init_ex(ctx->ctx, (const void *) key,
usr.bin/dig/lib/isc/hmacsha.c
119
isc_hmacsha256_invalidate(isc_hmacsha256_t *ctx) {
usr.bin/dig/lib/isc/hmacsha.c
120
if (ctx->ctx == NULL)
usr.bin/dig/lib/isc/hmacsha.c
122
HMAC_CTX_free(ctx->ctx);
usr.bin/dig/lib/isc/hmacsha.c
123
ctx->ctx = NULL;
usr.bin/dig/lib/isc/hmacsha.c
127
isc_hmacsha256_update(isc_hmacsha256_t *ctx, const unsigned char *buf,
usr.bin/dig/lib/isc/hmacsha.c
130
RUNTIME_CHECK(HMAC_Update(ctx->ctx, buf, (int) len) == 1);
usr.bin/dig/lib/isc/hmacsha.c
134
isc_hmacsha256_sign(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len) {
usr.bin/dig/lib/isc/hmacsha.c
139
RUNTIME_CHECK(HMAC_Final(ctx->ctx, newdigest, NULL) == 1);
usr.bin/dig/lib/isc/hmacsha.c
140
HMAC_CTX_free(ctx->ctx);
usr.bin/dig/lib/isc/hmacsha.c
141
ctx->ctx = NULL;
usr.bin/dig/lib/isc/hmacsha.c
147
isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
usr.bin/dig/lib/isc/hmacsha.c
150
ctx->ctx = HMAC_CTX_new();
usr.bin/dig/lib/isc/hmacsha.c
151
RUNTIME_CHECK(ctx->ctx != NULL);
usr.bin/dig/lib/isc/hmacsha.c
152
RUNTIME_CHECK(HMAC_Init_ex(ctx->ctx, (const void *) key,
usr.bin/dig/lib/isc/hmacsha.c
157
isc_hmacsha384_invalidate(isc_hmacsha384_t *ctx) {
usr.bin/dig/lib/isc/hmacsha.c
158
if (ctx->ctx == NULL)
usr.bin/dig/lib/isc/hmacsha.c
160
HMAC_CTX_free(ctx->ctx);
usr.bin/dig/lib/isc/hmacsha.c
161
ctx->ctx = NULL;
usr.bin/dig/lib/isc/hmacsha.c
165
isc_hmacsha384_update(isc_hmacsha384_t *ctx, const unsigned char *buf,
usr.bin/dig/lib/isc/hmacsha.c
168
RUNTIME_CHECK(HMAC_Update(ctx->ctx, buf, (int) len) == 1);
usr.bin/dig/lib/isc/hmacsha.c
172
isc_hmacsha384_sign(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len) {
usr.bin/dig/lib/isc/hmacsha.c
177
RUNTIME_CHECK(HMAC_Final(ctx->ctx, newdigest, NULL) == 1);
usr.bin/dig/lib/isc/hmacsha.c
178
HMAC_CTX_free(ctx->ctx);
usr.bin/dig/lib/isc/hmacsha.c
179
ctx->ctx = NULL;
usr.bin/dig/lib/isc/hmacsha.c
185
isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
usr.bin/dig/lib/isc/hmacsha.c
188
ctx->ctx = HMAC_CTX_new();
usr.bin/dig/lib/isc/hmacsha.c
189
RUNTIME_CHECK(ctx->ctx != NULL);
usr.bin/dig/lib/isc/hmacsha.c
190
RUNTIME_CHECK(HMAC_Init_ex(ctx->ctx, (const void *) key,
usr.bin/dig/lib/isc/hmacsha.c
195
isc_hmacsha512_invalidate(isc_hmacsha512_t *ctx) {
usr.bin/dig/lib/isc/hmacsha.c
196
if (ctx->ctx == NULL)
usr.bin/dig/lib/isc/hmacsha.c
198
HMAC_CTX_free(ctx->ctx);
usr.bin/dig/lib/isc/hmacsha.c
199
ctx->ctx = NULL;
usr.bin/dig/lib/isc/hmacsha.c
203
isc_hmacsha512_update(isc_hmacsha512_t *ctx, const unsigned char *buf,
usr.bin/dig/lib/isc/hmacsha.c
206
RUNTIME_CHECK(HMAC_Update(ctx->ctx, buf, (int) len) == 1);
usr.bin/dig/lib/isc/hmacsha.c
210
isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len) {
usr.bin/dig/lib/isc/hmacsha.c
215
RUNTIME_CHECK(HMAC_Final(ctx->ctx, newdigest, NULL) == 1);
usr.bin/dig/lib/isc/hmacsha.c
216
HMAC_CTX_free(ctx->ctx);
usr.bin/dig/lib/isc/hmacsha.c
217
ctx->ctx = NULL;
usr.bin/dig/lib/isc/hmacsha.c
227
isc_hmacsha1_verify(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len) {
usr.bin/dig/lib/isc/hmacsha.c
231
isc_hmacsha1_sign(ctx, newdigest, ISC_SHA1_DIGESTLENGTH);
usr.bin/dig/lib/isc/hmacsha.c
240
isc_hmacsha224_verify(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len) {
usr.bin/dig/lib/isc/hmacsha.c
244
isc_hmacsha224_sign(ctx, newdigest, ISC_SHA224_DIGESTLENGTH);
usr.bin/dig/lib/isc/hmacsha.c
253
isc_hmacsha256_verify(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len) {
usr.bin/dig/lib/isc/hmacsha.c
257
isc_hmacsha256_sign(ctx, newdigest, ISC_SHA256_DIGESTLENGTH);
usr.bin/dig/lib/isc/hmacsha.c
266
isc_hmacsha384_verify(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len) {
usr.bin/dig/lib/isc/hmacsha.c
270
isc_hmacsha384_sign(ctx, newdigest, ISC_SHA384_DIGESTLENGTH);
usr.bin/dig/lib/isc/hmacsha.c
279
isc_hmacsha512_verify(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len) {
usr.bin/dig/lib/isc/hmacsha.c
283
isc_hmacsha512_sign(ctx, newdigest, ISC_SHA512_DIGESTLENGTH);
usr.bin/dig/lib/isc/hmacsha.c
33
isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
usr.bin/dig/lib/isc/hmacsha.c
36
ctx->ctx = HMAC_CTX_new();
usr.bin/dig/lib/isc/hmacsha.c
37
RUNTIME_CHECK(ctx->ctx != NULL);
usr.bin/dig/lib/isc/hmacsha.c
38
RUNTIME_CHECK(HMAC_Init_ex(ctx->ctx, (const void *) key,
usr.bin/dig/lib/isc/hmacsha.c
43
isc_hmacsha1_invalidate(isc_hmacsha1_t *ctx) {
usr.bin/dig/lib/isc/hmacsha.c
44
if (ctx->ctx == NULL)
usr.bin/dig/lib/isc/hmacsha.c
46
HMAC_CTX_free(ctx->ctx);
usr.bin/dig/lib/isc/hmacsha.c
47
ctx->ctx = NULL;
usr.bin/dig/lib/isc/hmacsha.c
51
isc_hmacsha1_update(isc_hmacsha1_t *ctx, const unsigned char *buf,
usr.bin/dig/lib/isc/hmacsha.c
54
RUNTIME_CHECK(HMAC_Update(ctx->ctx, buf, (int) len) == 1);
usr.bin/dig/lib/isc/hmacsha.c
58
isc_hmacsha1_sign(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len) {
usr.bin/dig/lib/isc/hmacsha.c
63
RUNTIME_CHECK(HMAC_Final(ctx->ctx, newdigest, NULL) == 1);
usr.bin/dig/lib/isc/hmacsha.c
64
HMAC_CTX_free(ctx->ctx);
usr.bin/dig/lib/isc/hmacsha.c
65
ctx->ctx = NULL;
usr.bin/dig/lib/isc/hmacsha.c
71
isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
usr.bin/dig/lib/isc/hmacsha.c
74
ctx->ctx = HMAC_CTX_new();
usr.bin/dig/lib/isc/hmacsha.c
75
RUNTIME_CHECK(ctx->ctx != NULL);
usr.bin/dig/lib/isc/hmacsha.c
76
RUNTIME_CHECK(HMAC_Init_ex(ctx->ctx, (const void *) key,
usr.bin/dig/lib/isc/hmacsha.c
81
isc_hmacsha224_invalidate(isc_hmacsha224_t *ctx) {
usr.bin/dig/lib/isc/hmacsha.c
82
if (ctx->ctx == NULL)
usr.bin/dig/lib/isc/hmacsha.c
84
HMAC_CTX_free(ctx->ctx);
usr.bin/dig/lib/isc/hmacsha.c
85
ctx->ctx = NULL;
usr.bin/dig/lib/isc/hmacsha.c
89
isc_hmacsha224_update(isc_hmacsha224_t *ctx, const unsigned char *buf,
usr.bin/dig/lib/isc/hmacsha.c
92
RUNTIME_CHECK(HMAC_Update(ctx->ctx, buf, (int) len) == 1);
usr.bin/dig/lib/isc/hmacsha.c
96
isc_hmacsha224_sign(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len) {
usr.bin/dig/lib/isc/include/isc/hmacsha.h
100
isc_hmacsha384_init(isc_hmacsha384_t *ctx, const unsigned char *key,
usr.bin/dig/lib/isc/include/isc/hmacsha.h
104
isc_hmacsha384_invalidate(isc_hmacsha384_t *ctx);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
107
isc_hmacsha384_update(isc_hmacsha384_t *ctx, const unsigned char *buf,
usr.bin/dig/lib/isc/include/isc/hmacsha.h
111
isc_hmacsha384_sign(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
114
isc_hmacsha384_verify(isc_hmacsha384_t *ctx, unsigned char *digest, size_t len);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
117
isc_hmacsha512_init(isc_hmacsha512_t *ctx, const unsigned char *key,
usr.bin/dig/lib/isc/include/isc/hmacsha.h
121
isc_hmacsha512_invalidate(isc_hmacsha512_t *ctx);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
124
isc_hmacsha512_update(isc_hmacsha512_t *ctx, const unsigned char *buf,
usr.bin/dig/lib/isc/include/isc/hmacsha.h
128
isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
131
isc_hmacsha512_verify(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
39
HMAC_CTX *ctx;
usr.bin/dig/lib/isc/include/isc/hmacsha.h
49
isc_hmacsha1_init(isc_hmacsha1_t *ctx, const unsigned char *key,
usr.bin/dig/lib/isc/include/isc/hmacsha.h
53
isc_hmacsha1_invalidate(isc_hmacsha1_t *ctx);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
56
isc_hmacsha1_update(isc_hmacsha1_t *ctx, const unsigned char *buf,
usr.bin/dig/lib/isc/include/isc/hmacsha.h
60
isc_hmacsha1_sign(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
63
isc_hmacsha1_verify(isc_hmacsha1_t *ctx, unsigned char *digest, size_t len);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
66
isc_hmacsha224_init(isc_hmacsha224_t *ctx, const unsigned char *key,
usr.bin/dig/lib/isc/include/isc/hmacsha.h
70
isc_hmacsha224_invalidate(isc_hmacsha224_t *ctx);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
73
isc_hmacsha224_update(isc_hmacsha224_t *ctx, const unsigned char *buf,
usr.bin/dig/lib/isc/include/isc/hmacsha.h
77
isc_hmacsha224_sign(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
80
isc_hmacsha224_verify(isc_hmacsha224_t *ctx, unsigned char *digest, size_t len);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
83
isc_hmacsha256_init(isc_hmacsha256_t *ctx, const unsigned char *key,
usr.bin/dig/lib/isc/include/isc/hmacsha.h
87
isc_hmacsha256_invalidate(isc_hmacsha256_t *ctx);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
90
isc_hmacsha256_update(isc_hmacsha256_t *ctx, const unsigned char *buf,
usr.bin/dig/lib/isc/include/isc/hmacsha.h
94
isc_hmacsha256_sign(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len);
usr.bin/dig/lib/isc/include/isc/hmacsha.h
97
isc_hmacsha256_verify(isc_hmacsha256_t *ctx, unsigned char *digest, size_t len);
usr.bin/dig/lib/isc/include/isc/sha1.h
36
EVP_MD_CTX *ctx;
usr.bin/dig/lib/isc/include/isc/sha1.h
40
isc_sha1_init(isc_sha1_t *ctx);
usr.bin/dig/lib/isc/include/isc/sha1.h
43
isc_sha1_update(isc_sha1_t *ctx, const unsigned char *data, unsigned int len);
usr.bin/dig/lib/isc/include/isc/sha1.h
46
isc_sha1_final(isc_sha1_t *ctx, unsigned char *digest);
usr.bin/dig/lib/isc/include/isc/sha2.h
82
EVP_MD_CTX *ctx;
usr.bin/dig/lib/isc/sha1.c
46
context->ctx = EVP_MD_CTX_new();
usr.bin/dig/lib/isc/sha1.c
47
RUNTIME_CHECK(context->ctx != NULL);
usr.bin/dig/lib/isc/sha1.c
48
if (EVP_DigestInit(context->ctx, EVP_sha1()) != 1) {
usr.bin/dig/lib/isc/sha1.c
58
INSIST(context->ctx != 0);
usr.bin/dig/lib/isc/sha1.c
61
RUNTIME_CHECK(EVP_DigestUpdate(context->ctx,
usr.bin/dig/lib/isc/sha1.c
70
INSIST(context->ctx != 0);
usr.bin/dig/lib/isc/sha1.c
72
RUNTIME_CHECK(EVP_DigestFinal(context->ctx, digest, NULL) == 1);
usr.bin/dig/lib/isc/sha1.c
73
EVP_MD_CTX_free(context->ctx);
usr.bin/dig/lib/isc/sha1.c
74
context->ctx = NULL;
usr.bin/dig/lib/isc/sha2.c
100
context->ctx = NULL;
usr.bin/dig/lib/isc/sha2.c
108
context->ctx = EVP_MD_CTX_new();
usr.bin/dig/lib/isc/sha2.c
109
RUNTIME_CHECK(context->ctx != NULL);
usr.bin/dig/lib/isc/sha2.c
110
if (EVP_DigestInit(context->ctx, EVP_sha256()) != 1) {
usr.bin/dig/lib/isc/sha2.c
124
REQUIRE(context->ctx != (EVP_MD_CTX *)0);
usr.bin/dig/lib/isc/sha2.c
127
RUNTIME_CHECK(EVP_DigestUpdate(context->ctx,
usr.bin/dig/lib/isc/sha2.c
135
REQUIRE(context->ctx != (EVP_MD_CTX *)0);
usr.bin/dig/lib/isc/sha2.c
139
RUNTIME_CHECK(EVP_DigestFinal(context->ctx,
usr.bin/dig/lib/isc/sha2.c
141
EVP_MD_CTX_free(context->ctx);
usr.bin/dig/lib/isc/sha2.c
142
context->ctx = NULL;
usr.bin/dig/lib/isc/sha2.c
150
context->ctx = EVP_MD_CTX_new();
usr.bin/dig/lib/isc/sha2.c
151
RUNTIME_CHECK(context->ctx != NULL);
usr.bin/dig/lib/isc/sha2.c
152
if (EVP_DigestInit(context->ctx, EVP_sha512()) != 1) {
usr.bin/dig/lib/isc/sha2.c
165
REQUIRE(context->ctx != (EVP_MD_CTX *)0);
usr.bin/dig/lib/isc/sha2.c
168
RUNTIME_CHECK(EVP_DigestUpdate(context->ctx,
usr.bin/dig/lib/isc/sha2.c
175
REQUIRE(context->ctx != (EVP_MD_CTX *)0);
usr.bin/dig/lib/isc/sha2.c
179
RUNTIME_CHECK(EVP_DigestFinal(context->ctx,
usr.bin/dig/lib/isc/sha2.c
181
EVP_MD_CTX_free(context->ctx);
usr.bin/dig/lib/isc/sha2.c
182
context->ctx = NULL;
usr.bin/dig/lib/isc/sha2.c
190
context->ctx = EVP_MD_CTX_new();
usr.bin/dig/lib/isc/sha2.c
191
RUNTIME_CHECK(context->ctx != NULL);
usr.bin/dig/lib/isc/sha2.c
192
if (EVP_DigestInit(context->ctx, EVP_sha384()) != 1) {
usr.bin/dig/lib/isc/sha2.c
206
REQUIRE(context->ctx != (EVP_MD_CTX *)0);
usr.bin/dig/lib/isc/sha2.c
209
RUNTIME_CHECK(EVP_DigestUpdate(context->ctx,
usr.bin/dig/lib/isc/sha2.c
217
REQUIRE(context->ctx != (EVP_MD_CTX *)0);
usr.bin/dig/lib/isc/sha2.c
221
RUNTIME_CHECK(EVP_DigestFinal(context->ctx,
usr.bin/dig/lib/isc/sha2.c
223
EVP_MD_CTX_free(context->ctx);
usr.bin/dig/lib/isc/sha2.c
224
context->ctx = NULL;
usr.bin/dig/lib/isc/sha2.c
66
context->ctx = EVP_MD_CTX_new();
usr.bin/dig/lib/isc/sha2.c
67
RUNTIME_CHECK(context->ctx != NULL);
usr.bin/dig/lib/isc/sha2.c
68
if (EVP_DigestInit(context->ctx, EVP_sha224()) != 1) {
usr.bin/dig/lib/isc/sha2.c
82
REQUIRE(context->ctx != (EVP_MD_CTX *)0);
usr.bin/dig/lib/isc/sha2.c
85
RUNTIME_CHECK(EVP_DigestUpdate(context->ctx,
usr.bin/dig/lib/isc/sha2.c
93
REQUIRE(context->ctx != (EVP_MD_CTX *)0);
usr.bin/dig/lib/isc/sha2.c
97
RUNTIME_CHECK(EVP_DigestFinal(context->ctx,
usr.bin/dig/lib/isc/sha2.c
99
EVP_MD_CTX_free(context->ctx);
usr.bin/dig/lib/isc/unix/app.c
104
isc_app_ctxonrun(isc_appctx_t *ctx, isc_task_t *task,
usr.bin/dig/lib/isc/unix/app.c
111
if (ctx->running) {
usr.bin/dig/lib/isc/unix/app.c
129
ISC_LIST_APPEND(ctx->on_run, event, ev_link);
usr.bin/dig/lib/isc/unix/app.c
141
evloop(isc_appctx_t *ctx) {
usr.bin/dig/lib/isc/unix/app.c
144
while (!ctx->want_shutdown) {
usr.bin/dig/lib/isc/unix/app.c
152
readytasks = isc_taskmgr_ready(ctx->taskmgr);
usr.bin/dig/lib/isc/unix/app.c
159
result = isc_timermgr_nextevent(ctx->timermgr, &when);
usr.bin/dig/lib/isc/unix/app.c
175
n = isc_socketmgr_waitevents(ctx->socketmgr, tvp, &swait);
usr.bin/dig/lib/isc/unix/app.c
192
isc_timermgr_dispatch(ctx->timermgr);
usr.bin/dig/lib/isc/unix/app.c
195
(void)isc_socketmgr_dispatch(ctx->socketmgr, swait);
usr.bin/dig/lib/isc/unix/app.c
196
(void)isc_taskmgr_dispatch(ctx->taskmgr);
usr.bin/dig/lib/isc/unix/app.c
202
isc_app_ctxrun(isc_appctx_t *ctx) {
usr.bin/dig/lib/isc/unix/app.c
207
if (!ctx->running) {
usr.bin/dig/lib/isc/unix/app.c
208
ctx->running = 1;
usr.bin/dig/lib/isc/unix/app.c
213
for (event = ISC_LIST_HEAD(ctx->on_run);
usr.bin/dig/lib/isc/unix/app.c
217
ISC_LIST_UNLINK(ctx->on_run, event, ev_link);
usr.bin/dig/lib/isc/unix/app.c
225
(void) isc_taskmgr_dispatch(ctx->taskmgr);
usr.bin/dig/lib/isc/unix/app.c
226
result = evloop(ctx);
usr.bin/dig/lib/isc/unix/app.c
236
isc_app_ctxshutdown(isc_appctx_t *ctx) {
usr.bin/dig/lib/isc/unix/app.c
239
REQUIRE(ctx->running);
usr.bin/dig/lib/isc/unix/app.c
241
if (ctx->shutdown_requested)
usr.bin/dig/lib/isc/unix/app.c
244
ctx->shutdown_requested = 1;
usr.bin/dig/lib/isc/unix/app.c
247
if (ctx != &isc_g_appctx)
usr.bin/dig/lib/isc/unix/app.c
249
ctx->want_shutdown = 1;
usr.bin/dig/lib/isc/unix/app.c
251
ctx->want_shutdown = 1;
usr.bin/dig/lib/isc/unix/app.c
64
static isc_result_t isc_app_ctxonrun(isc_appctx_t *ctx, isc_task_t *task,
usr.bin/dig/lib/isc/unix/app.c
68
isc_app_ctxstart(isc_appctx_t *ctx) {
usr.bin/dig/lib/isc/unix/app.c
73
ISC_LIST_INIT(ctx->on_run);
usr.bin/dig/lib/isc/unix/app.c
75
ctx->shutdown_requested = 0;
usr.bin/dig/lib/isc/unix/app.c
76
ctx->running = 0;
usr.bin/dig/lib/isc/unix/app.c
77
ctx->want_shutdown = 0;
usr.bin/mandoc/roff.c
1355
struct mctx *ctx; /* current macro call context */
usr.bin/mandoc/roff.c
1469
ctx = r->mstack + r->mstackpos;
usr.bin/mandoc/roff.c
1472
if (argi < ctx->argc)
usr.bin/mandoc/roff.c
1473
res = ctx->argv[argi];
usr.bin/mandoc/roff.c
1486
for (argi = 0; argi < ctx->argc; argi++) {
usr.bin/mandoc/roff.c
1491
asz += strlen(ctx->argv[argi]);
usr.bin/mandoc/roff.c
1505
for (argi = 0; argi < ctx->argc; argi++) {
usr.bin/mandoc/roff.c
1510
src = ctx->argv[argi];
usr.bin/mandoc/roff.c
1946
struct mctx *ctx;
usr.bin/mandoc/roff.c
1950
ctx = r->mstack + r->mstackpos;
usr.bin/mandoc/roff.c
1951
for (i = 0; i < ctx->argc; i++)
usr.bin/mandoc/roff.c
1952
free(ctx->argv[i]);
usr.bin/mandoc/roff.c
1953
ctx->argc = 0;
usr.bin/mandoc/roff.c
3882
struct mctx *ctx;
usr.bin/mandoc/roff.c
3897
ctx = r->mstack + r->mstackpos;
usr.bin/mandoc/roff.c
3898
if (levels > ctx->argc) {
usr.bin/mandoc/roff.c
3900
ln, argpos, "%d, but max is %d", levels, ctx->argc);
usr.bin/mandoc/roff.c
3901
levels = ctx->argc;
usr.bin/mandoc/roff.c
3910
free(ctx->argv[i]);
usr.bin/mandoc/roff.c
3911
ctx->argc -= levels;
usr.bin/mandoc/roff.c
3912
for (i = 0; i < ctx->argc; i++)
usr.bin/mandoc/roff.c
3913
ctx->argv[i] = ctx->argv[i + levels];
usr.bin/mandoc/roff.c
3951
struct mctx *ctx;
usr.bin/mandoc/roff.c
3967
ctx = r->mstack + r->mstackpos;
usr.bin/mandoc/roff.c
3968
ctx->argc = 0;
usr.bin/mandoc/roff.c
3977
if (ctx->argc == ctx->argsz) {
usr.bin/mandoc/roff.c
3978
ctx->argsz += 8;
usr.bin/mandoc/roff.c
3979
ctx->argv = mandoc_reallocarray(ctx->argv,
usr.bin/mandoc/roff.c
3980
ctx->argsz, sizeof(*ctx->argv));
usr.bin/mandoc/roff.c
3986
ctx->argv[ctx->argc++] = dst = mandoc_malloc(sz);
usr.bin/openssl/apps.c
1872
pkey_ctrl_string(EVP_PKEY_CTX *ctx, char *value)
usr.bin/openssl/apps.c
1887
rv = EVP_PKEY_CTX_ctrl_str(ctx, stmp, vtmp);
usr.bin/openssl/apps.h
238
int pkey_ctrl_string(EVP_PKEY_CTX *ctx, char *value);
usr.bin/openssl/apps.h
379
int verify_callback(int ok, X509_STORE_CTX *ctx);
usr.bin/openssl/apps.h
380
int set_cert_stuff(SSL_CTX *ctx, char *cert_file, char *key_file);
usr.bin/openssl/apps.h
381
int set_cert_key_stuff(SSL_CTX *ctx, X509 *cert, EVP_PKEY *key);
usr.bin/openssl/ca.c
1065
X509V3_CTX ctx;
usr.bin/openssl/ca.c
1066
X509V3_set_ctx_test(&ctx);
usr.bin/openssl/ca.c
1067
X509V3_set_nconf(&ctx, conf);
usr.bin/openssl/ca.c
1068
if (!X509V3_EXT_add_nconf(conf, &ctx,
usr.bin/openssl/ca.c
1320
X509V3_CTX ctx;
usr.bin/openssl/ca.c
1321
X509V3_set_ctx_test(&ctx);
usr.bin/openssl/ca.c
1322
X509V3_set_nconf(&ctx, conf);
usr.bin/openssl/ca.c
1323
if (!X509V3_EXT_add_nconf(conf, &ctx, cfg.crl_ext,
usr.bin/openssl/ca.c
1964
X509V3_CTX ctx;
usr.bin/openssl/ca.c
1968
X509V3_set_ctx(&ctx, ret, ret, req, NULL, 0);
usr.bin/openssl/ca.c
1970
X509V3_set_ctx(&ctx, x509, ret, req, NULL, 0);
usr.bin/openssl/ca.c
1978
X509V3_set_nconf(&ctx, extconf);
usr.bin/openssl/ca.c
1984
if (!X509V3_EXT_add_nconf(extconf, &ctx,
usr.bin/openssl/ca.c
1997
X509V3_set_nconf(&ctx, lconf);
usr.bin/openssl/ca.c
1999
if (!X509V3_EXT_add_nconf(lconf, &ctx, ext_sect, ret)) {
usr.bin/openssl/crl.c
226
X509_STORE_CTX *ctx = NULL;
usr.bin/openssl/crl.c
301
if ((ctx = X509_STORE_CTX_new()) == NULL)
usr.bin/openssl/crl.c
306
if (!X509_STORE_CTX_init(ctx, store, NULL, NULL)) {
usr.bin/openssl/crl.c
311
i = X509_STORE_get_by_subject(ctx, X509_LU_X509,
usr.bin/openssl/crl.c
438
X509_STORE_CTX_free(ctx);
usr.bin/openssl/dgst.c
615
EVP_MD_CTX *ctx;
usr.bin/openssl/dgst.c
616
BIO_get_md_ctx(bp, &ctx);
usr.bin/openssl/dgst.c
617
i = EVP_DigestVerifyFinal(ctx, sigin, (unsigned int) siglen);
usr.bin/openssl/dgst.c
631
EVP_MD_CTX *ctx;
usr.bin/openssl/dgst.c
632
BIO_get_md_ctx(bp, &ctx);
usr.bin/openssl/dgst.c
634
if (!EVP_DigestSignFinal(ctx, buf, &len)) {
usr.bin/openssl/enc.c
339
EVP_CIPHER_CTX *ctx = NULL;
usr.bin/openssl/enc.c
664
BIO_get_cipher_ctx(benc, &ctx);
usr.bin/openssl/enc.c
666
if (!EVP_CipherInit_ex(ctx, cfg.cipher, NULL, NULL,
usr.bin/openssl/enc.c
674
EVP_CIPHER_CTX_set_padding(ctx, 0);
usr.bin/openssl/enc.c
676
if (!EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, cfg.enc)) {
usr.bin/openssl/genpkey.c
121
if (!init_keygen_file(bio_err, cfg.ctx, arg))
usr.bin/openssl/genpkey.c
130
if (*cfg.ctx == NULL) {
usr.bin/openssl/genpkey.c
135
if (pkey_ctrl_string(*cfg.ctx, arg) <= 0) {
usr.bin/openssl/genpkey.c
222
EVP_PKEY_CTX *ctx = NULL;
usr.bin/openssl/genpkey.c
233
cfg.ctx = &ctx;
usr.bin/openssl/genpkey.c
241
if (ctx == NULL) {
usr.bin/openssl/genpkey.c
261
EVP_PKEY_CTX_set_cb(ctx, genpkey_cb);
usr.bin/openssl/genpkey.c
262
EVP_PKEY_CTX_set_app_data(ctx, bio_err);
usr.bin/openssl/genpkey.c
265
if (EVP_PKEY_paramgen(ctx, &pkey) <= 0) {
usr.bin/openssl/genpkey.c
271
if (EVP_PKEY_keygen(ctx, &pkey) <= 0) {
usr.bin/openssl/genpkey.c
309
EVP_PKEY_CTX_free(ctx);
usr.bin/openssl/genpkey.c
322
EVP_PKEY_CTX *ctx = NULL;
usr.bin/openssl/genpkey.c
339
ctx = EVP_PKEY_CTX_new(pkey, NULL);
usr.bin/openssl/genpkey.c
340
if (!ctx)
usr.bin/openssl/genpkey.c
342
if (EVP_PKEY_keygen_init(ctx) <= 0)
usr.bin/openssl/genpkey.c
345
*pctx = ctx;
usr.bin/openssl/genpkey.c
351
EVP_PKEY_CTX_free(ctx);
usr.bin/openssl/genpkey.c
361
EVP_PKEY_CTX *ctx = NULL;
usr.bin/openssl/genpkey.c
377
ctx = EVP_PKEY_CTX_new_id(pkey_id, NULL);
usr.bin/openssl/genpkey.c
379
if (!ctx)
usr.bin/openssl/genpkey.c
382
if (EVP_PKEY_paramgen_init(ctx) <= 0)
usr.bin/openssl/genpkey.c
385
if (EVP_PKEY_keygen_init(ctx) <= 0)
usr.bin/openssl/genpkey.c
389
*pctx = ctx;
usr.bin/openssl/genpkey.c
395
EVP_PKEY_CTX_free(ctx);
usr.bin/openssl/genpkey.c
401
genpkey_cb(EVP_PKEY_CTX * ctx)
usr.bin/openssl/genpkey.c
404
BIO *b = EVP_PKEY_CTX_get_app_data(ctx);
usr.bin/openssl/genpkey.c
406
p = EVP_PKEY_CTX_get_keygen_info(ctx, 0);
usr.bin/openssl/genpkey.c
69
static int genpkey_cb(EVP_PKEY_CTX * ctx);
usr.bin/openssl/genpkey.c
73
EVP_PKEY_CTX **ctx;
usr.bin/openssl/genpkey.c
84
if (!init_gen_str(bio_err, cfg.ctx, arg,
usr.bin/openssl/ocsp.c
1468
OCSP_REQ_CTX *ctx = NULL;
usr.bin/openssl/ocsp.c
1498
ctx = OCSP_sendreq_new(cbio, path, NULL, -1);
usr.bin/openssl/ocsp.c
1499
if (!ctx)
usr.bin/openssl/ocsp.c
1506
if (!OCSP_REQ_CTX_add1_header(ctx, hdr->name, hdr->value))
usr.bin/openssl/ocsp.c
1511
if (!OCSP_REQ_CTX_add1_header(ctx, "Host", host))
usr.bin/openssl/ocsp.c
1515
if (!OCSP_REQ_CTX_set1_req(ctx, req))
usr.bin/openssl/ocsp.c
1519
rv = OCSP_sendreq_nbio(&rsp, ctx);
usr.bin/openssl/ocsp.c
1545
OCSP_REQ_CTX_free(ctx);
usr.bin/openssl/ocsp.c
1554
SSL_CTX *ctx = NULL;
usr.bin/openssl/ocsp.c
1566
ctx = SSL_CTX_new(TLS_client_method());
usr.bin/openssl/ocsp.c
1567
if (ctx == NULL) {
usr.bin/openssl/ocsp.c
1571
SSL_CTX_set_mode(ctx, SSL_MODE_AUTO_RETRY);
usr.bin/openssl/ocsp.c
1572
sbio = BIO_new_ssl(ctx, 1);
usr.bin/openssl/ocsp.c
1581
SSL_CTX_free(ctx);
usr.bin/openssl/pkeyutl.c
283
if (!cfg.ctx) {
usr.bin/openssl/pkeyutl.c
352
rv = EVP_PKEY_verify(cfg.ctx, sig, (size_t) siglen,
usr.bin/openssl/pkeyutl.c
362
rv = do_keyop(cfg.ctx, cfg.pkey_op, NULL,
usr.bin/openssl/pkeyutl.c
369
rv = do_keyop(cfg.ctx,
usr.bin/openssl/pkeyutl.c
391
EVP_PKEY_CTX_free(cfg.ctx);
usr.bin/openssl/pkeyutl.c
448
cfg.ctx = EVP_PKEY_CTX_new(pkey, NULL);
usr.bin/openssl/pkeyutl.c
452
if (!cfg.ctx)
usr.bin/openssl/pkeyutl.c
457
rv = EVP_PKEY_sign_init(cfg.ctx);
usr.bin/openssl/pkeyutl.c
461
rv = EVP_PKEY_verify_init(cfg.ctx);
usr.bin/openssl/pkeyutl.c
465
rv = EVP_PKEY_verify_recover_init(cfg.ctx);
usr.bin/openssl/pkeyutl.c
469
rv = EVP_PKEY_encrypt_init(cfg.ctx);
usr.bin/openssl/pkeyutl.c
473
rv = EVP_PKEY_decrypt_init(cfg.ctx);
usr.bin/openssl/pkeyutl.c
477
rv = EVP_PKEY_derive_init(cfg.ctx);
usr.bin/openssl/pkeyutl.c
482
EVP_PKEY_CTX_free(cfg.ctx);
usr.bin/openssl/pkeyutl.c
483
cfg.ctx = NULL;
usr.bin/openssl/pkeyutl.c
489
if (!cfg.ctx) {
usr.bin/openssl/pkeyutl.c
504
if (!cfg.ctx) {
usr.bin/openssl/pkeyutl.c
516
ret = EVP_PKEY_derive_set_peer(cfg.ctx, peer);
usr.bin/openssl/pkeyutl.c
530
if (!cfg.ctx) {
usr.bin/openssl/pkeyutl.c
533
} else if (pkey_ctrl_string(cfg.ctx, pkeyopt) <= 0) {
usr.bin/openssl/pkeyutl.c
543
do_keyop(EVP_PKEY_CTX * ctx, int pkey_op,
usr.bin/openssl/pkeyutl.c
550
rv = EVP_PKEY_verify_recover(ctx, out, poutlen, in, inlen);
usr.bin/openssl/pkeyutl.c
554
rv = EVP_PKEY_sign(ctx, out, poutlen, in, inlen);
usr.bin/openssl/pkeyutl.c
558
rv = EVP_PKEY_encrypt(ctx, out, poutlen, in, inlen);
usr.bin/openssl/pkeyutl.c
562
rv = EVP_PKEY_decrypt(ctx, out, poutlen, in, inlen);
usr.bin/openssl/pkeyutl.c
566
rv = EVP_PKEY_derive(ctx, out, poutlen);
usr.bin/openssl/pkeyutl.c
73
EVP_PKEY_CTX *ctx;
usr.bin/openssl/pkeyutl.c
95
static int do_keyop(EVP_PKEY_CTX * ctx, int pkey_op,
usr.bin/openssl/req.c
120
static int genpkey_cb(EVP_PKEY_CTX * ctx);
usr.bin/openssl/req.c
1716
genpkey_cb(EVP_PKEY_CTX * ctx)
usr.bin/openssl/req.c
1719
BIO *b = EVP_PKEY_CTX_get_app_data(ctx);
usr.bin/openssl/req.c
1721
p = EVP_PKEY_CTX_get_keygen_info(ctx, 0);
usr.bin/openssl/req.c
1736
do_sign_init(BIO * err, EVP_MD_CTX * ctx, EVP_PKEY * pkey,
usr.bin/openssl/req.c
1749
if (!EVP_DigestSignInit(ctx, &pkctx, md, NULL, pkey))
usr.bin/openssl/req.c
671
X509V3_CTX ctx;
usr.bin/openssl/req.c
672
X509V3_set_ctx_test(&ctx);
usr.bin/openssl/req.c
673
X509V3_set_nconf(&ctx, req_conf);
usr.bin/openssl/req.c
674
if (!X509V3_EXT_add_nconf(req_conf, &ctx, cfg.extensions, NULL)) {
usr.bin/openssl/req.c
682
X509V3_CTX ctx;
usr.bin/openssl/req.c
683
X509V3_set_ctx_test(&ctx);
usr.bin/openssl/req.c
684
X509V3_set_nconf(&ctx, addext_conf);
usr.bin/openssl/req.c
685
if (!X509V3_EXT_add_nconf(addext_conf, &ctx, "default", NULL)) {
usr.bin/openssl/req.c
723
X509V3_CTX ctx;
usr.bin/openssl/req.c
724
X509V3_set_ctx_test(&ctx);
usr.bin/openssl/req.c
725
X509V3_set_nconf(&ctx, req_conf);
usr.bin/openssl/req.c
726
if (!X509V3_EXT_add_nconf(req_conf, &ctx, cfg.req_exts, NULL)) {
usr.bin/openssl/s_cb.c
135
verify_callback(int ok, X509_STORE_CTX * ctx)
usr.bin/openssl/s_cb.c
140
err_cert = X509_STORE_CTX_get_current_cert(ctx);
usr.bin/openssl/s_cb.c
141
err = X509_STORE_CTX_get_error(ctx);
usr.bin/openssl/s_cb.c
142
depth = X509_STORE_CTX_get_error_depth(ctx);
usr.bin/openssl/s_cb.c
198
set_cert_stuff(SSL_CTX * ctx, char *cert_file, char *key_file)
usr.bin/openssl/s_cb.c
206
if (SSL_CTX_use_certificate_file(ctx, cert_file, SSL_FILETYPE_PEM) <= 0) {
usr.bin/openssl/s_cb.c
212
if (SSL_CTX_use_PrivateKey_file(ctx, key_file, SSL_FILETYPE_PEM) <= 0) {
usr.bin/openssl/s_cb.c
220
if (!SSL_CTX_check_private_key(ctx)) {
usr.bin/openssl/s_cb.c
230
set_cert_key_stuff(SSL_CTX * ctx, X509 * cert, EVP_PKEY * key)
usr.bin/openssl/s_cb.c
234
if (SSL_CTX_use_certificate(ctx, cert) <= 0) {
usr.bin/openssl/s_cb.c
239
if (SSL_CTX_use_PrivateKey(ctx, key) <= 0) {
usr.bin/openssl/s_cb.c
248
if (!SSL_CTX_check_private_key(ctx)) {
usr.bin/openssl/s_client.c
1010
SSL_CTX_set_alpn_protos(ctx, alpn, alpn_len);
usr.bin/openssl/s_client.c
1014
if (SSL_CTX_set1_groups_list(ctx, cfg.groups_in) != 1) {
usr.bin/openssl/s_client.c
1022
SSL_CTX_set_info_callback(ctx, apps_ssl_info_callback);
usr.bin/openssl/s_client.c
1024
if (!SSL_CTX_set_cipher_list(ctx, cfg.cipher)) {
usr.bin/openssl/s_client.c
1030
SSL_CTX_set_verify(ctx, cfg.verify, verify_callback);
usr.bin/openssl/s_client.c
1031
if (!set_cert_key_stuff(ctx, cert, key))
usr.bin/openssl/s_client.c
1035
&& !SSL_CTX_load_verify_locations(ctx, cfg.CAfile,
usr.bin/openssl/s_client.c
1039
if (!SSL_CTX_set_default_verify_paths(ctx))
usr.bin/openssl/s_client.c
1042
con = SSL_new(ctx);
usr.bin/openssl/s_client.c
1086
SSL_CTX_set_tlsext_servername_callback(ctx, ssl_servername_cb);
usr.bin/openssl/s_client.c
1087
SSL_CTX_set_tlsext_servername_arg(ctx, &tlsextcbp);
usr.bin/openssl/s_client.c
1160
SSL_CTX_set_tlsext_status_cb(ctx, ocsp_resp_cb);
usr.bin/openssl/s_client.c
1161
SSL_CTX_set_tlsext_status_arg(ctx, bio_c_out);
usr.bin/openssl/s_client.c
1641
SSL_CTX_free(ctx);
usr.bin/openssl/s_client.c
878
SSL_CTX *ctx = NULL;
usr.bin/openssl/s_client.c
973
ctx = SSL_CTX_new(cfg.meth);
usr.bin/openssl/s_client.c
974
if (ctx == NULL) {
usr.bin/openssl/s_client.c
979
SSL_CTX_clear_mode(ctx, SSL_MODE_AUTO_RETRY);
usr.bin/openssl/s_client.c
982
SSL_CTX_set1_param(ctx, cfg.vpm);
usr.bin/openssl/s_client.c
984
if (!SSL_CTX_set_min_proto_version(ctx, cfg.min_version))
usr.bin/openssl/s_client.c
986
if (!SSL_CTX_set_max_proto_version(ctx, cfg.max_version))
usr.bin/openssl/s_client.c
991
SSL_CTX_set_tlsext_use_srtp(ctx, cfg.srtp_profiles);
usr.bin/openssl/s_client.c
994
SSL_CTX_set_options(ctx, SSL_OP_ALL | cfg.off);
usr.bin/openssl/s_client.c
996
SSL_CTX_set_options(ctx, cfg.off);
usr.bin/openssl/s_client.c
999
SSL_CTX_clear_options(ctx, cfg.clr);
usr.bin/openssl/s_server.c
1150
ctx = SSL_CTX_new(cfg.meth);
usr.bin/openssl/s_server.c
1151
if (ctx == NULL) {
usr.bin/openssl/s_server.c
1156
SSL_CTX_clear_mode(ctx, SSL_MODE_AUTO_RETRY);
usr.bin/openssl/s_server.c
1158
if (!SSL_CTX_set_min_proto_version(ctx, cfg.min_version))
usr.bin/openssl/s_server.c
1160
if (!SSL_CTX_set_max_proto_version(ctx, cfg.max_version))
usr.bin/openssl/s_server.c
1170
if (!SSL_CTX_set_generate_session_id(ctx, generate_session_id)) {
usr.bin/openssl/s_server.c
1178
SSL_CTX_set_quiet_shutdown(ctx, 1);
usr.bin/openssl/s_server.c
1180
SSL_CTX_set_options(ctx, SSL_OP_ALL);
usr.bin/openssl/s_server.c
1181
SSL_CTX_set_options(ctx, cfg.off);
usr.bin/openssl/s_server.c
1184
SSL_CTX_set_info_callback(ctx, apps_ssl_info_callback);
usr.bin/openssl/s_server.c
1186
SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_OFF);
usr.bin/openssl/s_server.c
1188
SSL_CTX_sess_set_cache_size(ctx, 128);
usr.bin/openssl/s_server.c
1192
SSL_CTX_set_tlsext_use_srtp(ctx, cfg.srtp_profiles);
usr.bin/openssl/s_server.c
1195
if ((!SSL_CTX_load_verify_locations(ctx, cfg.CAfile,
usr.bin/openssl/s_server.c
1197
(!SSL_CTX_set_default_verify_paths(ctx))) {
usr.bin/openssl/s_server.c
1203
SSL_CTX_set1_param(ctx, cfg.vpm);
usr.bin/openssl/s_server.c
1262
SSL_CTX_set_alpn_select_cb(ctx, alpn_cb, &alpn_ctx);
usr.bin/openssl/s_server.c
1265
if (SSL_CTX_set1_groups_list(ctx, cfg.groups_in) != 1) {
usr.bin/openssl/s_server.c
1288
SSL_CTX_set_dh_auto(ctx, 1);
usr.bin/openssl/s_server.c
1289
else if (!SSL_CTX_set_tmp_dh(ctx, dh)) {
usr.bin/openssl/s_server.c
1344
SSL_CTX_set_tmp_ecdh(ctx, ecdh);
usr.bin/openssl/s_server.c
1350
if (!set_cert_key_stuff(ctx, s_cert, s_key))
usr.bin/openssl/s_server.c
1355
if (!set_cert_key_stuff(ctx, s_dcert, s_dkey))
usr.bin/openssl/s_server.c
1360
if (!SSL_CTX_set_cipher_list(ctx, cfg.cipher)) {
usr.bin/openssl/s_server.c
1372
SSL_CTX_set_verify(ctx, cfg.server_verify, verify_callback);
usr.bin/openssl/s_server.c
1373
SSL_CTX_set_session_id_context(ctx,
usr.bin/openssl/s_server.c
1378
SSL_CTX_set_cookie_generate_cb(ctx, generate_cookie_callback);
usr.bin/openssl/s_server.c
1379
SSL_CTX_set_cookie_verify_cb(ctx, verify_cookie_callback);
usr.bin/openssl/s_server.c
1392
SSL_CTX_set_tlsext_servername_callback(ctx, ssl_servername_cb);
usr.bin/openssl/s_server.c
1393
SSL_CTX_set_tlsext_servername_arg(ctx,
usr.bin/openssl/s_server.c
1398
SSL_CTX_set_client_CA_list(ctx,
usr.bin/openssl/s_server.c
1414
print_stats(bio_s_out, ctx);
usr.bin/openssl/s_server.c
1417
SSL_CTX_free(ctx);
usr.bin/openssl/s_server.c
1493
con = SSL_new(ctx);
usr.bin/openssl/s_server.c
1499
SSL_CTX_set_tlsext_status_cb(ctx, cert_status_cb);
usr.bin/openssl/s_server.c
1501
SSL_CTX_set_tlsext_status_arg(ctx,
usr.bin/openssl/s_server.c
179
static void print_stats(BIO *bp, SSL_CTX *ctx);
usr.bin/openssl/s_server.c
1923
if ((con = SSL_new(ctx)) == NULL)
usr.bin/openssl/s_server.c
203
static SSL_CTX *ctx = NULL;
usr.bin/openssl/s_server.c
973
ctx = NULL;
usr.bin/openssl/speed.c
1839
GCM128_CONTEXT *ctx = CRYPTO_gcm128_new(&aes_ks1, (block128_f) AES_encrypt);
usr.bin/openssl/speed.c
1840
CRYPTO_gcm128_setiv(ctx, (unsigned char *) "0123456789ab", 12);
usr.bin/openssl/speed.c
1846
CRYPTO_gcm128_aad(ctx, buf, lengths[j]);
usr.bin/openssl/speed.c
1850
CRYPTO_gcm128_release(ctx);
usr.bin/openssl/speed.c
1856
EVP_AEAD_CTX *ctx;
usr.bin/openssl/speed.c
1858
if ((ctx = EVP_AEAD_CTX_new()) == NULL) {
usr.bin/openssl/speed.c
1864
EVP_AEAD_CTX_init(ctx, aead, key32, EVP_AEAD_key_length(aead),
usr.bin/openssl/speed.c
1872
EVP_AEAD_CTX_seal(ctx, buf, &buf_len, BUFSIZE, nonce,
usr.bin/openssl/speed.c
1877
EVP_AEAD_CTX_free(ctx);
usr.bin/openssl/speed.c
1884
EVP_AEAD_CTX *ctx;
usr.bin/openssl/speed.c
1886
if ((ctx = EVP_AEAD_CTX_new()) == NULL) {
usr.bin/openssl/speed.c
1892
EVP_AEAD_CTX_init(ctx, aead, key32, EVP_AEAD_key_length(aead),
usr.bin/openssl/speed.c
1900
EVP_AEAD_CTX_seal(ctx, buf, &buf_len, BUFSIZE, nonce,
usr.bin/openssl/speed.c
1905
EVP_AEAD_CTX_free(ctx);
usr.bin/openssl/speed.c
1913
EVP_AEAD_CTX *ctx;
usr.bin/openssl/speed.c
1915
if ((ctx = EVP_AEAD_CTX_new()) == NULL) {
usr.bin/openssl/speed.c
1921
EVP_AEAD_CTX_init(ctx, aead, key32, EVP_AEAD_key_length(aead),
usr.bin/openssl/speed.c
1929
EVP_AEAD_CTX_seal(ctx, buf, &buf_len, BUFSIZE, nonce,
usr.bin/openssl/speed.c
1934
EVP_AEAD_CTX_free(ctx);
usr.bin/openssl/speed.c
2035
EVP_CIPHER_CTX *ctx;
usr.bin/openssl/speed.c
2047
if ((ctx = EVP_CIPHER_CTX_new()) == NULL) {
usr.bin/openssl/speed.c
2053
EVP_DecryptInit_ex(ctx, evp_cipher, NULL, key16, iv);
usr.bin/openssl/speed.c
2055
EVP_EncryptInit_ex(ctx, evp_cipher, NULL, key16, iv);
usr.bin/openssl/speed.c
2056
EVP_CIPHER_CTX_set_padding(ctx, 0);
usr.bin/openssl/speed.c
2061
EVP_DecryptUpdate(ctx, buf, &outl, buf, lengths[j]);
usr.bin/openssl/speed.c
2064
EVP_EncryptUpdate(ctx, buf, &outl, buf, lengths[j]);
usr.bin/openssl/speed.c
2066
EVP_DecryptFinal_ex(ctx, buf, &outl);
usr.bin/openssl/speed.c
2068
EVP_EncryptFinal_ex(ctx, buf, &outl);
usr.bin/openssl/speed.c
2070
EVP_CIPHER_CTX_free(ctx);
usr.bin/openssl/ts.c
102
static ASN1_INTEGER *serial_cb(TS_RESP_CTX *ctx, void *data);
usr.bin/openssl/ts.c
1110
TS_VERIFY_CTX *ctx = NULL;
usr.bin/openssl/ts.c
1118
if ((ctx = TS_VERIFY_CTX_new()) == NULL)
usr.bin/openssl/ts.c
112
static int verify_cb(int ok, X509_STORE_CTX *ctx);
usr.bin/openssl/ts.c
1120
TS_VERIFY_CTX_set_flags(ctx, TS_VFY_VERSION | TS_VFY_SIGNER);
usr.bin/openssl/ts.c
1124
TS_VERIFY_CTX_add_flags(ctx, TS_VFY_DATA);
usr.bin/openssl/ts.c
1127
TS_VERIFY_CTX_set_data(ctx, data_bio);
usr.bin/openssl/ts.c
1132
TS_VERIFY_CTX_add_flags(ctx, TS_VFY_IMPRINT);
usr.bin/openssl/ts.c
1138
TS_VERIFY_CTX_set_imprint(ctx, imprint, imprint_len);
usr.bin/openssl/ts.c
1149
if ((ctx = TS_REQ_to_TS_VERIFY_CTX(request, NULL)) == NULL)
usr.bin/openssl/ts.c
1155
TS_VERIFY_CTX_add_flags(ctx, TS_VFY_SIGNATURE);
usr.bin/openssl/ts.c
1160
TS_VERIFY_CTX_set_store(ctx, store);
usr.bin/openssl/ts.c
1166
TS_VERIFY_CTX_set_certs(ctx, certs);
usr.bin/openssl/ts.c
1172
TS_VERIFY_CTX_free(ctx);
usr.bin/openssl/ts.c
1173
ctx = NULL;
usr.bin/openssl/ts.c
1177
return ctx;
usr.bin/openssl/ts.c
1229
verify_cb(int ok, X509_STORE_CTX *ctx)
usr.bin/openssl/ts.c
972
serial_cb(TS_RESP_CTX *ctx, void *data)
usr.bin/openssl/ts.c
978
TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION,
usr.bin/openssl/ts.c
981
TS_RESP_CTX_add_failure_info(ctx,
usr.bin/openssl/verify.c
367
check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain,
usr.bin/openssl/verify.c
382
X509_STORE_set_flags(ctx, vflags);
usr.bin/openssl/verify.c
383
if (!X509_STORE_CTX_init(csc, ctx, x, uchain))
usr.bin/openssl/verify.c
411
cb(int ok, X509_STORE_CTX *ctx)
usr.bin/openssl/verify.c
413
int cert_error = X509_STORE_CTX_get_error(ctx);
usr.bin/openssl/verify.c
414
X509 *current_cert = X509_STORE_CTX_get_current_cert(ctx);
usr.bin/openssl/verify.c
424
X509_STORE_CTX_get0_parent_ctx(ctx) ? "[CRL path]" : "",
usr.bin/openssl/verify.c
426
X509_STORE_CTX_get_error_depth(ctx),
usr.bin/openssl/verify.c
71
static int cb(int ok, X509_STORE_CTX *ctx);
usr.bin/openssl/verify.c
72
static int check(X509_STORE *ctx, char *file, STACK_OF(X509) *uchain,
usr.bin/openssl/x509.c
1228
if (!x509_certify(ctx, cfg.CAfile, cfg.digest,
usr.bin/openssl/x509.c
1316
X509_STORE_free(ctx);
usr.bin/openssl/x509.c
1378
x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest, X509 *x,
usr.bin/openssl/x509.c
1395
if (!X509_STORE_CTX_init(xsc, ctx, x, NULL)) {
usr.bin/openssl/x509.c
1467
callb(int ok, X509_STORE_CTX *ctx)
usr.bin/openssl/x509.c
1477
err = X509_STORE_CTX_get_error(ctx);
usr.bin/openssl/x509.c
1491
err_cert = X509_STORE_CTX_get_current_cert(ctx);
usr.bin/openssl/x509.c
1495
err, X509_STORE_CTX_get_error_depth(ctx),
usr.bin/openssl/x509.c
1649
X509V3_CTX ctx;
usr.bin/openssl/x509.c
1653
X509V3_set_ctx(&ctx, x, x, NULL, NULL, 0);
usr.bin/openssl/x509.c
1654
X509V3_set_nconf(&ctx, conf);
usr.bin/openssl/x509.c
1655
if (!X509V3_EXT_add_nconf(conf, &ctx, section, x))
usr.bin/openssl/x509.c
790
X509_STORE *ctx = NULL;
usr.bin/openssl/x509.c
809
ctx = X509_STORE_new();
usr.bin/openssl/x509.c
810
if (ctx == NULL)
usr.bin/openssl/x509.c
812
X509_STORE_set_verify_cb(ctx, callb);
usr.bin/openssl/x509.c
82
static int callb(int ok, X509_STORE_CTX *ctx);
usr.bin/openssl/x509.c
839
if (!X509_STORE_set_default_paths(ctx)) {
usr.bin/openssl/x509.c
86
static int x509_certify(X509_STORE *ctx, char *CAfile, const EVP_MD *digest,
usr.bin/pkgconf/libpkgconf/pkg.c
1396
pkgconf_pkg_scan_provides_entry(const pkgconf_pkg_t *pkg, const pkgconf_pkg_scan_providers_ctx_t *ctx)
usr.bin/pkgconf/libpkgconf/pkg.c
1398
const pkgconf_dependency_t *pkgdep = ctx->pkgdep;
usr.bin/pkgconf/libpkgconf/pkg.c
1420
pkgconf_pkg_scan_providers_ctx_t ctx = {
usr.bin/pkgconf/libpkgconf/pkg.c
1424
pkg = pkgconf_scan_all(client, &ctx, (pkgconf_pkg_iteration_func_t) pkgconf_pkg_scan_provides_entry);
usr.bin/rsync/blocks.c
290
hash_file_buf(&st->ctx, st->map + last, sz + blk->len);
usr.bin/rsync/blocks.c
315
hash_file_buf(&st->ctx, st->map + last, sz);
usr.bin/rsync/downloader.c
128
MD4_Init(&p->ctx);
usr.bin/rsync/downloader.c
134
MD4_Update(&p->ctx, &seed, sizeof(int32_t));
usr.bin/rsync/downloader.c
476
MD4_Update(&p->ctx, buf, sz);
usr.bin/rsync/downloader.c
515
MD4_Update(&p->ctx, buf, sz);
usr.bin/rsync/downloader.c
544
MD4_Final(ourmd, &p->ctx);
usr.bin/rsync/downloader.c
61
MD4_CTX ctx; /* current hashing context */
usr.bin/rsync/extern.h
220
MD4_CTX ctx; /* context for hash_file */
usr.bin/rsync/hash.c
101
MD4_Final(md, ctx);
usr.bin/rsync/hash.c
70
MD4_CTX ctx;
usr.bin/rsync/hash.c
73
MD4_Init(&ctx);
usr.bin/rsync/hash.c
74
MD4_Update(&ctx, buf, len);
usr.bin/rsync/hash.c
75
MD4_Update(&ctx, (unsigned char *)&seed, sizeof(int32_t));
usr.bin/rsync/hash.c
76
MD4_Final(md, &ctx);
usr.bin/rsync/hash.c
85
hash_file_start(MD4_CTX *ctx, const struct sess *sess)
usr.bin/rsync/hash.c
89
MD4_Init(ctx);
usr.bin/rsync/hash.c
90
MD4_Update(ctx, (unsigned char *)&seed, sizeof(int32_t));
usr.bin/rsync/hash.c
94
hash_file_buf(MD4_CTX *ctx, const void *buf, size_t len)
usr.bin/rsync/hash.c
96
MD4_Update(ctx, buf, len);
usr.bin/rsync/hash.c
99
hash_file_final(MD4_CTX *ctx, unsigned char *md)
usr.bin/rsync/sender.c
162
hash_file_final(&up->stat.ctx, fmd);
usr.bin/rsync/sender.c
623
hash_file_start(&up.stat.ctx, sess);
usr.bin/signify/crypto_api.c
17
SHA2_CTX ctx;
usr.bin/signify/crypto_api.c
19
SHA512Init(&ctx);
usr.bin/signify/crypto_api.c
20
SHA512Update(&ctx, in, inlen);
usr.bin/signify/crypto_api.c
21
SHA512Final(out, &ctx);
usr.bin/signify/signify.c
312
SHA2_CTX ctx;
usr.bin/signify/signify.c
318
SHA512Init(&ctx);
usr.bin/signify/signify.c
319
SHA512Update(&ctx, enckey.seckey, sizeof(enckey.seckey));
usr.bin/signify/signify.c
320
SHA512Final(digest, &ctx);
usr.bin/signify/signify.c
394
SHA2_CTX ctx;
usr.bin/signify/signify.c
419
SHA512Init(&ctx);
usr.bin/signify/signify.c
420
SHA512Update(&ctx, enckey.seckey, sizeof(enckey.seckey));
usr.bin/signify/signify.c
421
SHA512Final(digest, &ctx);
usr.bin/sndiod/dsp.c
316
adata_t *ctxbuf, *ctx;
usr.bin/sndiod/dsp.c
330
ctxbuf = p->ctx;
usr.bin/sndiod/dsp.c
347
ctx = ctxbuf + ctx_start;
usr.bin/sndiod/dsp.c
349
*ctx = *idata++;
usr.bin/sndiod/dsp.c
350
ctx += RESAMP_NCTX;
usr.bin/sndiod/dsp.c
370
ctx = ctxbuf;
usr.bin/sndiod/dsp.c
372
f[c] += (int64_t)ctx[n] * s;
usr.bin/sndiod/dsp.c
373
ctx += RESAMP_NCTX;
usr.bin/sndiod/dsp.c
459
memset(p->ctx, 0, sizeof(p->ctx));
usr.bin/sndiod/dsp.h
85
adata_t ctx[NCHAN_MAX * RESAMP_NCTX];
usr.bin/snmp/usm.c
255
EVP_CIPHER_CTX *ctx;
usr.bin/snmp/usm.c
282
if ((ctx = EVP_CIPHER_CTX_new()) == NULL)
usr.bin/snmp/usm.c
285
if (!EVP_CipherInit(ctx, cipher, key, iv, do_enc)) {
usr.bin/snmp/usm.c
286
EVP_CIPHER_CTX_free(ctx);
usr.bin/snmp/usm.c
290
EVP_CIPHER_CTX_set_padding(ctx, do_enc);
usr.bin/snmp/usm.c
297
EVP_CIPHER_CTX_free(ctx);
usr.bin/snmp/usm.c
301
if (EVP_CipherUpdate(ctx, outtext, &len, serialpdu, pdulen) &&
usr.bin/snmp/usm.c
302
EVP_CipherFinal_ex(ctx, outtext + len, &len2))
usr.bin/snmp/usm.c
309
EVP_CIPHER_CTX_free(ctx);
usr.bin/snmp/usm.c
625
EVP_MD_CTX *ctx;
usr.bin/snmp/usm.c
633
if ((ctx = EVP_MD_CTX_new()) == NULL)
usr.bin/snmp/usm.c
635
if (!EVP_DigestInit_ex(ctx, md, NULL)) {
usr.bin/snmp/usm.c
636
EVP_MD_CTX_free(ctx);
usr.bin/snmp/usm.c
648
if (!EVP_DigestUpdate(ctx, keybuf, 64)) {
usr.bin/snmp/usm.c
649
EVP_MD_CTX_free(ctx);
usr.bin/snmp/usm.c
653
if (!EVP_DigestFinal_ex(ctx, keybuf, &dlen)) {
usr.bin/snmp/usm.c
654
EVP_MD_CTX_free(ctx);
usr.bin/snmp/usm.c
657
EVP_MD_CTX_free(ctx);
usr.bin/snmp/usm.c
668
EVP_MD_CTX *ctx;
usr.bin/snmp/usm.c
673
if ((ctx = EVP_MD_CTX_new()) == NULL)
usr.bin/snmp/usm.c
676
if (!EVP_DigestInit_ex(ctx, md, NULL) ||
usr.bin/snmp/usm.c
677
!EVP_DigestUpdate(ctx, mkey, EVP_MD_size(md)) ||
usr.bin/snmp/usm.c
678
!EVP_DigestUpdate(ctx, usm->engineid, usm->engineidlen) ||
usr.bin/snmp/usm.c
679
!EVP_DigestUpdate(ctx, mkey, EVP_MD_size(md)) ||
usr.bin/snmp/usm.c
680
!EVP_DigestFinal_ex(ctx, buf, &lklen)) {
usr.bin/snmp/usm.c
681
EVP_MD_CTX_free(ctx);
usr.bin/snmp/usm.c
685
EVP_MD_CTX_free(ctx);
usr.bin/ssh/auth-bsdauth.c
115
bsdauth_free_ctx(void *ctx)
usr.bin/ssh/auth-bsdauth.c
117
Authctxt *authctxt = ctx;
usr.bin/ssh/auth-bsdauth.c
48
bsdauth_query(void *ctx, char **name, char **infotxt,
usr.bin/ssh/auth-bsdauth.c
51
Authctxt *authctxt = ctx;
usr.bin/ssh/auth-bsdauth.c
93
bsdauth_respond(void *ctx, u_int numresponses, char **responses)
usr.bin/ssh/auth-bsdauth.c
95
Authctxt *authctxt = ctx;
usr.bin/ssh/auth.h
120
int (*query)(void *ctx, char **name, char **infotxt,
usr.bin/ssh/auth.h
122
int (*respond)(void *ctx, u_int numresp, char **responses);
usr.bin/ssh/auth.h
123
void (*free_ctx)(void *ctx);
usr.bin/ssh/channels.c
1211
channel_confirm_cb *cb, channel_confirm_abandon_cb *abandon_cb, void *ctx)
usr.bin/ssh/channels.c
1222
cc->ctx = ctx;
usr.bin/ssh/channels.c
1228
channel_open_fn *fn, void *ctx)
usr.bin/ssh/channels.c
1237
c->open_confirm_ctx = ctx;
usr.bin/ssh/channels.c
1269
channel_outfilter_fn *ofn, channel_filter_cleanup_fn *cfn, void *ctx)
usr.bin/ssh/channels.c
1279
c->filter_ctx = ctx;
usr.bin/ssh/channels.c
3750
cc->cb(ssh, type, c, cc->ctx);
usr.bin/ssh/channels.c
810
cc->abandon_cb(ssh, c, cc->ctx);
usr.bin/ssh/channels.h
107
void *ctx;
usr.bin/ssh/cipher-chachapoly-libcrypto.c
110
if (!EVP_CipherInit(ctx->header_evp, NULL, NULL, seqbuf, 1) ||
usr.bin/ssh/cipher-chachapoly-libcrypto.c
111
EVP_Cipher(ctx->header_evp, dest, src, aadlen) < 0) {
usr.bin/ssh/cipher-chachapoly-libcrypto.c
119
if (!EVP_CipherInit(ctx->main_evp, NULL, NULL, seqbuf, 1) ||
usr.bin/ssh/cipher-chachapoly-libcrypto.c
120
EVP_Cipher(ctx->main_evp, dest + aadlen, src + aadlen, len) < 0) {
usr.bin/ssh/cipher-chachapoly-libcrypto.c
140
chachapoly_get_length(struct chachapoly_ctx *ctx,
usr.bin/ssh/cipher-chachapoly-libcrypto.c
149
if (!EVP_CipherInit(ctx->header_evp, NULL, NULL, seqbuf, 0))
usr.bin/ssh/cipher-chachapoly-libcrypto.c
151
if (EVP_Cipher(ctx->header_evp, buf, (u_char *)cp, sizeof(buf)) < 0)
usr.bin/ssh/cipher-chachapoly-libcrypto.c
35
struct chachapoly_ctx *ctx;
usr.bin/ssh/cipher-chachapoly-libcrypto.c
39
if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
usr.bin/ssh/cipher-chachapoly-libcrypto.c
41
if ((ctx->main_evp = EVP_CIPHER_CTX_new()) == NULL ||
usr.bin/ssh/cipher-chachapoly-libcrypto.c
42
(ctx->header_evp = EVP_CIPHER_CTX_new()) == NULL)
usr.bin/ssh/cipher-chachapoly-libcrypto.c
44
if (!EVP_CipherInit(ctx->main_evp, EVP_chacha20(), key, NULL, 1))
usr.bin/ssh/cipher-chachapoly-libcrypto.c
46
if (!EVP_CipherInit(ctx->header_evp, EVP_chacha20(), key + 32, NULL, 1))
usr.bin/ssh/cipher-chachapoly-libcrypto.c
48
if (EVP_CIPHER_CTX_iv_length(ctx->header_evp) != 16)
usr.bin/ssh/cipher-chachapoly-libcrypto.c
50
return ctx;
usr.bin/ssh/cipher-chachapoly-libcrypto.c
52
chachapoly_free(ctx);
usr.bin/ssh/cipher-chachapoly-libcrypto.c
76
chachapoly_crypt(struct chachapoly_ctx *ctx, u_int seqnr, u_char *dest,
usr.bin/ssh/cipher-chachapoly-libcrypto.c
90
if (!EVP_CipherInit(ctx->main_evp, NULL, NULL, seqbuf, 1) ||
usr.bin/ssh/cipher-chachapoly-libcrypto.c
91
EVP_Cipher(ctx->main_evp, poly_key,
usr.bin/ssh/cipher-chachapoly.c
117
chachapoly_get_length(struct chachapoly_ctx *ctx,
usr.bin/ssh/cipher-chachapoly.c
125
chacha_ivsetup(&ctx->header_ctx, seqbuf, NULL);
usr.bin/ssh/cipher-chachapoly.c
126
chacha_encrypt_bytes(&ctx->header_ctx, cp, buf, 4);
usr.bin/ssh/cipher-chachapoly.c
35
struct chachapoly_ctx *ctx;
usr.bin/ssh/cipher-chachapoly.c
39
if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
usr.bin/ssh/cipher-chachapoly.c
41
chacha_keysetup(&ctx->main_ctx, key, 256);
usr.bin/ssh/cipher-chachapoly.c
42
chacha_keysetup(&ctx->header_ctx, key + 32, 256);
usr.bin/ssh/cipher-chachapoly.c
43
return ctx;
usr.bin/ssh/cipher-chachapoly.c
62
chachapoly_crypt(struct chachapoly_ctx *ctx, u_int seqnr, u_char *dest,
usr.bin/ssh/cipher-chachapoly.c
76
chacha_ivsetup(&ctx->main_ctx, seqbuf, NULL);
usr.bin/ssh/cipher-chachapoly.c
77
chacha_encrypt_bytes(&ctx->main_ctx,
usr.bin/ssh/cipher-chachapoly.c
93
chacha_ivsetup(&ctx->header_ctx, seqbuf, NULL);
usr.bin/ssh/cipher-chachapoly.c
94
chacha_encrypt_bytes(&ctx->header_ctx, src, dest, aadlen);
usr.bin/ssh/cipher-chachapoly.c
98
chacha_ivsetup(&ctx->main_ctx, seqbuf, one);
usr.bin/ssh/cipher-chachapoly.c
99
chacha_encrypt_bytes(&ctx->main_ctx, src + aadlen,
usr.bin/ssh/clientloop.c
1418
client_filter_cleanup(struct ssh *ssh, int cid, void *ctx)
usr.bin/ssh/clientloop.c
1420
free(ctx);
usr.bin/ssh/clientloop.c
175
void *ctx;
usr.bin/ssh/clientloop.c
2058
hostkeys_update_ctx_free(struct hostkeys_update_ctx *ctx)
usr.bin/ssh/clientloop.c
2062
if (ctx == NULL)
usr.bin/ssh/clientloop.c
2064
for (i = 0; i < ctx->nkeys; i++)
usr.bin/ssh/clientloop.c
2065
sshkey_free(ctx->keys[i]);
usr.bin/ssh/clientloop.c
2066
free(ctx->keys);
usr.bin/ssh/clientloop.c
2067
free(ctx->keys_match);
usr.bin/ssh/clientloop.c
2068
free(ctx->keys_verified);
usr.bin/ssh/clientloop.c
2069
for (i = 0; i < ctx->nold; i++)
usr.bin/ssh/clientloop.c
2070
sshkey_free(ctx->old_keys[i]);
usr.bin/ssh/clientloop.c
2071
free(ctx->old_keys);
usr.bin/ssh/clientloop.c
2072
free(ctx->host_str);
usr.bin/ssh/clientloop.c
2073
free(ctx->ip_str);
usr.bin/ssh/clientloop.c
2074
free(ctx);
usr.bin/ssh/clientloop.c
2104
struct hostkeys_update_ctx *ctx = (struct hostkeys_update_ctx *)_ctx;
usr.bin/ssh/clientloop.c
2112
for (i = 0; i < ctx->nkeys; i++) {
usr.bin/ssh/clientloop.c
2113
if (sshkey_equal(l->key, ctx->keys[i])) {
usr.bin/ssh/clientloop.c
2114
ctx->other_name_seen = 1;
usr.bin/ssh/clientloop.c
2117
sshkey_ssh_name(ctx->keys[i]),
usr.bin/ssh/clientloop.c
2129
ctx->complex_hostspec = 1;
usr.bin/ssh/clientloop.c
2134
if (ctx->ip_str != NULL && strchr(l->hosts, ',') != NULL) {
usr.bin/ssh/clientloop.c
2137
ctx->other_name_seen = 1;
usr.bin/ssh/clientloop.c
2139
"at %s:%ld", ctx->ip_str, l->path, l->linenum);
usr.bin/ssh/clientloop.c
2143
ctx->other_name_seen = 1;
usr.bin/ssh/clientloop.c
2145
"at %s:%ld", ctx->host_str, l->path, l->linenum);
usr.bin/ssh/clientloop.c
2156
ctx->complex_hostspec = 1;
usr.bin/ssh/clientloop.c
2161
for (i = 0; i < ctx->nkeys; i++) {
usr.bin/ssh/clientloop.c
2162
if (!sshkey_equal(l->key, ctx->keys[i]))
usr.bin/ssh/clientloop.c
2165
sshkey_ssh_name(ctx->keys[i]), l->path, l->linenum);
usr.bin/ssh/clientloop.c
2166
ctx->keys_match[i] |= l->match;
usr.bin/ssh/clientloop.c
2172
if ((tmp = recallocarray(ctx->old_keys, ctx->nold, ctx->nold + 1,
usr.bin/ssh/clientloop.c
2173
sizeof(*ctx->old_keys))) == NULL)
usr.bin/ssh/clientloop.c
2174
fatal_f("recallocarray failed nold = %zu", ctx->nold);
usr.bin/ssh/clientloop.c
2175
ctx->old_keys = tmp;
usr.bin/ssh/clientloop.c
2176
ctx->old_keys[ctx->nold++] = l->key;
usr.bin/ssh/clientloop.c
2186
struct hostkeys_update_ctx *ctx = (struct hostkeys_update_ctx *)_ctx;
usr.bin/ssh/clientloop.c
2195
for (i = 0; i < ctx->nold; i++) {
usr.bin/ssh/clientloop.c
2196
if (!sshkey_equal(l->key, ctx->old_keys[i]))
usr.bin/ssh/clientloop.c
2199
sshkey_ssh_name(ctx->old_keys[i]), l->path, l->linenum,
usr.bin/ssh/clientloop.c
2201
ctx->old_key_seen = 1;
usr.bin/ssh/clientloop.c
2213
check_old_keys_othernames(struct hostkeys_update_ctx *ctx)
usr.bin/ssh/clientloop.c
2218
debug2_f("checking for %zu deprecated keys", ctx->nold);
usr.bin/ssh/clientloop.c
2221
options.user_hostfiles[i], ctx->host_str,
usr.bin/ssh/clientloop.c
2222
ctx->ip_str ? ctx->ip_str : "(none)");
usr.bin/ssh/clientloop.c
2224
hostkeys_check_old, ctx, ctx->host_str, ctx->ip_str,
usr.bin/ssh/clientloop.c
2248
update_known_hosts(struct hostkeys_update_ctx *ctx)
usr.bin/ssh/clientloop.c
2257
for (i = 0; i < ctx->nkeys; i++) {
usr.bin/ssh/clientloop.c
2258
if (!ctx->keys_verified[i])
usr.bin/ssh/clientloop.c
2260
if ((fp = sshkey_fingerprint(ctx->keys[i],
usr.bin/ssh/clientloop.c
2266
sshkey_type(ctx->keys[i]), fp);
usr.bin/ssh/clientloop.c
2270
for (i = 0; i < ctx->nold; i++) {
usr.bin/ssh/clientloop.c
2271
if ((fp = sshkey_fingerprint(ctx->old_keys[i],
usr.bin/ssh/clientloop.c
2277
sshkey_type(ctx->old_keys[i]), fp);
usr.bin/ssh/clientloop.c
2332
ctx->host_str, ctx->ip_str,
usr.bin/ssh/clientloop.c
2333
i == 0 ? ctx->keys : NULL, i == 0 ? ctx->nkeys : 0,
usr.bin/ssh/clientloop.c
2346
struct hostkeys_update_ctx *ctx = (struct hostkeys_update_ctx *)_ctx;
usr.bin/ssh/clientloop.c
2355
if (ctx->nnew == 0)
usr.bin/ssh/clientloop.c
2360
hostkeys_update_ctx_free(ctx);
usr.bin/ssh/clientloop.c
2373
for (ndone = i = 0; i < ctx->nkeys; i++) {
usr.bin/ssh/clientloop.c
2374
if (ctx->keys_match[i])
usr.bin/ssh/clientloop.c
2376
plaintype = sshkey_type_plain(ctx->keys[i]->type);
usr.bin/ssh/clientloop.c
2383
(r = sshkey_puts(ctx->keys[i], signdata)) != 0)
usr.bin/ssh/clientloop.c
2392
"for %s key %zu", sshkey_type(ctx->keys[i]), i);
usr.bin/ssh/clientloop.c
2406
sshkey_free(ctx->keys[i]);
usr.bin/ssh/clientloop.c
2407
ctx->keys[i] = NULL;
usr.bin/ssh/clientloop.c
2412
sshkey_type(ctx->keys[i]), i, alg);
usr.bin/ssh/clientloop.c
2414
if ((r = sshkey_verify(ctx->keys[i], sig, siglen,
usr.bin/ssh/clientloop.c
2418
sshkey_type(ctx->keys[i]), i);
usr.bin/ssh/clientloop.c
2422
ctx->keys_verified[i] = 1;
usr.bin/ssh/clientloop.c
2426
if (ndone != ctx->nnew)
usr.bin/ssh/clientloop.c
2427
fatal_f("ndone != ctx->nnew (%zu / %zu)", ndone, ctx->nnew);
usr.bin/ssh/clientloop.c
2434
update_known_hosts(ctx);
usr.bin/ssh/clientloop.c
2437
hostkeys_update_ctx_free(ctx);
usr.bin/ssh/clientloop.c
2458
struct hostkeys_update_ctx *ctx = NULL;
usr.bin/ssh/clientloop.c
2467
ctx = xcalloc(1, sizeof(*ctx));
usr.bin/ssh/clientloop.c
2498
for (i = 0; i < ctx->nkeys; i++) {
usr.bin/ssh/clientloop.c
2499
if (sshkey_equal(key, ctx->keys[i])) {
usr.bin/ssh/clientloop.c
2506
if ((tmp = recallocarray(ctx->keys, ctx->nkeys, ctx->nkeys + 1,
usr.bin/ssh/clientloop.c
2507
sizeof(*ctx->keys))) == NULL)
usr.bin/ssh/clientloop.c
2509
ctx->nkeys);
usr.bin/ssh/clientloop.c
2510
ctx->keys = tmp;
usr.bin/ssh/clientloop.c
2511
ctx->keys[ctx->nkeys++] = key;
usr.bin/ssh/clientloop.c
2515
if (ctx->nkeys == 0) {
usr.bin/ssh/clientloop.c
2520
if ((ctx->keys_match = calloc(ctx->nkeys,
usr.bin/ssh/clientloop.c
2521
sizeof(*ctx->keys_match))) == NULL ||
usr.bin/ssh/clientloop.c
2522
(ctx->keys_verified = calloc(ctx->nkeys,
usr.bin/ssh/clientloop.c
2523
sizeof(*ctx->keys_verified))) == NULL)
usr.bin/ssh/clientloop.c
2528
options.port, &ctx->host_str,
usr.bin/ssh/clientloop.c
2529
options.check_host_ip ? &ctx->ip_str : NULL);
usr.bin/ssh/clientloop.c
2534
options.user_hostfiles[i], ctx->host_str,
usr.bin/ssh/clientloop.c
2535
ctx->ip_str ? ctx->ip_str : "(none)");
usr.bin/ssh/clientloop.c
2537
hostkeys_find, ctx, ctx->host_str, ctx->ip_str,
usr.bin/ssh/clientloop.c
2551
ctx->nnew = ctx->nincomplete = 0;
usr.bin/ssh/clientloop.c
2553
for (i = 0; i < ctx->nkeys; i++) {
usr.bin/ssh/clientloop.c
2554
if (ctx->keys_match[i] == 0)
usr.bin/ssh/clientloop.c
2555
ctx->nnew++;
usr.bin/ssh/clientloop.c
2556
if ((ctx->keys_match[i] & want) != want)
usr.bin/ssh/clientloop.c
2557
ctx->nincomplete++;
usr.bin/ssh/clientloop.c
2561
"%zu incomplete match. %zu to remove", ctx->nkeys, ctx->nnew,
usr.bin/ssh/clientloop.c
2562
ctx->nkeys - ctx->nnew - ctx->nincomplete,
usr.bin/ssh/clientloop.c
2563
ctx->nincomplete, ctx->nold);
usr.bin/ssh/clientloop.c
2565
if (ctx->nnew == 0 && ctx->nold == 0) {
usr.bin/ssh/clientloop.c
2571
if (ctx->complex_hostspec) {
usr.bin/ssh/clientloop.c
2576
if (ctx->other_name_seen) {
usr.bin/ssh/clientloop.c
2588
if (ctx->nold != 0) {
usr.bin/ssh/clientloop.c
2589
if (check_old_keys_othernames(ctx) != 0)
usr.bin/ssh/clientloop.c
2591
if (ctx->old_key_seen) {
usr.bin/ssh/clientloop.c
2594
ctx->host_str, ctx->ip_str == NULL ? "" : ",",
usr.bin/ssh/clientloop.c
2595
ctx->ip_str == NULL ? "" : ctx->ip_str);
usr.bin/ssh/clientloop.c
2600
if (ctx->nnew == 0) {
usr.bin/ssh/clientloop.c
2606
update_known_hosts(ctx);
usr.bin/ssh/clientloop.c
2613
debug3_f("asking server to prove ownership for %zu keys", ctx->nnew);
usr.bin/ssh/clientloop.c
2621
for (i = 0; i < ctx->nkeys; i++) {
usr.bin/ssh/clientloop.c
2622
if (ctx->keys_match[i])
usr.bin/ssh/clientloop.c
2625
if ((r = sshkey_putb(ctx->keys[i], buf)) != 0 ||
usr.bin/ssh/clientloop.c
2632
client_global_hostkeys_prove_confirm, ctx);
usr.bin/ssh/clientloop.c
2633
ctx = NULL; /* will be freed in callback */
usr.bin/ssh/clientloop.c
2638
hostkeys_update_ctx_free(ctx);
usr.bin/ssh/clientloop.c
470
gc->cb(ssh, type, seq, gc->ctx);
usr.bin/ssh/clientloop.c
808
client_status_confirm(struct ssh *ssh, int type, Channel *c, void *ctx)
usr.bin/ssh/clientloop.c
810
struct channel_reply_ctx *cr = (struct channel_reply_ctx *)ctx;
usr.bin/ssh/clientloop.c
872
client_abandon_status_confirm(struct ssh *ssh, Channel *c, void *ctx)
usr.bin/ssh/clientloop.c
874
free(ctx);
usr.bin/ssh/clientloop.c
891
client_register_global_confirm(global_confirm_cb *cb, void *ctx)
usr.bin/ssh/clientloop.c
897
if (last_gc && last_gc->cb == cb && last_gc->ctx == ctx) {
usr.bin/ssh/clientloop.c
906
gc->ctx = ctx;
usr.bin/ssh/crypto_api.h
46
SHA2_CTX ctx;
usr.bin/ssh/crypto_api.h
48
SHA512Init(&ctx);
usr.bin/ssh/crypto_api.h
49
SHA512Update(&ctx, in, inlen);
usr.bin/ssh/crypto_api.h
50
SHA512Final(out, &ctx);
usr.bin/ssh/digest-libc.c
145
ssh_digest_blocksize(struct ssh_digest_ctx *ctx)
usr.bin/ssh/digest-libc.c
147
const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg);
usr.bin/ssh/digest-libc.c
181
ssh_digest_update(struct ssh_digest_ctx *ctx, const void *m, size_t mlen)
usr.bin/ssh/digest-libc.c
183
const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg);
usr.bin/ssh/digest-libc.c
187
digest->md_update(ctx->mdctx, m, mlen);
usr.bin/ssh/digest-libc.c
192
ssh_digest_update_buffer(struct ssh_digest_ctx *ctx, const struct sshbuf *b)
usr.bin/ssh/digest-libc.c
194
return ssh_digest_update(ctx, sshbuf_ptr(b), sshbuf_len(b));
usr.bin/ssh/digest-libc.c
198
ssh_digest_final(struct ssh_digest_ctx *ctx, u_char *d, size_t dlen)
usr.bin/ssh/digest-libc.c
200
const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg);
usr.bin/ssh/digest-libc.c
208
digest->md_final(d, ctx->mdctx);
usr.bin/ssh/digest-libc.c
213
ssh_digest_free(struct ssh_digest_ctx *ctx)
usr.bin/ssh/digest-libc.c
217
if (ctx != NULL) {
usr.bin/ssh/digest-libc.c
218
digest = ssh_digest_by_alg(ctx->alg);
usr.bin/ssh/digest-libc.c
220
explicit_bzero(ctx->mdctx, digest->ctx_len);
usr.bin/ssh/digest-libc.c
221
free(ctx->mdctx);
usr.bin/ssh/digest-libc.c
222
freezero(ctx, sizeof(*ctx));
usr.bin/ssh/digest-libc.c
230
struct ssh_digest_ctx *ctx = ssh_digest_start(alg);
usr.bin/ssh/digest-libc.c
233
if (ctx == NULL)
usr.bin/ssh/digest-libc.c
235
if (ssh_digest_update(ctx, m, mlen) != 0 ||
usr.bin/ssh/digest-libc.c
236
ssh_digest_final(ctx, d, dlen) != 0)
usr.bin/ssh/digest-libc.c
238
ssh_digest_free(ctx);
usr.bin/ssh/digest-openssl.c
127
ssh_digest_update(struct ssh_digest_ctx *ctx, const void *m, size_t mlen)
usr.bin/ssh/digest-openssl.c
129
if (EVP_DigestUpdate(ctx->mdctx, m, mlen) != 1)
usr.bin/ssh/digest-openssl.c
135
ssh_digest_update_buffer(struct ssh_digest_ctx *ctx, const struct sshbuf *b)
usr.bin/ssh/digest-openssl.c
137
return ssh_digest_update(ctx, sshbuf_ptr(b), sshbuf_len(b));
usr.bin/ssh/digest-openssl.c
141
ssh_digest_final(struct ssh_digest_ctx *ctx, u_char *d, size_t dlen)
usr.bin/ssh/digest-openssl.c
143
const struct ssh_digest *digest = ssh_digest_by_alg(ctx->alg);
usr.bin/ssh/digest-openssl.c
150
if (EVP_DigestFinal_ex(ctx->mdctx, d, &l) != 1)
usr.bin/ssh/digest-openssl.c
158
ssh_digest_free(struct ssh_digest_ctx *ctx)
usr.bin/ssh/digest-openssl.c
160
if (ctx == NULL)
usr.bin/ssh/digest-openssl.c
162
EVP_MD_CTX_free(ctx->mdctx);
usr.bin/ssh/digest-openssl.c
163
freezero(ctx, sizeof(*ctx));
usr.bin/ssh/digest-openssl.c
90
ssh_digest_blocksize(struct ssh_digest_ctx *ctx)
usr.bin/ssh/digest-openssl.c
92
return EVP_MD_CTX_block_size(ctx->mdctx);
usr.bin/ssh/digest.h
45
size_t ssh_digest_blocksize(struct ssh_digest_ctx *ctx);
usr.bin/ssh/digest.h
61
int ssh_digest_update(struct ssh_digest_ctx *ctx, const void *m, size_t mlen)
usr.bin/ssh/digest.h
63
int ssh_digest_update_buffer(struct ssh_digest_ctx *ctx,
usr.bin/ssh/digest.h
65
int ssh_digest_final(struct ssh_digest_ctx *ctx, u_char *d, size_t dlen)
usr.bin/ssh/digest.h
67
void ssh_digest_free(struct ssh_digest_ctx *ctx);
usr.bin/ssh/ed25519-openssl.c
44
EVP_PKEY_CTX *ctx = NULL;
usr.bin/ssh/ed25519-openssl.c
49
if ((ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_ED25519, NULL)) == NULL) {
usr.bin/ssh/ed25519-openssl.c
53
if (EVP_PKEY_keygen_init(ctx) <= 0) {
usr.bin/ssh/ed25519-openssl.c
57
if (EVP_PKEY_keygen(ctx, &pkey) <= 0) {
usr.bin/ssh/ed25519-openssl.c
90
EVP_PKEY_CTX_free(ctx);
usr.bin/ssh/gss-genr.c
108
OM_uint32 ctx;
usr.bin/ssh/gss-genr.c
121
ctx = 0;
usr.bin/ssh/gss-genr.c
125
GSS_C_GSS_CODE, ctxt->oid, &ctx, &msg);
usr.bin/ssh/gss-genr.c
132
} while (ctx != 0);
usr.bin/ssh/gss-genr.c
137
GSS_C_MECH_CODE, ctxt->oid, &ctx, &msg);
usr.bin/ssh/gss-genr.c
144
} while (ctx != 0);
usr.bin/ssh/gss-genr.c
160
ssh_gssapi_build_ctx(Gssctxt **ctx)
usr.bin/ssh/gss-genr.c
162
*ctx = xcalloc(1, sizeof (Gssctxt));
usr.bin/ssh/gss-genr.c
163
(*ctx)->context = GSS_C_NO_CONTEXT;
usr.bin/ssh/gss-genr.c
164
(*ctx)->name = GSS_C_NO_NAME;
usr.bin/ssh/gss-genr.c
165
(*ctx)->oid = GSS_C_NO_OID;
usr.bin/ssh/gss-genr.c
166
(*ctx)->creds = GSS_C_NO_CREDENTIAL;
usr.bin/ssh/gss-genr.c
167
(*ctx)->client = GSS_C_NO_NAME;
usr.bin/ssh/gss-genr.c
168
(*ctx)->client_creds = GSS_C_NO_CREDENTIAL;
usr.bin/ssh/gss-genr.c
173
ssh_gssapi_delete_ctx(Gssctxt **ctx)
usr.bin/ssh/gss-genr.c
177
if ((*ctx) == NULL)
usr.bin/ssh/gss-genr.c
179
if ((*ctx)->context != GSS_C_NO_CONTEXT)
usr.bin/ssh/gss-genr.c
180
gss_delete_sec_context(&ms, &(*ctx)->context, GSS_C_NO_BUFFER);
usr.bin/ssh/gss-genr.c
181
if ((*ctx)->name != GSS_C_NO_NAME)
usr.bin/ssh/gss-genr.c
182
gss_release_name(&ms, &(*ctx)->name);
usr.bin/ssh/gss-genr.c
183
if ((*ctx)->oid != GSS_C_NO_OID) {
usr.bin/ssh/gss-genr.c
184
free((*ctx)->oid->elements);
usr.bin/ssh/gss-genr.c
185
free((*ctx)->oid);
usr.bin/ssh/gss-genr.c
186
(*ctx)->oid = GSS_C_NO_OID;
usr.bin/ssh/gss-genr.c
188
if ((*ctx)->creds != GSS_C_NO_CREDENTIAL)
usr.bin/ssh/gss-genr.c
189
gss_release_cred(&ms, &(*ctx)->creds);
usr.bin/ssh/gss-genr.c
190
if ((*ctx)->client != GSS_C_NO_NAME)
usr.bin/ssh/gss-genr.c
191
gss_release_name(&ms, &(*ctx)->client);
usr.bin/ssh/gss-genr.c
192
if ((*ctx)->client_creds != GSS_C_NO_CREDENTIAL)
usr.bin/ssh/gss-genr.c
193
gss_release_cred(&ms, &(*ctx)->client_creds);
usr.bin/ssh/gss-genr.c
195
free(*ctx);
usr.bin/ssh/gss-genr.c
196
*ctx = NULL;
usr.bin/ssh/gss-genr.c
206
ssh_gssapi_init_ctx(Gssctxt *ctx, int deleg_creds, gss_buffer_desc *recv_tok,
usr.bin/ssh/gss-genr.c
216
ctx->major = gss_init_sec_context(&ctx->minor,
usr.bin/ssh/gss-genr.c
217
GSS_C_NO_CREDENTIAL, &ctx->context, ctx->name, ctx->oid,
usr.bin/ssh/gss-genr.c
221
if (GSS_ERROR(ctx->major))
usr.bin/ssh/gss-genr.c
222
ssh_gssapi_error(ctx);
usr.bin/ssh/gss-genr.c
224
return (ctx->major);
usr.bin/ssh/gss-genr.c
229
ssh_gssapi_import_name(Gssctxt *ctx, const char *host)
usr.bin/ssh/gss-genr.c
238
if ((ctx->major = gss_import_name(&ctx->minor,
usr.bin/ssh/gss-genr.c
239
&gssbuf, GSS_C_NT_HOSTBASED_SERVICE, &ctx->name)))
usr.bin/ssh/gss-genr.c
240
ssh_gssapi_error(ctx);
usr.bin/ssh/gss-genr.c
243
return (ctx->major);
usr.bin/ssh/gss-genr.c
247
ssh_gssapi_sign(Gssctxt *ctx, gss_buffer_t buffer, gss_buffer_t hash)
usr.bin/ssh/gss-genr.c
249
if ((ctx->major = gss_get_mic(&ctx->minor, ctx->context,
usr.bin/ssh/gss-genr.c
251
ssh_gssapi_error(ctx);
usr.bin/ssh/gss-genr.c
253
return (ctx->major);
usr.bin/ssh/gss-genr.c
272
ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host)
usr.bin/ssh/gss-genr.c
283
ssh_gssapi_build_ctx(ctx);
usr.bin/ssh/gss-genr.c
284
ssh_gssapi_set_oid(*ctx, oid);
usr.bin/ssh/gss-genr.c
285
major = ssh_gssapi_import_name(*ctx, host);
usr.bin/ssh/gss-genr.c
287
major = ssh_gssapi_init_ctx(*ctx, 0, GSS_C_NO_BUFFER, &token,
usr.bin/ssh/gss-genr.c
290
if ((*ctx)->context != GSS_C_NO_CONTEXT)
usr.bin/ssh/gss-genr.c
291
gss_delete_sec_context(&minor, &(*ctx)->context,
usr.bin/ssh/gss-genr.c
296
ssh_gssapi_delete_ctx(ctx);
usr.bin/ssh/gss-genr.c
63
ssh_gssapi_check_oid(Gssctxt *ctx, void *data, size_t len)
usr.bin/ssh/gss-genr.c
65
return (ctx != NULL && ctx->oid != GSS_C_NO_OID &&
usr.bin/ssh/gss-genr.c
66
ctx->oid->length == len &&
usr.bin/ssh/gss-genr.c
67
memcmp(ctx->oid->elements, data, len) == 0);
usr.bin/ssh/gss-genr.c
72
ssh_gssapi_set_oid_data(Gssctxt *ctx, void *data, size_t len)
usr.bin/ssh/gss-genr.c
74
if (ctx->oid != GSS_C_NO_OID) {
usr.bin/ssh/gss-genr.c
75
free(ctx->oid->elements);
usr.bin/ssh/gss-genr.c
76
free(ctx->oid);
usr.bin/ssh/gss-genr.c
78
ctx->oid = xcalloc(1, sizeof(gss_OID_desc));
usr.bin/ssh/gss-genr.c
79
ctx->oid->length = len;
usr.bin/ssh/gss-genr.c
80
ctx->oid->elements = xmalloc(len);
usr.bin/ssh/gss-genr.c
81
memcpy(ctx->oid->elements, data, len);
usr.bin/ssh/gss-genr.c
86
ssh_gssapi_set_oid(Gssctxt *ctx, gss_OID oid)
usr.bin/ssh/gss-genr.c
88
ssh_gssapi_set_oid_data(ctx, oid->elements, oid->length);
usr.bin/ssh/gss-serv.c
106
gss_add_oid_set_member(&status, ctx->oid, &oidset);
usr.bin/ssh/gss-serv.c
113
if (GSS_ERROR(ssh_gssapi_import_name(ctx, lname))) {
usr.bin/ssh/gss-serv.c
115
return (ctx->major);
usr.bin/ssh/gss-serv.c
118
if ((ctx->major = gss_acquire_cred(&ctx->minor,
usr.bin/ssh/gss-serv.c
119
ctx->name, 0, oidset, GSS_C_ACCEPT, &ctx->creds,
usr.bin/ssh/gss-serv.c
121
ssh_gssapi_error(ctx);
usr.bin/ssh/gss-serv.c
124
return (ctx->major);
usr.bin/ssh/gss-serv.c
126
ctx->name = GSS_C_NO_NAME;
usr.bin/ssh/gss-serv.c
127
ctx->creds = GSS_C_NO_CREDENTIAL;
usr.bin/ssh/gss-serv.c
134
ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID oid)
usr.bin/ssh/gss-serv.c
136
if (*ctx)
usr.bin/ssh/gss-serv.c
137
ssh_gssapi_delete_ctx(ctx);
usr.bin/ssh/gss-serv.c
138
ssh_gssapi_build_ctx(ctx);
usr.bin/ssh/gss-serv.c
139
ssh_gssapi_set_oid(*ctx, oid);
usr.bin/ssh/gss-serv.c
140
return (ssh_gssapi_acquire_cred(*ctx));
usr.bin/ssh/gss-serv.c
176
ssh_gssapi_accept_ctx(Gssctxt *ctx, gss_buffer_desc *recv_tok,
usr.bin/ssh/gss-serv.c
182
ctx->major = gss_accept_sec_context(&ctx->minor,
usr.bin/ssh/gss-serv.c
183
&ctx->context, ctx->creds, recv_tok,
usr.bin/ssh/gss-serv.c
184
GSS_C_NO_CHANNEL_BINDINGS, &ctx->client, &mech,
usr.bin/ssh/gss-serv.c
185
send_tok, flags, NULL, &ctx->client_creds);
usr.bin/ssh/gss-serv.c
187
if (GSS_ERROR(ctx->major))
usr.bin/ssh/gss-serv.c
188
ssh_gssapi_error(ctx);
usr.bin/ssh/gss-serv.c
190
if (ctx->client_creds)
usr.bin/ssh/gss-serv.c
195
status = ctx->major;
usr.bin/ssh/gss-serv.c
202
(*flags & GSS_C_INTEG_FLAG))) && (ctx->major == GSS_S_COMPLETE)) {
usr.bin/ssh/gss-serv.c
203
if (ssh_gssapi_getclient(ctx, &gssapi_client))
usr.bin/ssh/gss-serv.c
216
ssh_gssapi_parse_ename(Gssctxt *ctx, gss_buffer_t ename, gss_buffer_t name)
usr.bin/ssh/gss-serv.c
248
!ssh_gssapi_check_oid(ctx, tok+6, oidl))
usr.bin/ssh/gss-serv.c
276
ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
usr.bin/ssh/gss-serv.c
285
if (supported_mechs[i]->oid.length == ctx->oid->length &&
usr.bin/ssh/gss-serv.c
287
ctx->oid->elements, ctx->oid->length) == 0))
usr.bin/ssh/gss-serv.c
295
if ((ctx->major = gss_display_name(&ctx->minor, ctx->client,
usr.bin/ssh/gss-serv.c
297
ssh_gssapi_error(ctx);
usr.bin/ssh/gss-serv.c
298
return (ctx->major);
usr.bin/ssh/gss-serv.c
301
if ((ctx->major = gss_export_name(&ctx->minor, ctx->client,
usr.bin/ssh/gss-serv.c
303
ssh_gssapi_error(ctx);
usr.bin/ssh/gss-serv.c
304
return (ctx->major);
usr.bin/ssh/gss-serv.c
307
if ((ctx->major = ssh_gssapi_parse_ename(ctx,&ename,
usr.bin/ssh/gss-serv.c
309
return (ctx->major);
usr.bin/ssh/gss-serv.c
313
client->creds = ctx->client_creds;
usr.bin/ssh/gss-serv.c
314
ctx->client_creds = GSS_C_NO_CREDENTIAL;
usr.bin/ssh/gss-serv.c
315
return (ctx->major);
usr.bin/ssh/gss-serv.c
392
ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
usr.bin/ssh/gss-serv.c
394
ctx->major = gss_verify_mic(&ctx->minor, ctx->context,
usr.bin/ssh/gss-serv.c
397
return (ctx->major);
usr.bin/ssh/gss-serv.c
98
ssh_gssapi_acquire_cred(Gssctxt *ctx)
usr.bin/ssh/hmac.c
100
return ssh_digest_update_buffer(ctx->digest, b);
usr.bin/ssh/hmac.c
104
ssh_hmac_final(struct ssh_hmac_ctx *ctx, u_char *d, size_t dlen)
usr.bin/ssh/hmac.c
108
len = ssh_digest_bytes(ctx->alg);
usr.bin/ssh/hmac.c
110
ssh_digest_final(ctx->digest, ctx->buf, len))
usr.bin/ssh/hmac.c
113
if (ssh_digest_copy_state(ctx->octx, ctx->digest) < 0 ||
usr.bin/ssh/hmac.c
114
ssh_digest_update(ctx->digest, ctx->buf, len) < 0 ||
usr.bin/ssh/hmac.c
115
ssh_digest_final(ctx->digest, d, dlen) < 0)
usr.bin/ssh/hmac.c
121
ssh_hmac_free(struct ssh_hmac_ctx *ctx)
usr.bin/ssh/hmac.c
123
if (ctx != NULL) {
usr.bin/ssh/hmac.c
124
ssh_digest_free(ctx->ictx);
usr.bin/ssh/hmac.c
125
ssh_digest_free(ctx->octx);
usr.bin/ssh/hmac.c
126
ssh_digest_free(ctx->digest);
usr.bin/ssh/hmac.c
127
if (ctx->buf) {
usr.bin/ssh/hmac.c
128
explicit_bzero(ctx->buf, ctx->buf_len);
usr.bin/ssh/hmac.c
129
free(ctx->buf);
usr.bin/ssh/hmac.c
131
freezero(ctx, sizeof(*ctx));
usr.bin/ssh/hmac.c
141
struct ssh_hmac_ctx *ctx;
usr.bin/ssh/hmac.c
145
if ((ctx = ssh_hmac_start(SSH_DIGEST_MD5)) == NULL)
usr.bin/ssh/hmac.c
147
if (ssh_hmac_init(ctx, key, klen) < 0 ||
usr.bin/ssh/hmac.c
148
ssh_hmac_update(ctx, m, mlen) < 0 ||
usr.bin/ssh/hmac.c
149
ssh_hmac_final(ctx, digest, sizeof(digest)) < 0)
usr.bin/ssh/hmac.c
151
ssh_hmac_free(ctx);
usr.bin/ssh/hmac.c
63
ssh_hmac_init(struct ssh_hmac_ctx *ctx, const void *key, size_t klen)
usr.bin/ssh/hmac.c
70
if (klen <= ctx->buf_len)
usr.bin/ssh/hmac.c
71
memcpy(ctx->buf, key, klen);
usr.bin/ssh/hmac.c
72
else if (ssh_digest_memory(ctx->alg, key, klen, ctx->buf,
usr.bin/ssh/hmac.c
73
ctx->buf_len) < 0)
usr.bin/ssh/hmac.c
75
for (i = 0; i < ctx->buf_len; i++)
usr.bin/ssh/hmac.c
76
ctx->buf[i] ^= 0x36;
usr.bin/ssh/hmac.c
77
if (ssh_digest_update(ctx->ictx, ctx->buf, ctx->buf_len) < 0)
usr.bin/ssh/hmac.c
79
for (i = 0; i < ctx->buf_len; i++)
usr.bin/ssh/hmac.c
80
ctx->buf[i] ^= 0x36 ^ 0x5c;
usr.bin/ssh/hmac.c
81
if (ssh_digest_update(ctx->octx, ctx->buf, ctx->buf_len) < 0)
usr.bin/ssh/hmac.c
83
explicit_bzero(ctx->buf, ctx->buf_len);
usr.bin/ssh/hmac.c
86
if (ssh_digest_copy_state(ctx->ictx, ctx->digest) < 0)
usr.bin/ssh/hmac.c
92
ssh_hmac_update(struct ssh_hmac_ctx *ctx, const void *m, size_t mlen)
usr.bin/ssh/hmac.c
94
return ssh_digest_update(ctx->digest, m, mlen);
usr.bin/ssh/hmac.c
98
ssh_hmac_update_buffer(struct ssh_hmac_ctx *ctx, const struct sshbuf *b)
usr.bin/ssh/hmac.h
29
int ssh_hmac_init(struct ssh_hmac_ctx *ctx, const void *key, size_t klen)
usr.bin/ssh/hmac.h
31
int ssh_hmac_update(struct ssh_hmac_ctx *ctx, const void *m, size_t mlen)
usr.bin/ssh/hmac.h
33
int ssh_hmac_update_buffer(struct ssh_hmac_ctx *ctx, const struct sshbuf *b);
usr.bin/ssh/hmac.h
34
int ssh_hmac_final(struct ssh_hmac_ctx *ctx, u_char *d, size_t dlen)
usr.bin/ssh/hmac.h
36
void ssh_hmac_free(struct ssh_hmac_ctx *ctx);
usr.bin/ssh/hostfile.c
116
struct ssh_hmac_ctx *ctx;
usr.bin/ssh/hostfile.c
134
if ((ctx = ssh_hmac_start(SSH_DIGEST_SHA1)) == NULL ||
usr.bin/ssh/hostfile.c
135
ssh_hmac_init(ctx, salt, len) < 0 ||
usr.bin/ssh/hostfile.c
136
ssh_hmac_update(ctx, host, strlen(host)) < 0 ||
usr.bin/ssh/hostfile.c
137
ssh_hmac_final(ctx, result, sizeof(result)))
usr.bin/ssh/hostfile.c
139
ssh_hmac_free(ctx);
usr.bin/ssh/hostfile.c
231
struct load_callback_ctx *ctx = (struct load_callback_ctx *)_ctx;
usr.bin/ssh/hostfile.c
232
struct hostkeys *hostkeys = ctx->hostkeys;
usr.bin/ssh/hostfile.c
250
hostkeys->entries[hostkeys->num_entries].host = xstrdup(ctx->host);
usr.bin/ssh/hostfile.c
258
ctx->num_loaded++;
usr.bin/ssh/hostfile.c
268
struct load_callback_ctx ctx;
usr.bin/ssh/hostfile.c
270
ctx.host = host;
usr.bin/ssh/hostfile.c
271
ctx.num_loaded = 0;
usr.bin/ssh/hostfile.c
272
ctx.hostkeys = hostkeys;
usr.bin/ssh/hostfile.c
274
if ((r = hostkeys_foreach_file(path, f, record_hostkey, &ctx, host,
usr.bin/ssh/hostfile.c
279
if (ctx.num_loaded != 0)
usr.bin/ssh/hostfile.c
280
debug3_f("loaded %lu keys from %s", ctx.num_loaded, host);
usr.bin/ssh/hostfile.c
574
struct host_delete_ctx *ctx = (struct host_delete_ctx *)_ctx;
usr.bin/ssh/hostfile.c
575
int loglevel = ctx->quiet ? SYSLOG_LEVEL_DEBUG1 : SYSLOG_LEVEL_VERBOSE;
usr.bin/ssh/hostfile.c
585
for (i = 0; i < ctx->nkeys; i++) {
usr.bin/ssh/hostfile.c
586
if (!sshkey_equal(ctx->keys[i], l->key))
usr.bin/ssh/hostfile.c
588
ctx->match_keys[i] |= l->match;
usr.bin/ssh/hostfile.c
589
fprintf(ctx->out, "%s\n", l->line);
usr.bin/ssh/hostfile.c
600
ctx->quiet ? __func__ : "", ctx->quiet ? ": " : "",
usr.bin/ssh/hostfile.c
601
l->path, l->linenum, sshkey_type(l->key), ctx->host);
usr.bin/ssh/hostfile.c
602
ctx->modified = 1;
usr.bin/ssh/hostfile.c
608
ctx->quiet ? __func__ : "", ctx->quiet ? ": " : "",
usr.bin/ssh/hostfile.c
611
fprintf(ctx->out, "%s\n", l->line);
usr.bin/ssh/hostfile.c
621
struct host_delete_ctx ctx;
usr.bin/ssh/hostfile.c
630
memset(&ctx, 0, sizeof(ctx));
usr.bin/ssh/hostfile.c
631
ctx.host = host;
usr.bin/ssh/hostfile.c
632
ctx.ip = ip;
usr.bin/ssh/hostfile.c
633
ctx.quiet = quiet;
usr.bin/ssh/hostfile.c
635
if ((ctx.match_keys = calloc(nkeys, sizeof(*ctx.match_keys))) == NULL)
usr.bin/ssh/hostfile.c
637
ctx.keys = keys;
usr.bin/ssh/hostfile.c
638
ctx.nkeys = nkeys;
usr.bin/ssh/hostfile.c
639
ctx.modified = 0;
usr.bin/ssh/hostfile.c
656
if ((ctx.out = fdopen(fd, "w")) == NULL) {
usr.bin/ssh/hostfile.c
665
if ((r = hostkeys_foreach(filename, host_delete, &ctx, host, ip,
usr.bin/ssh/hostfile.c
675
if (keys[i] == NULL || (want & ctx.match_keys[i]) == want)
usr.bin/ssh/hostfile.c
684
if (ctx.match_keys[i] == 0) {
usr.bin/ssh/hostfile.c
686
if (!write_host_entry(ctx.out, host, ip,
usr.bin/ssh/hostfile.c
691
} else if ((want & ~ctx.match_keys[i]) == HKF_MATCH_HOST) {
usr.bin/ssh/hostfile.c
693
if (!write_host_entry(ctx.out, host, NULL,
usr.bin/ssh/hostfile.c
698
} else if ((want & ~ctx.match_keys[i]) == HKF_MATCH_IP) {
usr.bin/ssh/hostfile.c
700
if (!write_host_entry(ctx.out, ip, NULL,
usr.bin/ssh/hostfile.c
712
ctx.modified = 1;
usr.bin/ssh/hostfile.c
714
fclose(ctx.out);
usr.bin/ssh/hostfile.c
715
ctx.out = NULL;
usr.bin/ssh/hostfile.c
717
if (ctx.modified) {
usr.bin/ssh/hostfile.c
753
if (ctx.out != NULL)
usr.bin/ssh/hostfile.c
754
fclose(ctx.out);
usr.bin/ssh/hostfile.c
755
free(ctx.match_keys);
usr.bin/ssh/hostfile.c
784
void *ctx, const char *host, const char *ip, u_int options, u_int note)
usr.bin/ssh/hostfile.c
820
if ((r = callback(&lineinfo, ctx)) != 0)
usr.bin/ssh/hostfile.c
944
if ((r = callback(&lineinfo, ctx)) != 0)
usr.bin/ssh/hostfile.c
949
if ((r = callback(&lineinfo, ctx)) != 0)
usr.bin/ssh/hostfile.c
959
hostkeys_foreach(const char *path, hostkeys_foreach_fn *callback, void *ctx,
usr.bin/ssh/hostfile.c
969
r = hostkeys_foreach_file(path, f, callback, ctx, host, ip,
usr.bin/ssh/hostfile.h
111
typedef int hostkeys_foreach_fn(struct hostkey_foreach_line *l, void *ctx);
usr.bin/ssh/hostfile.h
115
hostkeys_foreach_fn *callback, void *ctx,
usr.bin/ssh/hostfile.h
118
hostkeys_foreach_fn *callback, void *ctx,
usr.bin/ssh/log.c
298
set_log_handler(log_handler_fn *handler, void *ctx)
usr.bin/ssh/log.c
301
log_handler_ctx = ctx;
usr.bin/ssh/monitor_wrap.c
790
mm_bsdauth_query(void *ctx, char **name, char **infotxt,
usr.bin/ssh/monitor_wrap.c
828
mm_bsdauth_respond(void *ctx, u_int numresponses, char **responses)
usr.bin/ssh/monitor_wrap.c
84
mm_log_handler(LogLevel level, int forced, const char *msg, void *ctx)
usr.bin/ssh/monitor_wrap.c
855
mm_ssh_gssapi_server_ctx(Gssctxt **ctx, gss_OID goid)
usr.bin/ssh/monitor_wrap.c
862
*ctx = NULL;
usr.bin/ssh/monitor_wrap.c
87
struct monitor *mon = (struct monitor *)ctx;
usr.bin/ssh/monitor_wrap.c
880
mm_ssh_gssapi_accept_ctx(Gssctxt *ctx, gss_buffer_desc *in,
usr.bin/ssh/monitor_wrap.c
911
mm_ssh_gssapi_checkmic(Gssctxt *ctx, gss_buffer_t gssbuf, gss_buffer_t gssmic)
usr.bin/ssh/packet.c
265
ssh_packet_set_input_hook(struct ssh *ssh, ssh_packet_hook_fn *hook, void *ctx)
usr.bin/ssh/packet.c
268
ssh->state->hook_in_ctx = ctx;
usr.bin/ssh/readpass.c
298
notify_complete(struct notifier_ctx *ctx, const char *fmt, ...)
usr.bin/ssh/readpass.c
304
if (ctx != NULL && fmt != NULL && ctx->pid == -1) {
usr.bin/ssh/readpass.c
316
if (ctx == NULL || ctx->pid <= 0) {
usr.bin/ssh/readpass.c
317
free(ctx);
usr.bin/ssh/readpass.c
320
kill(ctx->pid, SIGTERM);
usr.bin/ssh/readpass.c
321
while ((ret = waitpid(ctx->pid, NULL, 0)) == -1) {
usr.bin/ssh/readpass.c
327
ssh_signal(SIGCHLD, ctx->osigchld);
usr.bin/ssh/readpass.c
328
free(ctx);
usr.bin/ssh/ssh-ecdsa.c
160
EVP_PKEY_CTX *ctx = NULL;
usr.bin/ssh/ssh-ecdsa.c
166
if ((ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_EC, NULL)) == NULL)
usr.bin/ssh/ssh-ecdsa.c
169
if (EVP_PKEY_keygen_init(ctx) <= 0 ||
usr.bin/ssh/ssh-ecdsa.c
170
EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, k->ecdsa_nid) <= 0 ||
usr.bin/ssh/ssh-ecdsa.c
171
EVP_PKEY_keygen(ctx, &res) <= 0) {
usr.bin/ssh/ssh-ecdsa.c
181
EVP_PKEY_CTX_free(ctx);
usr.bin/ssh/ssh-keygen.c
1117
struct known_hosts_ctx *ctx = (struct known_hosts_ctx *)_ctx;
usr.bin/ssh/ssh-keygen.c
1130
fprintf(ctx->out, "%s\n", l->line);
usr.bin/ssh/ssh-keygen.c
1131
if (has_wild && !ctx->find_host) {
usr.bin/ssh/ssh-keygen.c
1147
fprintf(ctx->out, "%s %s\n", hashed, l->rawkey);
usr.bin/ssh/ssh-keygen.c
1149
ctx->has_unhashed = 1;
usr.bin/ssh/ssh-keygen.c
1155
ctx->invalid = 1;
usr.bin/ssh/ssh-keygen.c
1159
fprintf(ctx->out, "%s\n", l->line);
usr.bin/ssh/ssh-keygen.c
1169
struct known_hosts_ctx *ctx = (struct known_hosts_ctx *)_ctx;
usr.bin/ssh/ssh-keygen.c
1178
if (ctx->delete_host) {
usr.bin/ssh/ssh-keygen.c
1181
fprintf(ctx->out, "%s\n", l->line);
usr.bin/ssh/ssh-keygen.c
1188
ctx->found_key = 1;
usr.bin/ssh/ssh-keygen.c
1191
ctx->host, l->linenum);
usr.bin/ssh/ssh-keygen.c
1194
} else if (ctx->find_host) {
usr.bin/ssh/ssh-keygen.c
1195
ctx->found_key = 1;
usr.bin/ssh/ssh-keygen.c
1198
ctx->host,
usr.bin/ssh/ssh-keygen.c
1202
if (ctx->hash_hosts)
usr.bin/ssh/ssh-keygen.c
1203
known_hosts_hash(l, ctx);
usr.bin/ssh/ssh-keygen.c
1210
mprintf("%s %s %s%s%s\n", ctx->host,
usr.bin/ssh/ssh-keygen.c
1219
fprintf(ctx->out, "%s\n", l->line);
usr.bin/ssh/ssh-keygen.c
1222
} else if (ctx->delete_host) {
usr.bin/ssh/ssh-keygen.c
1225
ctx->invalid = 1;
usr.bin/ssh/ssh-keygen.c
1228
fprintf(ctx->out, "%s\n", l->line);
usr.bin/ssh/ssh-keygen.c
1239
struct known_hosts_ctx ctx;
usr.bin/ssh/ssh-keygen.c
1254
memset(&ctx, 0, sizeof(ctx));
usr.bin/ssh/ssh-keygen.c
1255
ctx.out = stdout;
usr.bin/ssh/ssh-keygen.c
1256
ctx.host = name;
usr.bin/ssh/ssh-keygen.c
1257
ctx.hash_hosts = hash_hosts;
usr.bin/ssh/ssh-keygen.c
1258
ctx.find_host = find_host;
usr.bin/ssh/ssh-keygen.c
1259
ctx.delete_host = delete_host;
usr.bin/ssh/ssh-keygen.c
1274
if ((ctx.out = fdopen(fd, "w")) == NULL) {
usr.bin/ssh/ssh-keygen.c
1286
known_hosts_find_delete : known_hosts_hash, &ctx, name, NULL,
usr.bin/ssh/ssh-keygen.c
1294
fclose(ctx.out);
usr.bin/ssh/ssh-keygen.c
1296
if (ctx.invalid) {
usr.bin/ssh/ssh-keygen.c
1304
} else if (delete_host && !ctx.found_key) {
usr.bin/ssh/ssh-keygen.c
1326
if (ctx.has_unhashed) {
usr.bin/ssh/ssh-keygen.c
1333
exit (find_host && !ctx.found_key);
usr.bin/ssh/ssh-keygen.c
1683
u_int compat, void *ctx)
usr.bin/ssh/ssh-keygen.c
1685
int *agent_fdp = (int *)ctx;
usr.bin/ssh/ssh-rsa.c
116
EVP_PKEY_CTX *ctx = NULL;
usr.bin/ssh/ssh-rsa.c
125
if ((ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL)) == NULL) {
usr.bin/ssh/ssh-rsa.c
129
if (EVP_PKEY_keygen_init(ctx) <= 0) {
usr.bin/ssh/ssh-rsa.c
133
if (EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) <= 0) {
usr.bin/ssh/ssh-rsa.c
137
if (EVP_PKEY_keygen(ctx, &res) <= 0 || res == NULL) {
usr.bin/ssh/ssh-rsa.c
145
EVP_PKEY_CTX_free(ctx);
usr.bin/ssh/ssh-rsa.c
362
BN_CTX *ctx = NULL;
usr.bin/ssh/ssh-rsa.c
366
if ((ctx = BN_CTX_new()) == NULL)
usr.bin/ssh/ssh-rsa.c
380
(BN_mod(*rsa_dmq1, d_consttime, aux, ctx) == 0) ||
usr.bin/ssh/ssh-rsa.c
382
(BN_mod(*rsa_dmp1, d_consttime, aux, ctx) == 0)) {
usr.bin/ssh/ssh-rsa.c
391
BN_CTX_free(ctx);
usr.bin/ssh/sshconnect.c
704
struct find_by_key_ctx *ctx = (struct find_by_key_ctx *)_ctx;
usr.bin/ssh/sshconnect.c
714
if (l->key == NULL || !sshkey_equal(ctx->key, l->key))
usr.bin/ssh/sshconnect.c
718
ctx->names = xrecallocarray(ctx->names,
usr.bin/ssh/sshconnect.c
719
ctx->nnames, ctx->nnames + 1, sizeof(*ctx->names));
usr.bin/ssh/sshconnect.c
720
xasprintf(&ctx->names[ctx->nnames], "%s:%lu: %s", path, l->linenum,
usr.bin/ssh/sshconnect.c
723
ctx->nnames++;
usr.bin/ssh/sshconnect.c
730
struct find_by_key_ctx *ctx)
usr.bin/ssh/sshconnect.c
735
if ((r = hostkeys_foreach(file, hostkeys_find_by_key_cb, ctx,
usr.bin/ssh/sshconnect.c
736
ctx->host, ctx->ip, HKF_WANT_PARSE_KEY, 0)) != 0) {
usr.bin/ssh/sshconnect.c
757
struct find_by_key_ctx ctx = {NULL, NULL, NULL, NULL, 0};
usr.bin/ssh/sshconnect.c
766
ctx.host = host;
usr.bin/ssh/sshconnect.c
767
ctx.ip = ip;
usr.bin/ssh/sshconnect.c
768
ctx.key = key;
usr.bin/ssh/sshconnect.c
772
"user", &ctx) != 0)
usr.bin/ssh/sshconnect.c
777
"system", &ctx) != 0)
usr.bin/ssh/sshconnect.c
781
*names = ctx.names;
usr.bin/ssh/sshconnect.c
782
*nnames = ctx.nnames;
usr.bin/ssh/sshconnect.c
783
ctx.names = NULL;
usr.bin/ssh/sshconnect.c
784
ctx.nnames = 0;
usr.bin/ssh/sshconnect.c
787
for (i = 0; i < ctx.nnames; i++)
usr.bin/ssh/sshconnect.c
788
free(ctx.names[i]);
usr.bin/ssh/sshconnect.c
789
free(ctx.names);
usr.bin/ssh/sshd.c
1202
static struct ssh_digest_ctx *ctx;
usr.bin/ssh/sshd.c
1208
if (ctx == NULL && (ctx = ssh_digest_start(SSH_DIGEST_SHA512)) == NULL)
usr.bin/ssh/sshd.c
1212
if (ssh_digest_update(ctx, sshbuf_ptr(server_cfg),
usr.bin/ssh/sshd.c
1217
if (ssh_digest_final(ctx, hash, len) != 0)
usr.bin/ssh/sshd.c
1221
ssh_digest_free(ctx);
usr.bin/ssh/sshd.c
1222
ctx = NULL;
usr.bin/ssh/sshd.c
1229
if (ssh_digest_update(ctx, sshbuf_ptr(buf), sshbuf_len(buf)) != 0)
usr.bin/ssh/sshkey.c
2340
u_int compat, void *ctx)
usr.bin/ssh/sshkey.c
2342
if (ctx != NULL)
usr.bin/ssh/sshkey.c
473
EVP_MD_CTX *ctx = NULL;
usr.bin/ssh/sshkey.c
490
if ((ctx = EVP_MD_CTX_new()) == NULL) {
usr.bin/ssh/sshkey.c
494
if (EVP_DigestSignInit(ctx, NULL, evpmd, NULL, pkey) != 1 ||
usr.bin/ssh/sshkey.c
495
EVP_DigestSign(ctx, sig, &slen, data, datalen) != 1) {
usr.bin/ssh/sshkey.c
507
EVP_MD_CTX_free(ctx);
usr.bin/ssh/sshkey.c
516
EVP_MD_CTX *ctx = NULL;
usr.bin/ssh/sshkey.c
522
if ((ctx = EVP_MD_CTX_new()) == NULL)
usr.bin/ssh/sshkey.c
524
if (EVP_DigestVerifyInit(ctx, NULL, evpmd, NULL, pkey) != 1) {
usr.bin/ssh/sshkey.c
528
switch (EVP_DigestVerify(ctx, sigbuf, siglen, data, datalen)) {
usr.bin/ssh/sshkey.c
541
EVP_MD_CTX_free(ctx);
usr.bin/ssh/sshsig.c
508
struct ssh_digest_ctx *ctx = NULL;
usr.bin/ssh/sshsig.c
521
if ((ctx = ssh_digest_start(alg)) == NULL) {
usr.bin/ssh/sshsig.c
539
if ((r = ssh_digest_update(ctx, rbuf, (size_t)n)) != 0) {
usr.bin/ssh/sshsig.c
544
if ((r = ssh_digest_final(ctx, hash, sizeof(hash))) != 0) {
usr.bin/ssh/sshsig.c
567
ssh_digest_free(ctx);
usr.bin/ssh/umac.c
1002
uhash_ctx_t ctx;
usr.bin/ssh/umac.c
1006
ctx = (uhash_ctx_t)malloc(sizeof(uhash_ctx)+ALLOC_BOUNDARY);
usr.bin/ssh/umac.c
1007
if (ctx) {
usr.bin/ssh/umac.c
1010
((ptrdiff_t)ctx & (ALLOC_BOUNDARY -1));
usr.bin/ssh/umac.c
1011
ctx = (uhash_ctx_t)((u_char *)ctx + bytes_to_add);
usr.bin/ssh/umac.c
1012
*((u_char *)ctx - 1) = bytes_to_add;
usr.bin/ssh/umac.c
1015
uhash_init(ctx, prf_key);
usr.bin/ssh/umac.c
1017
return (ctx);
usr.bin/ssh/umac.c
1024
static int uhash_free(uhash_ctx_t ctx)
usr.bin/ssh/umac.c
1029
if (ctx) {
usr.bin/ssh/umac.c
1031
bytes_to_sub = *((u_char *)ctx - 1);
usr.bin/ssh/umac.c
1032
ctx = (uhash_ctx_t)((u_char *)ctx - bytes_to_sub);
usr.bin/ssh/umac.c
1034
free(ctx);
usr.bin/ssh/umac.c
1041
static int uhash_update(uhash_ctx_t ctx, const u_char *input, long len)
usr.bin/ssh/umac.c
1050
if (ctx->msg_len + len <= L1_KEY_LEN) {
usr.bin/ssh/umac.c
1051
nh_update(&ctx->hash, (const UINT8 *)input, len);
usr.bin/ssh/umac.c
1052
ctx->msg_len += len;
usr.bin/ssh/umac.c
1055
bytes_hashed = ctx->msg_len % L1_KEY_LEN;
usr.bin/ssh/umac.c
1056
if (ctx->msg_len == L1_KEY_LEN)
usr.bin/ssh/umac.c
1066
nh_update(&ctx->hash, (const UINT8 *)input, bytes_remaining);
usr.bin/ssh/umac.c
1067
nh_final(&ctx->hash, nh_result);
usr.bin/ssh/umac.c
1068
ctx->msg_len += bytes_remaining;
usr.bin/ssh/umac.c
1069
poly_hash(ctx,(UINT32 *)nh_result);
usr.bin/ssh/umac.c
1076
nh(&ctx->hash, (const UINT8 *)input, L1_KEY_LEN,
usr.bin/ssh/umac.c
1078
ctx->msg_len += L1_KEY_LEN;
usr.bin/ssh/umac.c
1081
poly_hash(ctx,(UINT32 *)nh_result);
usr.bin/ssh/umac.c
1087
nh_update(&ctx->hash, (const UINT8 *)input, len);
usr.bin/ssh/umac.c
1088
ctx->msg_len += len;
usr.bin/ssh/umac.c
1097
static int uhash_final(uhash_ctx_t ctx, u_char *res)
usr.bin/ssh/umac.c
1103
if (ctx->msg_len > L1_KEY_LEN) {
usr.bin/ssh/umac.c
1104
if (ctx->msg_len % L1_KEY_LEN) {
usr.bin/ssh/umac.c
1105
nh_final(&ctx->hash, nh_result);
usr.bin/ssh/umac.c
1106
poly_hash(ctx,(UINT32 *)nh_result);
usr.bin/ssh/umac.c
1108
ip_long(ctx, res);
usr.bin/ssh/umac.c
1110
nh_final(&ctx->hash, nh_result);
usr.bin/ssh/umac.c
1111
ip_short(ctx,nh_result, res);
usr.bin/ssh/umac.c
1113
uhash_reset(ctx);
usr.bin/ssh/umac.c
1187
int umac_reset(struct umac_ctx *ctx)
usr.bin/ssh/umac.c
1190
uhash_reset(&ctx->hash);
usr.bin/ssh/umac.c
1197
int umac_delete(struct umac_ctx *ctx)
usr.bin/ssh/umac.c
1200
if (ctx) {
usr.bin/ssh/umac.c
1202
ctx = (struct umac_ctx *)ctx->free_ptr;
usr.bin/ssh/umac.c
1203
freezero(ctx, sizeof(*ctx) + ALLOC_BOUNDARY);
usr.bin/ssh/umac.c
1215
struct umac_ctx *ctx, *octx;
usr.bin/ssh/umac.c
1219
octx = ctx = xcalloc(1, sizeof(*ctx) + ALLOC_BOUNDARY);
usr.bin/ssh/umac.c
1220
if (ctx) {
usr.bin/ssh/umac.c
1223
((ptrdiff_t)ctx & (ALLOC_BOUNDARY - 1));
usr.bin/ssh/umac.c
1224
ctx = (struct umac_ctx *)((u_char *)ctx + bytes_to_add);
usr.bin/ssh/umac.c
1226
ctx->free_ptr = octx;
usr.bin/ssh/umac.c
1228
pdf_init(&ctx->pdf, prf_key);
usr.bin/ssh/umac.c
1229
uhash_init(&ctx->hash, prf_key);
usr.bin/ssh/umac.c
1233
return (ctx);
usr.bin/ssh/umac.c
1238
int umac_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8])
usr.bin/ssh/umac.c
1241
uhash_final(&ctx->hash, (u_char *)tag);
usr.bin/ssh/umac.c
1242
pdf_gen_xor(&ctx->pdf, (const UINT8 *)nonce, (UINT8 *)tag);
usr.bin/ssh/umac.c
1249
int umac_update(struct umac_ctx *ctx, const u_char *input, long len)
usr.bin/ssh/umac.c
1254
uhash_update(&ctx->hash, input, len);
usr.bin/ssh/umac.c
1261
int umac(struct umac_ctx *ctx, u_char *input,
usr.bin/ssh/umac.c
1266
uhash(&ctx->hash, input, len, (u_char *)tag);
usr.bin/ssh/umac.c
1267
pdf_gen_xor(&ctx->pdf, (UINT8 *)nonce, (UINT8 *)tag);
usr.bin/ssh/umac.h
100
int uhash_set_params(uhash_ctx_t ctx,
usr.bin/ssh/umac.h
103
int uhash_reset(uhash_ctx_t ctx);
usr.bin/ssh/umac.h
105
int uhash_update(uhash_ctx_t ctx,
usr.bin/ssh/umac.h
109
int uhash_final(uhash_ctx_t ctx,
usr.bin/ssh/umac.h
112
int uhash(uhash_ctx_t ctx,
usr.bin/ssh/umac.h
121
int umac128_update(struct umac_ctx *ctx, const u_char *input, long len);
usr.bin/ssh/umac.h
122
int umac128_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8]);
usr.bin/ssh/umac.h
123
int umac128_delete(struct umac_ctx *ctx);
usr.bin/ssh/umac.h
61
int umac_reset(struct umac_ctx *ctx);
usr.bin/ssh/umac.h
65
int umac_update(struct umac_ctx *ctx, const u_char *input, long len);
usr.bin/ssh/umac.h
68
int umac_final(struct umac_ctx *ctx, u_char tag[], const u_char nonce[8]);
usr.bin/ssh/umac.h
73
int umac_delete(struct umac_ctx *ctx);
usr.bin/ssh/umac.h
77
int umac(struct umac_ctx *ctx, u_char *input,
usr.bin/ssh/umac.h
98
int uhash_free(uhash_ctx_t ctx);
usr.bin/tmux/cmd-display-panes.c
101
} else if (wp->yoff < ctx->oy &&
usr.bin/tmux/cmd-display-panes.c
102
wp->yoff + wp->sy > ctx->oy + ctx->sy) {
usr.bin/tmux/cmd-display-panes.c
105
sy = ctx->sy;
usr.bin/tmux/cmd-display-panes.c
106
} else if (wp->yoff < ctx->oy) {
usr.bin/tmux/cmd-display-panes.c
109
sy = wp->sy - (ctx->oy - wp->yoff);
usr.bin/tmux/cmd-display-panes.c
112
yoff = wp->yoff - ctx->oy;
usr.bin/tmux/cmd-display-panes.c
116
if (ctx->statustop)
usr.bin/tmux/cmd-display-panes.c
117
yoff += ctx->statuslines;
usr.bin/tmux/cmd-display-panes.c
199
struct screen_redraw_ctx *ctx)
usr.bin/tmux/cmd-display-panes.c
208
cmd_display_panes_draw_pane(ctx, wp);
usr.bin/tmux/cmd-display-panes.c
59
cmd_display_panes_draw_pane(struct screen_redraw_ctx *ctx,
usr.bin/tmux/cmd-display-panes.c
62
struct client *c = ctx->c;
usr.bin/tmux/cmd-display-panes.c
73
if (wp->xoff + wp->sx <= ctx->ox ||
usr.bin/tmux/cmd-display-panes.c
74
wp->xoff >= ctx->ox + ctx->sx ||
usr.bin/tmux/cmd-display-panes.c
75
wp->yoff + wp->sy <= ctx->oy ||
usr.bin/tmux/cmd-display-panes.c
76
wp->yoff >= ctx->oy + ctx->sy)
usr.bin/tmux/cmd-display-panes.c
79
if (wp->xoff >= ctx->ox && wp->xoff + wp->sx <= ctx->ox + ctx->sx) {
usr.bin/tmux/cmd-display-panes.c
81
xoff = wp->xoff - ctx->ox;
usr.bin/tmux/cmd-display-panes.c
83
} else if (wp->xoff < ctx->ox &&
usr.bin/tmux/cmd-display-panes.c
84
wp->xoff + wp->sx > ctx->ox + ctx->sx) {
usr.bin/tmux/cmd-display-panes.c
87
sx = ctx->sx;
usr.bin/tmux/cmd-display-panes.c
88
} else if (wp->xoff < ctx->ox) {
usr.bin/tmux/cmd-display-panes.c
91
sx = wp->sx - (ctx->ox - wp->xoff);
usr.bin/tmux/cmd-display-panes.c
94
xoff = wp->xoff - ctx->ox;
usr.bin/tmux/cmd-display-panes.c
97
if (wp->yoff >= ctx->oy && wp->yoff + wp->sy <= ctx->oy + ctx->sy) {
usr.bin/tmux/cmd-display-panes.c
99
yoff = wp->yoff - ctx->oy;
usr.bin/tmux/format-draw.c
236
struct screen_write_ctx ctx;
usr.bin/tmux/format-draw.c
268
screen_write_start(&ctx, left);
usr.bin/tmux/format-draw.c
269
screen_write_fast_copy(&ctx, after, 0, 0, width_after, 1);
usr.bin/tmux/format-draw.c
270
screen_write_stop(&ctx);
usr.bin/tmux/format-draw.c
339
struct screen_write_ctx ctx;
usr.bin/tmux/format-draw.c
371
screen_write_start(&ctx, centre);
usr.bin/tmux/format-draw.c
372
screen_write_fast_copy(&ctx, after, 0, 0, width_after, 1);
usr.bin/tmux/format-draw.c
373
screen_write_stop(&ctx);
usr.bin/tmux/format-draw.c
447
struct screen_write_ctx ctx;
usr.bin/tmux/format-draw.c
479
screen_write_start(&ctx, right);
usr.bin/tmux/format-draw.c
480
screen_write_fast_copy(&ctx, after, 0, 0, width_after, 1);
usr.bin/tmux/format-draw.c
481
screen_write_stop(&ctx);
usr.bin/tmux/format-draw.c
678
format_draw_many(struct screen_write_ctx *ctx, struct style *sy, char ch,
usr.bin/tmux/format-draw.c
685
screen_write_cell(ctx, &sy->gc);
usr.bin/tmux/format-draw.c
713
struct screen_write_ctx ctx[TOTAL];
usr.bin/tmux/format-draw.c
747
screen_write_start(&ctx[i], &s[i]);
usr.bin/tmux/format-draw.c
748
screen_write_clearendofline(&ctx[i], current_default.bg);
usr.bin/tmux/format-draw.c
770
format_draw_many(&ctx[current], &sy, '#', n);
usr.bin/tmux/format-draw.c
779
format_draw_many(&ctx[current], &sy, '#', n / 2);
usr.bin/tmux/format-draw.c
783
screen_write_cell(&ctx[current], &sy.gc);
usr.bin/tmux/format-draw.c
811
screen_write_cell(&ctx[current], &sy.gc);
usr.bin/tmux/format-draw.c
974
screen_write_stop(&ctx[i]);
usr.bin/tmux/input.c
102
struct screen_write_ctx ctx;
usr.bin/tmux/input.c
1027
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
1057
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
1207
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
1282
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
1364
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
1440
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
1826
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
1850
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
1925
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
1949
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
2036
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
2468
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
2534
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
2593
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
2691
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
2756
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
2866
screen_write_fullredraw(&ictx->ctx);
usr.bin/tmux/input.c
2874
struct hyperlinks *hl = ictx->ctx.s->hyperlinks;
usr.bin/tmux/input.c
2916
screen_set_progress_bar(ictx->ctx.s, state, p);
usr.bin/tmux/input.c
2994
screen_write_fullredraw(&ictx->ctx);
usr.bin/tmux/input.c
3010
screen_write_fullredraw(&ictx->ctx);
usr.bin/tmux/input.c
3037
screen_write_fullredraw(&ictx->ctx);
usr.bin/tmux/input.c
3053
screen_write_fullredraw(&ictx->ctx);
usr.bin/tmux/input.c
3066
c = ictx->ctx.s->ccolour;
usr.bin/tmux/input.c
3068
c = ictx->ctx.s->default_ccolour;
usr.bin/tmux/input.c
3078
screen_set_cursor_colour(ictx->ctx.s, c);
usr.bin/tmux/input.c
3086
screen_set_cursor_colour(ictx->ctx.s, -1);
usr.bin/tmux/input.c
3093
struct grid *gd = ictx->ctx.s->grid;
usr.bin/tmux/input.c
3094
u_int line = ictx->ctx.s->cy + gd->hsize;
usr.bin/tmux/input.c
3191
struct screen_write_ctx ctx;
usr.bin/tmux/input.c
3209
screen_write_start_pane(&ctx, wp, NULL);
usr.bin/tmux/input.c
3210
screen_write_setselection(&ctx, clip, out, outlen);
usr.bin/tmux/input.c
3211
screen_write_stop(&ctx);
usr.bin/tmux/input.c
3227
screen_write_fullredraw(&ictx->ctx);
usr.bin/tmux/input.c
3250
screen_write_fullredraw(&ictx->ctx);
usr.bin/tmux/input.c
783
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
833
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
846
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
913
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/input.c
955
struct screen_write_ctx *sctx = &ictx->ctx;
usr.bin/tmux/menu.c
267
struct screen_write_ctx ctx;
usr.bin/tmux/menu.c
272
screen_write_start(&ctx, s);
usr.bin/tmux/menu.c
273
screen_write_clearscreen(&ctx, 8);
usr.bin/tmux/menu.c
276
screen_write_box(&ctx, menu->width + 4, menu->count + 2,
usr.bin/tmux/menu.c
280
screen_write_menu(&ctx, menu, md->choice, md->border_lines,
usr.bin/tmux/menu.c
282
screen_write_stop(&ctx);
usr.bin/tmux/mode-tree.c
737
struct screen_write_ctx ctx;
usr.bin/tmux/mode-tree.c
755
screen_write_start(&ctx, s);
usr.bin/tmux/mode-tree.c
756
screen_write_clearscreen(&ctx, 8);
usr.bin/tmux/mode-tree.c
785
screen_write_cursormove(&ctx, 0, i - mtd->offset, 0);
usr.bin/tmux/mode-tree.c
840
screen_write_clearendofline(&ctx, 8);
usr.bin/tmux/mode-tree.c
841
screen_write_nputs(&ctx, w, &gc0, "%s", text);
usr.bin/tmux/mode-tree.c
843
format_draw(&ctx, &gc0, w - width, mti->text,
usr.bin/tmux/mode-tree.c
847
screen_write_clearendofline(&ctx, gc.bg);
usr.bin/tmux/mode-tree.c
848
screen_write_nputs(&ctx, w, &gc, "%s", text);
usr.bin/tmux/mode-tree.c
850
format_draw(&ctx, &gc, w - width, mti->text,
usr.bin/tmux/mode-tree.c
875
screen_write_cursormove(&ctx, 0, h, 0);
usr.bin/tmux/mode-tree.c
876
screen_write_box(&ctx, w, sy - h, BOX_LINES_DEFAULT, NULL, NULL);
usr.bin/tmux/mode-tree.c
885
screen_write_cursormove(&ctx, 1, h, 0);
usr.bin/tmux/mode-tree.c
886
screen_write_puts(&ctx, &gc0, "%s", text);
usr.bin/tmux/mode-tree.c
893
screen_write_puts(&ctx, &gc0, " (filter: ");
usr.bin/tmux/mode-tree.c
895
screen_write_puts(&ctx, &gc, "no matches");
usr.bin/tmux/mode-tree.c
897
screen_write_puts(&ctx, &gc0, "active");
usr.bin/tmux/mode-tree.c
898
screen_write_puts(&ctx, &gc0, ") ");
usr.bin/tmux/mode-tree.c
900
screen_write_puts(&ctx, &gc0, " ");
usr.bin/tmux/mode-tree.c
908
screen_write_cursormove(&ctx, 2, h + 1, 0);
usr.bin/tmux/mode-tree.c
909
mtd->drawcb(mtd->modedata, mti->itemdata, &ctx, box_x, box_y);
usr.bin/tmux/mode-tree.c
913
screen_write_cursormove(&ctx, 0, mtd->current - mtd->offset, 0);
usr.bin/tmux/mode-tree.c
914
screen_write_stop(&ctx);
usr.bin/tmux/popup.c
186
popup_init_ctx_cb(struct screen_write_ctx *ctx, struct tty_ctx *ttyctx)
usr.bin/tmux/popup.c
188
struct popup_data *pd = ctx->arg;
usr.bin/tmux/popup.c
275
struct screen_write_ctx ctx;
usr.bin/tmux/popup.c
287
screen_write_start(&ctx, &s);
usr.bin/tmux/popup.c
288
screen_write_clearscreen(&ctx, 8);
usr.bin/tmux/popup.c
291
screen_write_cursormove(&ctx, 0, 0, 0);
usr.bin/tmux/popup.c
292
screen_write_fast_copy(&ctx, &pd->s, 0, 0, pd->sx, pd->sy);
usr.bin/tmux/popup.c
294
screen_write_box(&ctx, pd->sx, pd->sy, pd->border_lines,
usr.bin/tmux/popup.c
296
screen_write_cursormove(&ctx, 1, 1, 0);
usr.bin/tmux/popup.c
297
screen_write_fast_copy(&ctx, &pd->s, 0, 0, pd->sx - 2,
usr.bin/tmux/popup.c
300
screen_write_stop(&ctx);
usr.bin/tmux/screen-redraw.c
1012
screen_redraw_draw_pane_scrollbars(struct screen_redraw_ctx *ctx)
usr.bin/tmux/screen-redraw.c
1014
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
1021
if (window_pane_show_scrollbar(wp, ctx->pane_scrollbars) &&
usr.bin/tmux/screen-redraw.c
1023
screen_redraw_draw_pane_scrollbar(ctx, wp);
usr.bin/tmux/screen-redraw.c
1029
screen_redraw_draw_pane_scrollbar(struct screen_redraw_ctx *ctx,
usr.bin/tmux/screen-redraw.c
1034
u_int sb = ctx->pane_scrollbars, total_height, sb_h = wp->sy;
usr.bin/tmux/screen-redraw.c
1035
u_int sb_pos = ctx->pane_scrollbars_pos, slider_h, slider_y;
usr.bin/tmux/screen-redraw.c
1038
int cm_y, cm_size, xoff = wp->xoff, ox = ctx->ox;
usr.bin/tmux/screen-redraw.c
1039
int sb_x, sb_y = (int)(wp->yoff - ctx->oy); /* sb top */
usr.bin/tmux/screen-redraw.c
1070
screen_redraw_draw_scrollbar(ctx, wp, sb_pos, sb_x, sb_y, sb_h,
usr.bin/tmux/screen-redraw.c
1079
screen_redraw_draw_scrollbar(struct screen_redraw_ctx *ctx,
usr.bin/tmux/screen-redraw.c
1083
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
1089
int px, py, ox = ctx->ox, oy = ctx->oy;
usr.bin/tmux/screen-redraw.c
1090
int sx = ctx->sx, sy = ctx->sy, xoff = wp->xoff;
usr.bin/tmux/screen-redraw.c
1093
if (ctx->statustop) {
usr.bin/tmux/screen-redraw.c
1094
sb_y += ctx->statuslines;
usr.bin/tmux/screen-redraw.c
1095
sy += ctx->statuslines;
usr.bin/tmux/screen-redraw.c
121
screen_redraw_pane_border(struct screen_redraw_ctx *ctx, struct window_pane *wp,
usr.bin/tmux/screen-redraw.c
126
int hsplit = 0, vsplit = 0, pane_status = ctx->pane_status;
usr.bin/tmux/screen-redraw.c
127
int pane_scrollbars = ctx->pane_scrollbars, sb_w = 0;
usr.bin/tmux/screen-redraw.c
131
sb_pos = ctx->pane_scrollbars_pos;
usr.bin/tmux/screen-redraw.c
216
screen_redraw_cell_border(struct screen_redraw_ctx *ctx, u_int px, u_int py)
usr.bin/tmux/screen-redraw.c
218
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
223
if (ctx->pane_status == PANE_STATUS_BOTTOM)
usr.bin/tmux/screen-redraw.c
238
switch (screen_redraw_pane_border(ctx, wp, px, py)) {
usr.bin/tmux/screen-redraw.c
253
screen_redraw_type_of_cell(struct screen_redraw_ctx *ctx, u_int px, u_int py)
usr.bin/tmux/screen-redraw.c
255
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
256
int pane_status = ctx->pane_status;
usr.bin/tmux/screen-redraw.c
276
if (px == 0 || screen_redraw_cell_border(ctx, px - 1, py))
usr.bin/tmux/screen-redraw.c
278
if (px <= sx && screen_redraw_cell_border(ctx, px + 1, py))
usr.bin/tmux/screen-redraw.c
282
screen_redraw_cell_border(ctx, px, py - 1))
usr.bin/tmux/screen-redraw.c
284
if (screen_redraw_cell_border(ctx, px, py + 1))
usr.bin/tmux/screen-redraw.c
288
screen_redraw_cell_border(ctx, px, py - 1))
usr.bin/tmux/screen-redraw.c
291
screen_redraw_cell_border(ctx, px, py + 1))
usr.bin/tmux/screen-redraw.c
295
screen_redraw_cell_border(ctx, px, py - 1))
usr.bin/tmux/screen-redraw.c
297
if (screen_redraw_cell_border(ctx, px, py + 1))
usr.bin/tmux/screen-redraw.c
335
screen_redraw_check_cell(struct screen_redraw_ctx *ctx, u_int px, u_int py,
usr.bin/tmux/screen-redraw.c
338
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
341
int pane_status = ctx->pane_status;
usr.bin/tmux/screen-redraw.c
343
int border, pane_scrollbars = ctx->pane_scrollbars;
usr.bin/tmux/screen-redraw.c
345
int sb_pos = ctx->pane_scrollbars_pos;
usr.bin/tmux/screen-redraw.c
353
return (screen_redraw_type_of_cell(ctx, px, py));
usr.bin/tmux/screen-redraw.c
415
border = screen_redraw_pane_border(ctx, wp, px, py);
usr.bin/tmux/screen-redraw.c
420
return (screen_redraw_type_of_cell(ctx, px, py));
usr.bin/tmux/screen-redraw.c
433
screen_redraw_check_is(struct screen_redraw_ctx *ctx, u_int px, u_int py,
usr.bin/tmux/screen-redraw.c
438
border = screen_redraw_pane_border(ctx, wp, px, py);
usr.bin/tmux/screen-redraw.c
458
struct screen_write_ctx ctx;
usr.bin/tmux/screen-redraw.c
483
screen_write_start(&ctx, &wp->status_screen);
usr.bin/tmux/screen-redraw.c
493
screen_write_cell(&ctx, &gc);
usr.bin/tmux/screen-redraw.c
497
screen_write_cursormove(&ctx, 0, 0, 0);
usr.bin/tmux/screen-redraw.c
499
format_draw(&ctx, &gc, width, expanded, &sle->ranges, 0);
usr.bin/tmux/screen-redraw.c
501
screen_write_stop(&ctx);
usr.bin/tmux/screen-redraw.c
517
screen_redraw_draw_pane_status(struct screen_redraw_ctx *ctx)
usr.bin/tmux/screen-redraw.c
519
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
534
if (ctx->pane_status == PANE_STATUS_TOP)
usr.bin/tmux/screen-redraw.c
540
if (xoff + size <= ctx->ox ||
usr.bin/tmux/screen-redraw.c
541
xoff >= ctx->ox + ctx->sx ||
usr.bin/tmux/screen-redraw.c
542
yoff < ctx->oy ||
usr.bin/tmux/screen-redraw.c
543
yoff >= ctx->oy + ctx->sy)
usr.bin/tmux/screen-redraw.c
546
if (xoff >= ctx->ox && xoff + size <= ctx->ox + ctx->sx) {
usr.bin/tmux/screen-redraw.c
549
x = xoff - ctx->ox;
usr.bin/tmux/screen-redraw.c
551
} else if (xoff < ctx->ox && xoff + size > ctx->ox + ctx->sx) {
usr.bin/tmux/screen-redraw.c
553
i = ctx->ox;
usr.bin/tmux/screen-redraw.c
555
width = ctx->sx;
usr.bin/tmux/screen-redraw.c
556
} else if (xoff < ctx->ox) {
usr.bin/tmux/screen-redraw.c
558
i = ctx->ox - xoff;
usr.bin/tmux/screen-redraw.c
564
x = xoff - ctx->ox;
usr.bin/tmux/screen-redraw.c
568
if (ctx->statustop)
usr.bin/tmux/screen-redraw.c
569
yoff += ctx->statuslines;
usr.bin/tmux/screen-redraw.c
570
tty_draw_line(tty, s, i, 0, width, x, yoff - ctx->oy,
usr.bin/tmux/screen-redraw.c
578
screen_redraw_update(struct screen_redraw_ctx *ctx, uint64_t flags)
usr.bin/tmux/screen-redraw.c
580
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
598
if (ctx->pane_status != PANE_STATUS_OFF) {
usr.bin/tmux/screen-redraw.c
599
lines = ctx->pane_lines;
usr.bin/tmux/screen-redraw.c
602
if (screen_redraw_make_pane_status(c, wp, ctx, lines))
usr.bin/tmux/screen-redraw.c
614
screen_redraw_set_context(struct client *c, struct screen_redraw_ctx *ctx)
usr.bin/tmux/screen-redraw.c
622
memset(ctx, 0, sizeof *ctx);
usr.bin/tmux/screen-redraw.c
623
ctx->c = c;
usr.bin/tmux/screen-redraw.c
629
ctx->statustop = 1;
usr.bin/tmux/screen-redraw.c
630
ctx->statuslines = lines;
usr.bin/tmux/screen-redraw.c
632
ctx->pane_status = options_get_number(wo, "pane-border-status");
usr.bin/tmux/screen-redraw.c
633
ctx->pane_lines = options_get_number(wo, "pane-border-lines");
usr.bin/tmux/screen-redraw.c
635
ctx->pane_scrollbars = options_get_number(wo, "pane-scrollbars");
usr.bin/tmux/screen-redraw.c
636
ctx->pane_scrollbars_pos = options_get_number(wo,
usr.bin/tmux/screen-redraw.c
639
tty_window_offset(&c->tty, &ctx->ox, &ctx->oy, &ctx->sx, &ctx->sy);
usr.bin/tmux/screen-redraw.c
642
w->id, ctx->ox, ctx->oy, ctx->sx, ctx->sy, ctx->statuslines,
usr.bin/tmux/screen-redraw.c
643
ctx->statustop);
usr.bin/tmux/screen-redraw.c
650
struct screen_redraw_ctx ctx;
usr.bin/tmux/screen-redraw.c
656
screen_redraw_set_context(c, &ctx);
usr.bin/tmux/screen-redraw.c
658
flags = screen_redraw_update(&ctx, c->flags);
usr.bin/tmux/screen-redraw.c
667
screen_redraw_draw_borders(&ctx);
usr.bin/tmux/screen-redraw.c
668
if (ctx.pane_status != PANE_STATUS_OFF)
usr.bin/tmux/screen-redraw.c
669
screen_redraw_draw_pane_status(&ctx);
usr.bin/tmux/screen-redraw.c
670
screen_redraw_draw_pane_scrollbars(&ctx);
usr.bin/tmux/screen-redraw.c
674
screen_redraw_draw_panes(&ctx);
usr.bin/tmux/screen-redraw.c
675
screen_redraw_draw_pane_scrollbars(&ctx);
usr.bin/tmux/screen-redraw.c
677
if (ctx.statuslines != 0 &&
usr.bin/tmux/screen-redraw.c
680
screen_redraw_draw_status(&ctx);
usr.bin/tmux/screen-redraw.c
684
c->overlay_draw(c, c->overlay_data, &ctx);
usr.bin/tmux/screen-redraw.c
695
struct screen_redraw_ctx ctx;
usr.bin/tmux/screen-redraw.c
700
screen_redraw_set_context(c, &ctx);
usr.bin/tmux/screen-redraw.c
705
screen_redraw_draw_pane(&ctx, wp);
usr.bin/tmux/screen-redraw.c
707
if (window_pane_show_scrollbar(wp, ctx.pane_scrollbars))
usr.bin/tmux/screen-redraw.c
708
screen_redraw_draw_pane_scrollbar(&ctx, wp);
usr.bin/tmux/screen-redraw.c
715
screen_redraw_draw_borders_style(struct screen_redraw_ctx *ctx, u_int x,
usr.bin/tmux/screen-redraw.c
718
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
730
if (screen_redraw_check_is(ctx, x, y, active))
usr.bin/tmux/screen-redraw.c
741
screen_redraw_draw_border_arrows(struct screen_redraw_ctx *ctx, u_int i,
usr.bin/tmux/screen-redraw.c
745
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
749
u_int x = ctx->ox + i, y = ctx->oy + j;
usr.bin/tmux/screen-redraw.c
761
border = screen_redraw_pane_border(ctx, active, x, y);
usr.bin/tmux/screen-redraw.c
813
screen_redraw_draw_borders_cell(struct screen_redraw_ctx *ctx, u_int i, u_int j)
usr.bin/tmux/screen-redraw.c
815
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
825
u_int x = ctx->ox + i, y = ctx->oy + j;
usr.bin/tmux/screen-redraw.c
835
cell_type = screen_redraw_check_cell(ctx, x, y, &wp);
usr.bin/tmux/screen-redraw.c
840
if (!ctx->no_pane_gc_set) {
usr.bin/tmux/screen-redraw.c
842
memcpy(&ctx->no_pane_gc, &grid_default_cell, sizeof gc);
usr.bin/tmux/screen-redraw.c
843
style_add(&ctx->no_pane_gc, oo, "pane-border-style",
usr.bin/tmux/screen-redraw.c
846
ctx->no_pane_gc_set = 1;
usr.bin/tmux/screen-redraw.c
848
memcpy(&gc, &ctx->no_pane_gc, sizeof gc);
usr.bin/tmux/screen-redraw.c
850
tmp = screen_redraw_draw_borders_style(ctx, x, y, wp);
usr.bin/tmux/screen-redraw.c
856
screen_redraw_check_is(ctx, x, y, marked_pane.wp))
usr.bin/tmux/screen-redraw.c
859
screen_redraw_border_set(w, wp, ctx->pane_lines, cell_type, &gc);
usr.bin/tmux/screen-redraw.c
868
if (ctx->statustop)
usr.bin/tmux/screen-redraw.c
869
tty_cursor(tty, i, ctx->statuslines + j);
usr.bin/tmux/screen-redraw.c
875
screen_redraw_draw_border_arrows(ctx, i, j, cell_type, wp, active, &gc);
usr.bin/tmux/screen-redraw.c
884
screen_redraw_draw_borders(struct screen_redraw_ctx *ctx)
usr.bin/tmux/screen-redraw.c
886
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
897
for (j = 0; j < c->tty.sy - ctx->statuslines; j++) {
usr.bin/tmux/screen-redraw.c
899
screen_redraw_draw_borders_cell(ctx, i, j);
usr.bin/tmux/screen-redraw.c
905
screen_redraw_draw_panes(struct screen_redraw_ctx *ctx)
usr.bin/tmux/screen-redraw.c
907
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
915
screen_redraw_draw_pane(ctx, wp);
usr.bin/tmux/screen-redraw.c
921
screen_redraw_draw_status(struct screen_redraw_ctx *ctx)
usr.bin/tmux/screen-redraw.c
923
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
931
if (ctx->statustop)
usr.bin/tmux/screen-redraw.c
934
y = c->tty.sy - ctx->statuslines;
usr.bin/tmux/screen-redraw.c
935
for (i = 0; i < ctx->statuslines; i++) {
usr.bin/tmux/screen-redraw.c
943
screen_redraw_draw_pane(struct screen_redraw_ctx *ctx, struct window_pane *wp)
usr.bin/tmux/screen-redraw.c
945
struct client *c = ctx->c;
usr.bin/tmux/screen-redraw.c
960
if (wp->xoff + wp->sx <= ctx->ox || wp->xoff >= ctx->ox + ctx->sx)
usr.bin/tmux/screen-redraw.c
962
if (ctx->statustop)
usr.bin/tmux/screen-redraw.c
963
top = ctx->statuslines;
usr.bin/tmux/screen-redraw.c
967
if (wp->yoff + j < ctx->oy || wp->yoff + j >= ctx->oy + ctx->sy)
usr.bin/tmux/screen-redraw.c
969
y = top + wp->yoff + j - ctx->oy;
usr.bin/tmux/screen-redraw.c
971
if (wp->xoff >= ctx->ox &&
usr.bin/tmux/screen-redraw.c
972
wp->xoff + wp->sx <= ctx->ox + ctx->sx) {
usr.bin/tmux/screen-redraw.c
975
x = wp->xoff - ctx->ox;
usr.bin/tmux/screen-redraw.c
977
} else if (wp->xoff < ctx->ox &&
usr.bin/tmux/screen-redraw.c
978
wp->xoff + wp->sx > ctx->ox + ctx->sx) {
usr.bin/tmux/screen-redraw.c
980
i = ctx->ox;
usr.bin/tmux/screen-redraw.c
982
width = ctx->sx;
usr.bin/tmux/screen-redraw.c
983
} else if (wp->xoff < ctx->ox) {
usr.bin/tmux/screen-redraw.c
985
i = ctx->ox - wp->xoff;
usr.bin/tmux/screen-redraw.c
991
x = wp->xoff - ctx->ox;
usr.bin/tmux/screen-redraw.c
992
width = ctx->sx - x;
usr.bin/tmux/screen-write.c
1003
screen_write_cursorright(struct screen_write_ctx *ctx, u_int nx)
usr.bin/tmux/screen-write.c
1005
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1018
screen_write_set_cursor(ctx, cx, cy);
usr.bin/tmux/screen-write.c
1023
screen_write_cursorleft(struct screen_write_ctx *ctx, u_int nx)
usr.bin/tmux/screen-write.c
1025
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1038
screen_write_set_cursor(ctx, cx, cy);
usr.bin/tmux/screen-write.c
1043
screen_write_backspace(struct screen_write_ctx *ctx)
usr.bin/tmux/screen-write.c
1045
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1060
screen_write_set_cursor(ctx, cx, cy);
usr.bin/tmux/screen-write.c
1065
screen_write_alignmenttest(struct screen_write_ctx *ctx)
usr.bin/tmux/screen-write.c
1067
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1080
screen_write_set_cursor(ctx, 0, 0);
usr.bin/tmux/screen-write.c
1085
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1087
screen_write_collect_clear(ctx, 0, screen_size_y(s) - 1);
usr.bin/tmux/screen-write.c
1093
screen_write_insertcharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
usr.bin/tmux/screen-write.c
1095
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1109
screen_write_initctx(ctx, &ttyctx, 0);
usr.bin/tmux/screen-write.c
1114
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1121
screen_write_deletecharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
usr.bin/tmux/screen-write.c
1123
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1137
screen_write_initctx(ctx, &ttyctx, 0);
usr.bin/tmux/screen-write.c
1142
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1149
screen_write_clearcharacter(struct screen_write_ctx *ctx, u_int nx, u_int bg)
usr.bin/tmux/screen-write.c
1151
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1165
screen_write_initctx(ctx, &ttyctx, 0);
usr.bin/tmux/screen-write.c
1170
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1177
screen_write_insertline(struct screen_write_ctx *ctx, u_int ny, u_int bg)
usr.bin/tmux/screen-write.c
1179
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1192
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1197
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1208
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1216
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1224
screen_write_deleteline(struct screen_write_ctx *ctx, u_int ny, u_int bg)
usr.bin/tmux/screen-write.c
1226
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1240
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1245
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1256
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1264
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1271
screen_write_clearline(struct screen_write_ctx *ctx, u_int bg)
usr.bin/tmux/screen-write.c
1273
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1276
struct screen_write_citem *ci = ctx->item;
usr.bin/tmux/screen-write.c
1284
screen_write_collect_clear(ctx, s->cy, 1);
usr.bin/tmux/screen-write.c
1289
TAILQ_INSERT_TAIL(&ctx->s->write_list[s->cy].items, ci, entry);
usr.bin/tmux/screen-write.c
1290
ctx->item = screen_write_get_citem();
usr.bin/tmux/screen-write.c
1295
screen_write_clearendofline(struct screen_write_ctx *ctx, u_int bg)
usr.bin/tmux/screen-write.c
1297
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1300
struct screen_write_citem *ci = ctx->item;
usr.bin/tmux/screen-write.c
1303
screen_write_clearline(ctx, bg);
usr.bin/tmux/screen-write.c
1317
screen_write_collect_insert(ctx, ci);
usr.bin/tmux/screen-write.c
1322
screen_write_clearstartofline(struct screen_write_ctx *ctx, u_int bg)
usr.bin/tmux/screen-write.c
1324
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1326
struct screen_write_citem *ci = ctx->item;
usr.bin/tmux/screen-write.c
1329
screen_write_clearline(ctx, bg);
usr.bin/tmux/screen-write.c
1342
screen_write_collect_insert(ctx, ci);
usr.bin/tmux/screen-write.c
1347
screen_write_cursormove(struct screen_write_ctx *ctx, int px, int py,
usr.bin/tmux/screen-write.c
1350
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1365
screen_write_set_cursor(ctx, px, py);
usr.bin/tmux/screen-write.c
1370
screen_write_reverseindex(struct screen_write_ctx *ctx, u_int bg)
usr.bin/tmux/screen-write.c
1372
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1377
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1379
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1384
screen_write_set_cursor(ctx, -1, s->cy - 1);
usr.bin/tmux/screen-write.c
1390
screen_write_scrollregion(struct screen_write_ctx *ctx, u_int rupper,
usr.bin/tmux/screen-write.c
1393
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1402
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1405
screen_write_set_cursor(ctx, 0, 0);
usr.bin/tmux/screen-write.c
1413
screen_write_linefeed(struct screen_write_ctx *ctx, int wrapped, u_int bg)
usr.bin/tmux/screen-write.c
1415
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1427
if (bg != ctx->bg) {
usr.bin/tmux/screen-write.c
1428
screen_write_collect_flush(ctx, 1, __func__);
usr.bin/tmux/screen-write.c
1429
ctx->bg = bg;
usr.bin/tmux/screen-write.c
1434
screen_write_collect_scroll(ctx, bg);
usr.bin/tmux/screen-write.c
1435
ctx->scrolled++;
usr.bin/tmux/screen-write.c
1437
screen_write_set_cursor(ctx, -1, s->cy + 1);
usr.bin/tmux/screen-write.c
1442
screen_write_scrollup(struct screen_write_ctx *ctx, u_int lines, u_int bg)
usr.bin/tmux/screen-write.c
1444
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1453
if (bg != ctx->bg) {
usr.bin/tmux/screen-write.c
1454
screen_write_collect_flush(ctx, 1, __func__);
usr.bin/tmux/screen-write.c
1455
ctx->bg = bg;
usr.bin/tmux/screen-write.c
1460
screen_write_collect_scroll(ctx, bg);
usr.bin/tmux/screen-write.c
1462
ctx->scrolled += lines;
usr.bin/tmux/screen-write.c
1467
screen_write_scrolldown(struct screen_write_ctx *ctx, u_int lines, u_int bg)
usr.bin/tmux/screen-write.c
1469
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1474
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1485
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1492
screen_write_carriagereturn(struct screen_write_ctx *ctx)
usr.bin/tmux/screen-write.c
1494
screen_write_set_cursor(ctx, 0, -1);
usr.bin/tmux/screen-write.c
1499
screen_write_clearendofscreen(struct screen_write_ctx *ctx, u_int bg)
usr.bin/tmux/screen-write.c
1501
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1506
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1513
ctx->wp != NULL &&
usr.bin/tmux/screen-write.c
1514
options_get_number(ctx->wp->options, "scroll-on-clear"))
usr.bin/tmux/screen-write.c
1522
screen_write_collect_clear(ctx, s->cy + 1, sy - (s->cy + 1));
usr.bin/tmux/screen-write.c
1523
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1529
screen_write_clearstartofscreen(struct screen_write_ctx *ctx, u_int bg)
usr.bin/tmux/screen-write.c
1531
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1535
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1545
screen_write_collect_clear(ctx, 0, s->cy);
usr.bin/tmux/screen-write.c
1546
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1552
screen_write_clearscreen(struct screen_write_ctx *ctx, u_int bg)
usr.bin/tmux/screen-write.c
1554
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1558
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1563
ctx->wp != NULL &&
usr.bin/tmux/screen-write.c
1564
options_get_number(ctx->wp->options, "scroll-on-clear"))
usr.bin/tmux/screen-write.c
1569
screen_write_collect_clear(ctx, 0, sy);
usr.bin/tmux/screen-write.c
1575
screen_write_clearhistory(struct screen_write_ctx *ctx)
usr.bin/tmux/screen-write.c
1577
grid_clear_history(ctx->s->grid);
usr.bin/tmux/screen-write.c
1582
screen_write_fullredraw(struct screen_write_ctx *ctx)
usr.bin/tmux/screen-write.c
1586
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1588
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1595
screen_write_collect_trim(struct screen_write_ctx *ctx, u_int y, u_int x,
usr.bin/tmux/screen-write.c
1598
struct screen_write_cline *cl = &ctx->s->write_list[y];
usr.bin/tmux/screen-write.c
1681
screen_write_collect_clear(struct screen_write_ctx *ctx, u_int y, u_int n)
usr.bin/tmux/screen-write.c
1687
cl = &ctx->s->write_list[i];
usr.bin/tmux/screen-write.c
1694
screen_write_collect_scroll(struct screen_write_ctx *ctx, u_int bg)
usr.bin/tmux/screen-write.c
1696
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1705
screen_write_collect_clear(ctx, s->rupper, 1);
usr.bin/tmux/screen-write.c
1706
saved = ctx->s->write_list[s->rupper].data;
usr.bin/tmux/screen-write.c
1708
cl = &ctx->s->write_list[y + 1];
usr.bin/tmux/screen-write.c
1709
TAILQ_CONCAT(&ctx->s->write_list[y].items, &cl->items, entry);
usr.bin/tmux/screen-write.c
1710
ctx->s->write_list[y].data = cl->data;
usr.bin/tmux/screen-write.c
1712
ctx->s->write_list[s->rlower].data = saved;
usr.bin/tmux/screen-write.c
1719
TAILQ_INSERT_TAIL(&ctx->s->write_list[s->rlower].items, ci, entry);
usr.bin/tmux/screen-write.c
1724
screen_write_collect_flush(struct screen_write_ctx *ctx, int scroll_only,
usr.bin/tmux/screen-write.c
1727
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1735
cl = &ctx->s->write_list[y];
usr.bin/tmux/screen-write.c
174
screen_write_initctx(struct screen_write_ctx *ctx, struct tty_ctx *ttyctx,
usr.bin/tmux/screen-write.c
1744
if (ctx->scrolled != 0) {
usr.bin/tmux/screen-write.c
1746
ctx->scrolled, s->rupper, s->rlower);
usr.bin/tmux/screen-write.c
1747
if (ctx->scrolled > s->rlower - s->rupper + 1)
usr.bin/tmux/screen-write.c
1748
ctx->scrolled = s->rlower - s->rupper + 1;
usr.bin/tmux/screen-write.c
1750
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1751
ttyctx.num = ctx->scrolled;
usr.bin/tmux/screen-write.c
1752
ttyctx.bg = ctx->bg;
usr.bin/tmux/screen-write.c
1755
if (ctx->wp != NULL)
usr.bin/tmux/screen-write.c
1756
ctx->wp->flags |= PANE_REDRAWSCROLLBAR;
usr.bin/tmux/screen-write.c
1758
ctx->scrolled = 0;
usr.bin/tmux/screen-write.c
1759
ctx->bg = 8;
usr.bin/tmux/screen-write.c
1766
cl = &ctx->s->write_list[y];
usr.bin/tmux/screen-write.c
177
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1775
screen_write_set_cursor(ctx, ci->x, y);
usr.bin/tmux/screen-write.c
1777
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
1782
screen_write_initctx(ctx, &ttyctx, 0);
usr.bin/tmux/screen-write.c
1803
screen_write_collect_insert(struct screen_write_ctx *ctx,
usr.bin/tmux/screen-write.c
1806
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1810
before = screen_write_collect_trim(ctx, s->cy, ci->x, ci->used,
usr.bin/tmux/screen-write.c
1816
ctx->item = screen_write_get_citem();
usr.bin/tmux/screen-write.c
1821
screen_write_collect_end(struct screen_write_ctx *ctx)
usr.bin/tmux/screen-write.c
1823
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1824
struct screen_write_citem *ci = ctx->item, *bci = NULL, *aci;
usr.bin/tmux/screen-write.c
1833
screen_write_collect_insert(ctx, ci);
usr.bin/tmux/screen-write.c
1860
bci = ctx->item;
usr.bin/tmux/screen-write.c
1873
screen_write_collect_insert(ctx, bci);
usr.bin/tmux/screen-write.c
1874
screen_write_set_cursor(ctx, s->cx + ci->used, -1);
usr.bin/tmux/screen-write.c
1885
aci = ctx->item;
usr.bin/tmux/screen-write.c
1892
screen_write_collect_insert(ctx, aci);
usr.bin/tmux/screen-write.c
1898
screen_write_collect_add(struct screen_write_ctx *ctx,
usr.bin/tmux/screen-write.c
1901
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
191
if (ctx->init_ctx_cb != NULL) {
usr.bin/tmux/screen-write.c
192
ctx->init_ctx_cb(ctx, ttyctx);
usr.bin/tmux/screen-write.c
1926
screen_write_collect_end(ctx);
usr.bin/tmux/screen-write.c
1927
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1928
screen_write_cell(ctx, gc);
usr.bin/tmux/screen-write.c
1932
if (s->cx > sx - 1 || ctx->item->used > sx - 1 - s->cx)
usr.bin/tmux/screen-write.c
1933
screen_write_collect_end(ctx);
usr.bin/tmux/screen-write.c
1934
ci = ctx->item; /* may have changed */
usr.bin/tmux/screen-write.c
1939
screen_write_linefeed(ctx, 1, 8);
usr.bin/tmux/screen-write.c
1940
screen_write_set_cursor(ctx, 0, -1);
usr.bin/tmux/screen-write.c
1945
if (ctx->s->write_list[s->cy].data == NULL)
usr.bin/tmux/screen-write.c
1946
ctx->s->write_list[s->cy].data = xmalloc(screen_size_x(ctx->s));
usr.bin/tmux/screen-write.c
1947
ctx->s->write_list[s->cy].data[s->cx + ci->used++] = gc->data.data[0];
usr.bin/tmux/screen-write.c
1952
screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
usr.bin/tmux/screen-write.c
1954
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
1970
if (screen_write_combine(ctx, gc) != 0)
usr.bin/tmux/screen-write.c
1974
screen_write_collect_flush(ctx, 1, __func__);
usr.bin/tmux/screen-write.c
1991
screen_write_linefeed(ctx, 1, 8);
usr.bin/tmux/screen-write.c
1992
screen_write_set_cursor(ctx, 0, -1);
usr.bin/tmux/screen-write.c
1993
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
1999
screen_write_initctx(ctx, &ttyctx, 0);
usr.bin/tmux/screen-write.c
2005
if (screen_write_overwrite(ctx, &now_gc, width)) {
usr.bin/tmux/screen-write.c
201
if (ctx->wp != NULL) {
usr.bin/tmux/screen-write.c
202
tty_default_colours(&ttyctx->defaults, ctx->wp);
usr.bin/tmux/screen-write.c
203
ttyctx->palette = &ctx->wp->palette;
usr.bin/tmux/screen-write.c
205
ttyctx->arg = ctx->wp;
usr.bin/tmux/screen-write.c
2067
screen_write_set_cursor(ctx, s->cx + width, -1);
usr.bin/tmux/screen-write.c
2069
screen_write_set_cursor(ctx, sx - not_wrap, -1);
usr.bin/tmux/screen-write.c
2073
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
209
if (~ctx->flags & SCREEN_WRITE_SYNC) {
usr.bin/tmux/screen-write.c
2092
screen_write_combine(struct screen_write_ctx *ctx, const struct grid_cell *gc)
usr.bin/tmux/screen-write.c
2094
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
216
if (ctx->wp != NULL) {
usr.bin/tmux/screen-write.c
2165
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
217
if (ctx->wp != ctx->wp->window->active)
usr.bin/tmux/screen-write.c
2194
screen_write_set_cursor(ctx, cx - n, cy);
usr.bin/tmux/screen-write.c
2195
screen_write_initctx(ctx, &ttyctx, 0);
usr.bin/tmux/screen-write.c
2199
screen_write_set_cursor(ctx, cx, cy);
usr.bin/tmux/screen-write.c
2214
screen_write_overwrite(struct screen_write_ctx *ctx, struct grid_cell *gc,
usr.bin/tmux/screen-write.c
2217
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
224
ctx->flags |= SCREEN_WRITE_SYNC;
usr.bin/tmux/screen-write.c
2278
screen_write_setselection(struct screen_write_ctx *ctx, const char *clip,
usr.bin/tmux/screen-write.c
2283
screen_write_initctx(ctx, &ttyctx, 0);
usr.bin/tmux/screen-write.c
2293
screen_write_rawstring(struct screen_write_ctx *ctx, u_char *str, u_int len,
usr.bin/tmux/screen-write.c
2298
screen_write_initctx(ctx, &ttyctx, 0);
usr.bin/tmux/screen-write.c
2308
screen_write_alternateon(struct screen_write_ctx *ctx, struct grid_cell *gc,
usr.bin/tmux/screen-write.c
2312
struct window_pane *wp = ctx->wp;
usr.bin/tmux/screen-write.c
2317
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
2318
screen_alternate_on(ctx->s, gc, cursor);
usr.bin/tmux/screen-write.c
2325
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
2332
screen_write_alternateoff(struct screen_write_ctx *ctx, struct grid_cell *gc,
usr.bin/tmux/screen-write.c
2336
struct window_pane *wp = ctx->wp;
usr.bin/tmux/screen-write.c
2341
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
2342
screen_alternate_off(ctx->s, gc, cursor);
usr.bin/tmux/screen-write.c
2349
screen_write_initctx(ctx, &ttyctx, 1);
usr.bin/tmux/screen-write.c
252
screen_write_init(struct screen_write_ctx *ctx, struct screen *s)
usr.bin/tmux/screen-write.c
254
memset(ctx, 0, sizeof *ctx);
usr.bin/tmux/screen-write.c
256
ctx->s = s;
usr.bin/tmux/screen-write.c
258
if (ctx->s->write_list == NULL)
usr.bin/tmux/screen-write.c
259
screen_write_make_list(ctx->s);
usr.bin/tmux/screen-write.c
260
ctx->item = screen_write_get_citem();
usr.bin/tmux/screen-write.c
262
ctx->scrolled = 0;
usr.bin/tmux/screen-write.c
263
ctx->bg = 8;
usr.bin/tmux/screen-write.c
268
screen_write_start_pane(struct screen_write_ctx *ctx, struct window_pane *wp,
usr.bin/tmux/screen-write.c
273
screen_write_init(ctx, s);
usr.bin/tmux/screen-write.c
274
ctx->wp = wp;
usr.bin/tmux/screen-write.c
278
__func__, screen_size_x(ctx->s), screen_size_y(ctx->s),
usr.bin/tmux/screen-write.c
285
screen_write_start_callback(struct screen_write_ctx *ctx, struct screen *s,
usr.bin/tmux/screen-write.c
288
screen_write_init(ctx, s);
usr.bin/tmux/screen-write.c
290
ctx->init_ctx_cb = cb;
usr.bin/tmux/screen-write.c
291
ctx->arg = arg;
usr.bin/tmux/screen-write.c
295
screen_size_x(ctx->s), screen_size_y(ctx->s));
usr.bin/tmux/screen-write.c
301
screen_write_start(struct screen_write_ctx *ctx, struct screen *s)
usr.bin/tmux/screen-write.c
303
screen_write_init(ctx, s);
usr.bin/tmux/screen-write.c
307
screen_size_x(ctx->s), screen_size_y(ctx->s));
usr.bin/tmux/screen-write.c
313
screen_write_stop(struct screen_write_ctx *ctx)
usr.bin/tmux/screen-write.c
315
screen_write_collect_end(ctx);
usr.bin/tmux/screen-write.c
316
screen_write_collect_flush(ctx, 0, __func__);
usr.bin/tmux/screen-write.c
318
screen_write_free_citem(ctx->item);
usr.bin/tmux/screen-write.c
323
screen_write_reset(struct screen_write_ctx *ctx)
usr.bin/tmux/screen-write.c
325
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
328
screen_write_scrollregion(ctx, 0, screen_size_y(s) - 1);
usr.bin/tmux/screen-write.c
335
screen_write_clearscreen(ctx, 8);
usr.bin/tmux/screen-write.c
336
screen_write_set_cursor(ctx, 0, 0);
usr.bin/tmux/screen-write.c
341
screen_write_putc(struct screen_write_ctx *ctx, const struct grid_cell *gcp,
usr.bin/tmux/screen-write.c
349
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
394
screen_write_text(struct screen_write_ctx *ctx, u_int cx, u_int width,
usr.bin/tmux/screen-write.c
397
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
450
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
458
screen_write_cursormove(ctx, cx, s->cy + 1, 0);
usr.bin/tmux/screen-write.c
478
screen_write_cursormove(ctx, cx, s->cy + 1, 0);
usr.bin/tmux/screen-write.c
484
screen_write_puts(struct screen_write_ctx *ctx, const struct grid_cell *gcp,
usr.bin/tmux/screen-write.c
490
screen_write_vnputs(ctx, -1, gcp, fmt, ap);
usr.bin/tmux/screen-write.c
496
screen_write_nputs(struct screen_write_ctx *ctx, ssize_t maxlen,
usr.bin/tmux/screen-write.c
502
screen_write_vnputs(ctx, maxlen, gcp, fmt, ap);
usr.bin/tmux/screen-write.c
507
screen_write_vnputs(struct screen_write_ctx *ctx, ssize_t maxlen,
usr.bin/tmux/screen-write.c
536
screen_write_putc(ctx, &gc, ' ');
usr.bin/tmux/screen-write.c
542
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
550
screen_write_linefeed(ctx, 0, 8);
usr.bin/tmux/screen-write.c
551
screen_write_carriagereturn(ctx);
usr.bin/tmux/screen-write.c
554
screen_write_putc(ctx, &gc, *ptr);
usr.bin/tmux/screen-write.c
568
screen_write_fast_copy(struct screen_write_ctx *ctx, struct screen *src,
usr.bin/tmux/screen-write.c
571
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
572
struct window_pane *wp = ctx->wp;
usr.bin/tmux/screen-write.c
586
screen_write_initctx(ctx, &ttyctx, 0);
usr.bin/tmux/screen-write.c
589
s->cx >= grid_get_line(ctx->s->grid, s->cy)->cellsize)
usr.bin/tmux/screen-write.c
594
grid_view_set_cell(ctx->s->grid, s->cx, s->cy, &gc);
usr.bin/tmux/screen-write.c
647
screen_write_hline(struct screen_write_ctx *ctx, u_int nx, int left, int right,
usr.bin/tmux/screen-write.c
650
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
667
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
671
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
677
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
679
screen_write_set_cursor(ctx, cx, cy);
usr.bin/tmux/screen-write.c
684
screen_write_vline(struct screen_write_ctx *ctx, u_int ny, int top, int bottom)
usr.bin/tmux/screen-write.c
686
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
696
screen_write_putc(ctx, &gc, top ? 'w' : 'x');
usr.bin/tmux/screen-write.c
698
screen_write_set_cursor(ctx, cx, cy + i);
usr.bin/tmux/screen-write.c
699
screen_write_putc(ctx, &gc, 'x');
usr.bin/tmux/screen-write.c
701
screen_write_set_cursor(ctx, cx, cy + ny - 1);
usr.bin/tmux/screen-write.c
702
screen_write_putc(ctx, &gc, bottom ? 'v' : 'x');
usr.bin/tmux/screen-write.c
704
screen_write_set_cursor(ctx, cx, cy);
usr.bin/tmux/screen-write.c
709
screen_write_menu(struct screen_write_ctx *ctx, struct menu *menu, int choice,
usr.bin/tmux/screen-write.c
713
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
724
screen_write_box(ctx, menu->width + 4, menu->count + 2, lines,
usr.bin/tmux/screen-write.c
730
screen_write_cursormove(ctx, cx, cy + 1 + i, 0);
usr.bin/tmux/screen-write.c
731
screen_write_hline(ctx, width + 4, 1, 1, lines,
usr.bin/tmux/screen-write.c
739
screen_write_cursormove(ctx, cx + 1, cy + 1 + i, 0);
usr.bin/tmux/screen-write.c
741
screen_write_putc(ctx, gc, ' ');
usr.bin/tmux/screen-write.c
743
screen_write_cursormove(ctx, cx + 2, cy + 1 + i, 0);
usr.bin/tmux/screen-write.c
746
format_draw(ctx, gc, width, name + 1, NULL, 0);
usr.bin/tmux/screen-write.c
751
format_draw(ctx, gc, width, name, NULL, 0);
usr.bin/tmux/screen-write.c
755
screen_write_set_cursor(ctx, cx, cy);
usr.bin/tmux/screen-write.c
760
screen_write_box(struct screen_write_ctx *ctx, u_int nx, u_int ny,
usr.bin/tmux/screen-write.c
763
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
780
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
783
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
785
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
788
screen_write_set_cursor(ctx, cx, cy + ny - 1);
usr.bin/tmux/screen-write.c
790
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
793
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
795
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
801
screen_write_set_cursor(ctx, cx, cy + i);
usr.bin/tmux/screen-write.c
802
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
804
screen_write_set_cursor(ctx, cx + nx - 1, cy + i);
usr.bin/tmux/screen-write.c
805
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
810
screen_write_cursormove(ctx, cx + 2, cy, 0);
usr.bin/tmux/screen-write.c
811
format_draw(ctx, &gc, nx - 4, title, NULL, 0);
usr.bin/tmux/screen-write.c
814
screen_write_set_cursor(ctx, cx, cy);
usr.bin/tmux/screen-write.c
822
screen_write_preview(struct screen_write_ctx *ctx, struct screen *src, u_int nx,
usr.bin/tmux/screen-write.c
825
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
864
screen_write_fast_copy(ctx, src, px, src->grid->hsize + py, nx, ny);
usr.bin/tmux/screen-write.c
869
screen_write_set_cursor(ctx, cx + (src->cx - px),
usr.bin/tmux/screen-write.c
871
screen_write_cell(ctx, &gc);
usr.bin/tmux/screen-write.c
877
screen_write_mode_set(struct screen_write_ctx *ctx, int mode)
usr.bin/tmux/screen-write.c
879
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
889
screen_write_mode_clear(struct screen_write_ctx *ctx, int mode)
usr.bin/tmux/screen-write.c
89
screen_write_set_cursor(struct screen_write_ctx *ctx, int cx, int cy)
usr.bin/tmux/screen-write.c
891
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
91
struct window_pane *wp = ctx->wp;
usr.bin/tmux/screen-write.c
93
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
947
screen_write_cursorup(struct screen_write_ctx *ctx, u_int ny)
usr.bin/tmux/screen-write.c
949
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
969
screen_write_set_cursor(ctx, cx, cy);
usr.bin/tmux/screen-write.c
974
screen_write_cursordown(struct screen_write_ctx *ctx, u_int ny)
usr.bin/tmux/screen-write.c
976
struct screen *s = ctx->s;
usr.bin/tmux/screen-write.c
998
screen_write_set_cursor(ctx, cx, cy);
usr.bin/tmux/server-fn.c
318
struct screen_write_ctx ctx;
usr.bin/tmux/server-fn.c
355
screen_write_start_pane(&ctx, wp, &wp->base);
usr.bin/tmux/server-fn.c
356
screen_write_scrollregion(&ctx, 0, sy - 1);
usr.bin/tmux/server-fn.c
357
screen_write_cursormove(&ctx, 0, sy - 1, 0);
usr.bin/tmux/server-fn.c
358
screen_write_linefeed(&ctx, 1, 8);
usr.bin/tmux/server-fn.c
362
format_draw(&ctx, &gc, sx, expanded, NULL, 0);
usr.bin/tmux/server-fn.c
365
screen_write_stop(&ctx);
usr.bin/tmux/status.c
362
struct screen_write_ctx ctx;
usr.bin/tmux/status.c
408
screen_write_start(&ctx, &sl->screen);
usr.bin/tmux/status.c
414
screen_write_putc(&ctx, &gc, ' ');
usr.bin/tmux/status.c
417
screen_write_cursormove(&ctx, 0, i, 0);
usr.bin/tmux/status.c
422
screen_write_putc(&ctx, &gc, ' ');
usr.bin/tmux/status.c
437
screen_write_putc(&ctx, &gc, ' ');
usr.bin/tmux/status.c
438
screen_write_cursormove(&ctx, 0, i, 0);
usr.bin/tmux/status.c
441
format_draw(&ctx, &gc, width, expanded, &sle->ranges,
usr.bin/tmux/status.c
448
screen_write_stop(&ctx);
usr.bin/tmux/status.c
607
struct screen_write_ctx ctx;
usr.bin/tmux/status.c
652
screen_write_start(&ctx, sl->active);
usr.bin/tmux/status.c
653
screen_write_fast_copy(&ctx, &sl->screen, 0, 0, c->tty.sx, lines);
usr.bin/tmux/status.c
654
screen_write_cursormove(&ctx, ax, messageline, 0);
usr.bin/tmux/status.c
655
format_draw(&ctx, &gc, aw, expanded, NULL, 0);
usr.bin/tmux/status.c
656
screen_write_stop(&ctx);
usr.bin/tmux/status.c
795
status_prompt_redraw_character(struct screen_write_ctx *ctx, u_int offset,
usr.bin/tmux/status.c
819
screen_write_cell(ctx, gc);
usr.bin/tmux/status.c
829
struct screen_write_ctx *ctx, u_int offset, u_int pwidth, u_int *width,
usr.bin/tmux/status.c
834
if (c->prompt_flags & PROMPT_QUOTENEXT && ctx->s->cx == pcursor + 1) {
usr.bin/tmux/status.c
836
return (status_prompt_redraw_character(ctx, offset, pwidth,
usr.bin/tmux/status.c
847
struct screen_write_ctx ctx;
usr.bin/tmux/status.c
905
screen_write_start(&ctx, sl->active);
usr.bin/tmux/status.c
906
screen_write_fast_copy(&ctx, &sl->screen, 0, 0, c->tty.sx, lines);
usr.bin/tmux/status.c
907
screen_write_cursormove(&ctx, ax, promptline, 0);
usr.bin/tmux/status.c
908
format_draw(&ctx, &gc, aw, expanded, NULL, 0);
usr.bin/tmux/status.c
909
screen_write_cursormove(&ctx, ax + start, promptline, 0);
usr.bin/tmux/status.c
936
if (!status_prompt_redraw_quote(c, pcursor, &ctx, offset,
usr.bin/tmux/status.c
939
if (!status_prompt_redraw_character(&ctx, offset, pwidth,
usr.bin/tmux/status.c
943
status_prompt_redraw_quote(c, pcursor, &ctx, offset, pwidth, &width,
usr.bin/tmux/status.c
947
screen_write_stop(&ctx);
usr.bin/tmux/tty.c
1056
tty_large_region(__unused struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1058
return (ctx->orlower - ctx->orupper >= ctx->sy / 2);
usr.bin/tmux/tty.c
1081
tty_redraw_region(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1090
if (tty_large_region(tty, ctx)) {
usr.bin/tmux/tty.c
1092
ctx->redraw_cb(ctx);
usr.bin/tmux/tty.c
1096
for (i = ctx->orupper; i <= ctx->orlower; i++)
usr.bin/tmux/tty.c
1097
tty_draw_pane(tty, ctx, i);
usr.bin/tmux/tty.c
1102
tty_is_visible(__unused struct tty *tty, const struct tty_ctx *ctx, u_int px,
usr.bin/tmux/tty.c
1105
u_int xoff = ctx->rxoff + px, yoff = ctx->ryoff + py;
usr.bin/tmux/tty.c
1107
if (!ctx->bigger)
usr.bin/tmux/tty.c
1110
if (xoff + nx <= ctx->wox || xoff >= ctx->wox + ctx->wsx ||
usr.bin/tmux/tty.c
1111
yoff + ny <= ctx->woy || yoff >= ctx->woy + ctx->wsy)
usr.bin/tmux/tty.c
1118
tty_clamp_line(struct tty *tty, const struct tty_ctx *ctx, u_int px, u_int py,
usr.bin/tmux/tty.c
1121
u_int xoff = ctx->rxoff + px;
usr.bin/tmux/tty.c
1123
if (!tty_is_visible(tty, ctx, px, py, nx, 1))
usr.bin/tmux/tty.c
1125
*ry = ctx->yoff + py - ctx->woy;
usr.bin/tmux/tty.c
1127
if (xoff >= ctx->wox && xoff + nx <= ctx->wox + ctx->wsx) {
usr.bin/tmux/tty.c
1130
*x = ctx->xoff + px - ctx->wox;
usr.bin/tmux/tty.c
1132
} else if (xoff < ctx->wox && xoff + nx > ctx->wox + ctx->wsx) {
usr.bin/tmux/tty.c
1134
*i = ctx->wox;
usr.bin/tmux/tty.c
1136
*rx = ctx->wsx;
usr.bin/tmux/tty.c
1137
} else if (xoff < ctx->wox) {
usr.bin/tmux/tty.c
1139
*i = ctx->wox - (ctx->xoff + px);
usr.bin/tmux/tty.c
1145
*x = (ctx->xoff + px) - ctx->wox;
usr.bin/tmux/tty.c
1146
*rx = ctx->wsx - *x;
usr.bin/tmux/tty.c
1210
tty_clear_pane_line(struct tty *tty, const struct tty_ctx *ctx, u_int py,
usr.bin/tmux/tty.c
1218
if (tty_clamp_line(tty, ctx, px, py, nx, &i, &x, &rx, &ry))
usr.bin/tmux/tty.c
1219
tty_clear_line(tty, &ctx->defaults, ry, x, rx, bg);
usr.bin/tmux/tty.c
1224
tty_clamp_area(struct tty *tty, const struct tty_ctx *ctx, u_int px, u_int py,
usr.bin/tmux/tty.c
1228
u_int xoff = ctx->rxoff + px, yoff = ctx->ryoff + py;
usr.bin/tmux/tty.c
1230
if (!tty_is_visible(tty, ctx, px, py, nx, ny))
usr.bin/tmux/tty.c
1233
if (xoff >= ctx->wox && xoff + nx <= ctx->wox + ctx->wsx) {
usr.bin/tmux/tty.c
1236
*x = ctx->xoff + px - ctx->wox;
usr.bin/tmux/tty.c
1238
} else if (xoff < ctx->wox && xoff + nx > ctx->wox + ctx->wsx) {
usr.bin/tmux/tty.c
1240
*i = ctx->wox;
usr.bin/tmux/tty.c
1242
*rx = ctx->wsx;
usr.bin/tmux/tty.c
1243
} else if (xoff < ctx->wox) {
usr.bin/tmux/tty.c
1245
*i = ctx->wox - (ctx->xoff + px);
usr.bin/tmux/tty.c
1251
*x = (ctx->xoff + px) - ctx->wox;
usr.bin/tmux/tty.c
1252
*rx = ctx->wsx - *x;
usr.bin/tmux/tty.c
1257
if (yoff >= ctx->woy && yoff + ny <= ctx->woy + ctx->wsy) {
usr.bin/tmux/tty.c
1260
*y = ctx->yoff + py - ctx->woy;
usr.bin/tmux/tty.c
1262
} else if (yoff < ctx->woy && yoff + ny > ctx->woy + ctx->wsy) {
usr.bin/tmux/tty.c
1264
*j = ctx->woy;
usr.bin/tmux/tty.c
1266
*ry = ctx->wsy;
usr.bin/tmux/tty.c
1267
} else if (yoff < ctx->woy) {
usr.bin/tmux/tty.c
1269
*j = ctx->woy - (ctx->yoff + py);
usr.bin/tmux/tty.c
1275
*y = (ctx->yoff + py) - ctx->woy;
usr.bin/tmux/tty.c
1276
*ry = ctx->wsy - *y;
usr.bin/tmux/tty.c
1358
tty_clear_pane_area(struct tty *tty, const struct tty_ctx *ctx, u_int py,
usr.bin/tmux/tty.c
1363
if (tty_clamp_area(tty, ctx, px, py, nx, ny, &i, &j, &x, &y, &rx, &ry))
usr.bin/tmux/tty.c
1364
tty_clear_area(tty, &ctx->defaults, y, ry, x, rx, bg);
usr.bin/tmux/tty.c
1368
tty_draw_pane(struct tty *tty, const struct tty_ctx *ctx, u_int py)
usr.bin/tmux/tty.c
1370
struct screen *s = ctx->s;
usr.bin/tmux/tty.c
1371
u_int nx = ctx->sx, i, x, rx, ry, j;
usr.bin/tmux/tty.c
1375
log_debug("%s: %s %u %d", __func__, tty->client->name, py, ctx->bigger);
usr.bin/tmux/tty.c
1377
if (!ctx->bigger) {
usr.bin/tmux/tty.c
1378
r = tty_check_overlay_range(tty, ctx->xoff, ctx->yoff + py, nx);
usr.bin/tmux/tty.c
1382
tty_draw_line(tty, s, rr->px - ctx->xoff, py,
usr.bin/tmux/tty.c
1383
rr->nx, rr->px, ctx->yoff + py,
usr.bin/tmux/tty.c
1384
&ctx->defaults, ctx->palette);
usr.bin/tmux/tty.c
1389
if (tty_clamp_line(tty, ctx, 0, py, nx, &i, &x, &rx, &ry)) {
usr.bin/tmux/tty.c
1395
rr->nx, rr->px, ry, &ctx->defaults,
usr.bin/tmux/tty.c
1396
ctx->palette);
usr.bin/tmux/tty.c
1496
tty_client_ready(const struct tty_ctx *ctx, struct client *c)
usr.bin/tmux/tty.c
1507
if (ctx->allow_invisible_panes)
usr.bin/tmux/tty.c
1519
struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1524
if (ctx->set_client_cb == NULL)
usr.bin/tmux/tty.c
1527
if (tty_client_ready(ctx, c)) {
usr.bin/tmux/tty.c
1528
state = ctx->set_client_cb(ctx, c);
usr.bin/tmux/tty.c
1533
cmdfn(&c->tty, ctx);
usr.bin/tmux/tty.c
1539
tty_cmd_insertcharacter(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1543
if (ctx->bigger ||
usr.bin/tmux/tty.c
1544
!tty_full_width(tty, ctx) ||
usr.bin/tmux/tty.c
1545
tty_fake_bce(tty, &ctx->defaults, ctx->bg) ||
usr.bin/tmux/tty.c
1549
tty_draw_pane(tty, ctx, ctx->ocy);
usr.bin/tmux/tty.c
1553
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1554
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1556
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
usr.bin/tmux/tty.c
1558
tty_emulate_repeat(tty, TTYC_ICH, TTYC_ICH1, ctx->num);
usr.bin/tmux/tty.c
1562
tty_cmd_deletecharacter(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1566
if (ctx->bigger ||
usr.bin/tmux/tty.c
1567
!tty_full_width(tty, ctx) ||
usr.bin/tmux/tty.c
1568
tty_fake_bce(tty, &ctx->defaults, ctx->bg) ||
usr.bin/tmux/tty.c
1572
tty_draw_pane(tty, ctx, ctx->ocy);
usr.bin/tmux/tty.c
1576
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1577
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1579
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
usr.bin/tmux/tty.c
1581
tty_emulate_repeat(tty, TTYC_DCH, TTYC_DCH1, ctx->num);
usr.bin/tmux/tty.c
1585
tty_cmd_clearcharacter(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1587
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1588
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1590
tty_clear_pane_line(tty, ctx, ctx->ocy, ctx->ocx, ctx->num, ctx->bg);
usr.bin/tmux/tty.c
1594
tty_cmd_insertline(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1598
if (ctx->bigger ||
usr.bin/tmux/tty.c
1599
!tty_full_width(tty, ctx) ||
usr.bin/tmux/tty.c
1600
tty_fake_bce(tty, &ctx->defaults, ctx->bg) ||
usr.bin/tmux/tty.c
1603
ctx->sx == 1 ||
usr.bin/tmux/tty.c
1604
ctx->sy == 1 ||
usr.bin/tmux/tty.c
1606
tty_redraw_region(tty, ctx);
usr.bin/tmux/tty.c
1610
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1611
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1613
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
usr.bin/tmux/tty.c
1615
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
usr.bin/tmux/tty.c
1617
tty_emulate_repeat(tty, TTYC_IL, TTYC_IL1, ctx->num);
usr.bin/tmux/tty.c
1622
tty_cmd_deleteline(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1626
if (ctx->bigger ||
usr.bin/tmux/tty.c
1627
!tty_full_width(tty, ctx) ||
usr.bin/tmux/tty.c
1628
tty_fake_bce(tty, &ctx->defaults, ctx->bg) ||
usr.bin/tmux/tty.c
1631
ctx->sx == 1 ||
usr.bin/tmux/tty.c
1632
ctx->sy == 1 ||
usr.bin/tmux/tty.c
1634
tty_redraw_region(tty, ctx);
usr.bin/tmux/tty.c
1638
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1639
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1641
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
usr.bin/tmux/tty.c
1643
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
usr.bin/tmux/tty.c
1645
tty_emulate_repeat(tty, TTYC_DL, TTYC_DL1, ctx->num);
usr.bin/tmux/tty.c
1650
tty_cmd_clearline(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1652
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1653
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1655
tty_clear_pane_line(tty, ctx, ctx->ocy, 0, ctx->sx, ctx->bg);
usr.bin/tmux/tty.c
1659
tty_cmd_clearendofline(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1661
u_int nx = ctx->sx - ctx->ocx;
usr.bin/tmux/tty.c
1663
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1664
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1666
tty_clear_pane_line(tty, ctx, ctx->ocy, ctx->ocx, nx, ctx->bg);
usr.bin/tmux/tty.c
1670
tty_cmd_clearstartofline(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1672
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1673
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1675
tty_clear_pane_line(tty, ctx, ctx->ocy, 0, ctx->ocx + 1, ctx->bg);
usr.bin/tmux/tty.c
1679
tty_cmd_reverseindex(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1683
if (ctx->ocy != ctx->orupper)
usr.bin/tmux/tty.c
1686
if (ctx->bigger ||
usr.bin/tmux/tty.c
1687
(!tty_full_width(tty, ctx) && !tty_use_margin(tty)) ||
usr.bin/tmux/tty.c
1688
tty_fake_bce(tty, &ctx->defaults, 8) ||
usr.bin/tmux/tty.c
1692
ctx->sx == 1 ||
usr.bin/tmux/tty.c
1693
ctx->sy == 1 ||
usr.bin/tmux/tty.c
1695
tty_redraw_region(tty, ctx);
usr.bin/tmux/tty.c
1699
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1700
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1702
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
usr.bin/tmux/tty.c
1703
tty_margin_pane(tty, ctx);
usr.bin/tmux/tty.c
1704
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->orupper);
usr.bin/tmux/tty.c
1713
tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1717
if (ctx->ocy != ctx->orlower)
usr.bin/tmux/tty.c
1720
if (ctx->bigger ||
usr.bin/tmux/tty.c
1721
(!tty_full_width(tty, ctx) && !tty_use_margin(tty)) ||
usr.bin/tmux/tty.c
1722
tty_fake_bce(tty, &ctx->defaults, 8) ||
usr.bin/tmux/tty.c
1724
ctx->sx == 1 ||
usr.bin/tmux/tty.c
1725
ctx->sy == 1 ||
usr.bin/tmux/tty.c
1727
tty_redraw_region(tty, ctx);
usr.bin/tmux/tty.c
1731
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1732
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1734
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
usr.bin/tmux/tty.c
1735
tty_margin_pane(tty, ctx);
usr.bin/tmux/tty.c
1744
if (ctx->xoff + ctx->ocx > tty->rright) {
usr.bin/tmux/tty.c
1746
tty_cursor(tty, 0, ctx->yoff + ctx->ocy);
usr.bin/tmux/tty.c
1748
tty_cursor(tty, tty->rright, ctx->yoff + ctx->ocy);
usr.bin/tmux/tty.c
1750
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->ocy);
usr.bin/tmux/tty.c
1756
tty_cmd_scrollup(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1761
if (ctx->bigger ||
usr.bin/tmux/tty.c
1762
(!tty_full_width(tty, ctx) && !tty_use_margin(tty)) ||
usr.bin/tmux/tty.c
1763
tty_fake_bce(tty, &ctx->defaults, 8) ||
usr.bin/tmux/tty.c
1765
ctx->sx == 1 ||
usr.bin/tmux/tty.c
1766
ctx->sy == 1 ||
usr.bin/tmux/tty.c
1768
tty_redraw_region(tty, ctx);
usr.bin/tmux/tty.c
1772
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1773
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1775
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
usr.bin/tmux/tty.c
1776
tty_margin_pane(tty, ctx);
usr.bin/tmux/tty.c
1778
if (ctx->num == 1 || !tty_term_has(tty->term, TTYC_INDN)) {
usr.bin/tmux/tty.c
1783
for (i = 0; i < ctx->num; i++)
usr.bin/tmux/tty.c
1790
tty_putcode_i(tty, TTYC_INDN, ctx->num);
usr.bin/tmux/tty.c
1795
tty_cmd_scrolldown(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1800
if (ctx->bigger ||
usr.bin/tmux/tty.c
1801
(!tty_full_width(tty, ctx) && !tty_use_margin(tty)) ||
usr.bin/tmux/tty.c
1802
tty_fake_bce(tty, &ctx->defaults, 8) ||
usr.bin/tmux/tty.c
1806
ctx->sx == 1 ||
usr.bin/tmux/tty.c
1807
ctx->sy == 1 ||
usr.bin/tmux/tty.c
1809
tty_redraw_region(tty, ctx);
usr.bin/tmux/tty.c
1813
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1814
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1816
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
usr.bin/tmux/tty.c
1817
tty_margin_pane(tty, ctx);
usr.bin/tmux/tty.c
1818
tty_cursor_pane(tty, ctx, ctx->ocx, ctx->orupper);
usr.bin/tmux/tty.c
1821
tty_putcode_i(tty, TTYC_RIN, ctx->num);
usr.bin/tmux/tty.c
1823
for (i = 0; i < ctx->num; i++)
usr.bin/tmux/tty.c
1829
tty_cmd_clearendofscreen(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1833
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1834
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1836
tty_region_pane(tty, ctx, 0, ctx->sy - 1);
usr.bin/tmux/tty.c
1840
nx = ctx->sx;
usr.bin/tmux/tty.c
1841
py = ctx->ocy + 1;
usr.bin/tmux/tty.c
1842
ny = ctx->sy - ctx->ocy - 1;
usr.bin/tmux/tty.c
1844
tty_clear_pane_area(tty, ctx, py, ny, px, nx, ctx->bg);
usr.bin/tmux/tty.c
1846
px = ctx->ocx;
usr.bin/tmux/tty.c
1847
nx = ctx->sx - ctx->ocx;
usr.bin/tmux/tty.c
1848
py = ctx->ocy;
usr.bin/tmux/tty.c
1850
tty_clear_pane_line(tty, ctx, py, px, nx, ctx->bg);
usr.bin/tmux/tty.c
1854
tty_cmd_clearstartofscreen(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1858
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1859
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1861
tty_region_pane(tty, ctx, 0, ctx->sy - 1);
usr.bin/tmux/tty.c
1865
nx = ctx->sx;
usr.bin/tmux/tty.c
1867
ny = ctx->ocy;
usr.bin/tmux/tty.c
1869
tty_clear_pane_area(tty, ctx, py, ny, px, nx, ctx->bg);
usr.bin/tmux/tty.c
1872
nx = ctx->ocx + 1;
usr.bin/tmux/tty.c
1873
py = ctx->ocy;
usr.bin/tmux/tty.c
1875
tty_clear_pane_line(tty, ctx, py, px, nx, ctx->bg);
usr.bin/tmux/tty.c
1879
tty_cmd_clearscreen(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1883
tty_default_attributes(tty, &ctx->defaults, ctx->palette, ctx->bg,
usr.bin/tmux/tty.c
1884
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1886
tty_region_pane(tty, ctx, 0, ctx->sy - 1);
usr.bin/tmux/tty.c
1890
nx = ctx->sx;
usr.bin/tmux/tty.c
1892
ny = ctx->sy;
usr.bin/tmux/tty.c
1894
tty_clear_pane_area(tty, ctx, py, ny, px, nx, ctx->bg);
usr.bin/tmux/tty.c
1898
tty_cmd_alignmenttest(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1902
if (ctx->bigger) {
usr.bin/tmux/tty.c
1903
ctx->redraw_cb(ctx);
usr.bin/tmux/tty.c
1907
tty_attributes(tty, &grid_default_cell, &ctx->defaults, ctx->palette,
usr.bin/tmux/tty.c
1908
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1910
tty_region_pane(tty, ctx, 0, ctx->sy - 1);
usr.bin/tmux/tty.c
1913
for (j = 0; j < ctx->sy; j++) {
usr.bin/tmux/tty.c
1914
tty_cursor_pane(tty, ctx, 0, j);
usr.bin/tmux/tty.c
1915
for (i = 0; i < ctx->sx; i++)
usr.bin/tmux/tty.c
1921
tty_cmd_cell(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1923
const struct grid_cell *gcp = ctx->cell;
usr.bin/tmux/tty.c
1924
struct screen *s = ctx->s;
usr.bin/tmux/tty.c
1928
px = ctx->xoff + ctx->ocx - ctx->wox;
usr.bin/tmux/tty.c
1929
py = ctx->yoff + ctx->ocy - ctx->woy;
usr.bin/tmux/tty.c
1930
if (!tty_is_visible(tty, ctx, ctx->ocx, ctx->ocy, 1, 1) ||
usr.bin/tmux/tty.c
1934
if (ctx->num == 2) {
usr.bin/tmux/tty.c
1936
ctx->xoff - ctx->wox, py, &ctx->defaults, ctx->palette);
usr.bin/tmux/tty.c
1947
px, py, &ctx->defaults, ctx->palette);
usr.bin/tmux/tty.c
1952
if (ctx->xoff + ctx->ocx - ctx->wox > tty->sx - 1 &&
usr.bin/tmux/tty.c
1953
ctx->ocy == ctx->orlower &&
usr.bin/tmux/tty.c
1954
tty_full_width(tty, ctx))
usr.bin/tmux/tty.c
1955
tty_region_pane(tty, ctx, ctx->orupper, ctx->orlower);
usr.bin/tmux/tty.c
1958
tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy);
usr.bin/tmux/tty.c
1960
tty_cell(tty, ctx->cell, &ctx->defaults, ctx->palette,
usr.bin/tmux/tty.c
1961
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
1963
if (ctx->num == 1)
usr.bin/tmux/tty.c
1968
tty_cmd_cells(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
1973
char *cp = ctx->ptr;
usr.bin/tmux/tty.c
1975
if (!tty_is_visible(tty, ctx, ctx->ocx, ctx->ocy, ctx->num, 1))
usr.bin/tmux/tty.c
1978
if (ctx->bigger &&
usr.bin/tmux/tty.c
1979
(ctx->xoff + ctx->ocx < ctx->wox ||
usr.bin/tmux/tty.c
1980
ctx->xoff + ctx->ocx + ctx->num > ctx->wox + ctx->wsx)) {
usr.bin/tmux/tty.c
1981
if (!ctx->wrapped ||
usr.bin/tmux/tty.c
1982
!tty_full_width(tty, ctx) ||
usr.bin/tmux/tty.c
1984
ctx->xoff + ctx->ocx != 0 ||
usr.bin/tmux/tty.c
1985
ctx->yoff + ctx->ocy != tty->cy + 1 ||
usr.bin/tmux/tty.c
1988
tty_draw_pane(tty, ctx, ctx->ocy);
usr.bin/tmux/tty.c
1990
ctx->redraw_cb(ctx);
usr.bin/tmux/tty.c
1995
tty_cursor_pane_unless_wrap(tty, ctx, ctx->ocx, ctx->ocy);
usr.bin/tmux/tty.c
1996
tty_attributes(tty, ctx->cell, &ctx->defaults, ctx->palette,
usr.bin/tmux/tty.c
1997
ctx->s->hyperlinks);
usr.bin/tmux/tty.c
2000
px = ctx->xoff + ctx->ocx - ctx->wox;
usr.bin/tmux/tty.c
2001
py = ctx->yoff + ctx->ocy - ctx->woy;
usr.bin/tmux/tty.c
2003
r = tty_check_overlay_range(tty, px, py, ctx->num);
usr.bin/tmux/tty.c
2007
cx = rr->px - ctx->xoff + ctx->wox;
usr.bin/tmux/tty.c
2008
tty_cursor_pane_unless_wrap(tty, ctx, cx, ctx->ocy);
usr.bin/tmux/tty.c
2015
tty_cmd_setselection(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
2017
tty_set_selection(tty, ctx->ptr2, ctx->ptr, ctx->num);
usr.bin/tmux/tty.c
2043
tty_cmd_rawstring(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
2046
tty_add(tty, ctx->ptr, ctx->num);
usr.bin/tmux/tty.c
2051
tty_cmd_syncstart(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
2053
if (ctx->num == 0x11) {
usr.bin/tmux/tty.c
2059
} else if (~ctx->num & 0x10) {
usr.bin/tmux/tty.c
2064
if (ctx->num || tty->client->overlay_draw != NULL)
usr.bin/tmux/tty.c
2152
tty_region_pane(struct tty *tty, const struct tty_ctx *ctx, u_int rupper,
usr.bin/tmux/tty.c
2155
tty_region(tty, ctx->yoff + rupper - ctx->woy,
usr.bin/tmux/tty.c
2156
ctx->yoff + rlower - ctx->woy);
usr.bin/tmux/tty.c
2197
tty_margin_pane(struct tty *tty, const struct tty_ctx *ctx)
usr.bin/tmux/tty.c
2199
tty_margin(tty, ctx->xoff - ctx->wox,
usr.bin/tmux/tty.c
2200
ctx->xoff + ctx->sx - 1 - ctx->wox);
usr.bin/tmux/tty.c
2229
tty_cursor_pane_unless_wrap(struct tty *tty, const struct tty_ctx *ctx,
usr.bin/tmux/tty.c
2232
if (!ctx->wrapped ||
usr.bin/tmux/tty.c
2233
!tty_full_width(tty, ctx) ||
usr.bin/tmux/tty.c
2235
ctx->xoff + cx != 0 ||
usr.bin/tmux/tty.c
2236
ctx->yoff + cy != tty->cy + 1 ||
usr.bin/tmux/tty.c
2239
tty_cursor_pane(tty, ctx, cx, cy);
usr.bin/tmux/tty.c
2246
tty_cursor_pane(struct tty *tty, const struct tty_ctx *ctx, u_int cx, u_int cy)
usr.bin/tmux/tty.c
2248
tty_cursor(tty, ctx->xoff + cx - ctx->wox, ctx->yoff + cy - ctx->woy);
usr.bin/tmux/tty.c
72
#define tty_full_width(tty, ctx) \
usr.bin/tmux/tty.c
73
((ctx)->xoff == 0 && (ctx)->sx >= (tty)->sx)
usr.bin/tmux/window-buffer.c
194
struct screen_write_ctx *ctx, u_int sx, u_int sy)
usr.bin/tmux/window-buffer.c
201
u_int i, cx = ctx->s->cx, cy = ctx->s->cy;
usr.bin/tmux/window-buffer.c
216
screen_write_cursormove(ctx, cx, cy + i, 0);
usr.bin/tmux/window-buffer.c
217
screen_write_nputs(ctx, sx, &grid_default_cell, "%s",
usr.bin/tmux/window-client.c
166
struct screen_write_ctx *ctx, u_int sx, u_int sy)
usr.bin/tmux/window-client.c
170
struct screen *s = ctx->s;
usr.bin/tmux/window-client.c
186
screen_write_cursormove(ctx, cx, cy + at, 0);
usr.bin/tmux/window-client.c
187
screen_write_preview(ctx, &wp->base, sx, sy - 2 - lines);
usr.bin/tmux/window-client.c
190
screen_write_cursormove(ctx, cx, cy + 2, 0);
usr.bin/tmux/window-client.c
192
screen_write_cursormove(ctx, cx, cy + sy - 1 - lines, 0);
usr.bin/tmux/window-client.c
193
screen_write_hline(ctx, sx, 0, 0, BOX_LINES_DEFAULT, NULL);
usr.bin/tmux/window-client.c
196
screen_write_cursormove(ctx, cx, cy, 0);
usr.bin/tmux/window-client.c
198
screen_write_cursormove(ctx, cx, cy + sy - lines, 0);
usr.bin/tmux/window-client.c
199
screen_write_fast_copy(ctx, &c->status.screen, 0, 0, sx, lines);
usr.bin/tmux/window-clock.c
226
struct screen_write_ctx ctx;
usr.bin/tmux/window-clock.c
239
screen_write_start(&ctx, s);
usr.bin/tmux/window-clock.c
261
screen_write_clearscreen(&ctx, 8);
usr.bin/tmux/window-clock.c
267
screen_write_cursormove(&ctx, x, y, 0);
usr.bin/tmux/window-clock.c
272
screen_write_puts(&ctx, &gc, "%s", tim);
usr.bin/tmux/window-clock.c
275
screen_write_stop(&ctx);
usr.bin/tmux/window-clock.c
303
screen_write_cursormove(&ctx, x + i, y + j, 0);
usr.bin/tmux/window-clock.c
305
screen_write_putc(&ctx, &gc, ' ');
usr.bin/tmux/window-clock.c
311
screen_write_stop(&ctx);
usr.bin/tmux/window-copy.c
1001
struct screen_write_ctx ctx;
usr.bin/tmux/window-copy.c
1007
screen_write_start(&ctx, s);
usr.bin/tmux/window-copy.c
1008
window_copy_write_lines(wme, &ctx, 0, screen_size_y(s));
usr.bin/tmux/window-copy.c
1009
screen_write_stop(&ctx);
usr.bin/tmux/window-copy.c
4103
struct screen_write_ctx ctx;
usr.bin/tmux/window-copy.c
4136
screen_write_start(&ctx, &ss);
usr.bin/tmux/window-copy.c
4137
screen_write_nputs(&ctx, -1, &grid_default_cell, "%s", str);
usr.bin/tmux/window-copy.c
4138
screen_write_stop(&ctx);
usr.bin/tmux/window-copy.c
4312
struct screen_write_ctx ctx;
usr.bin/tmux/window-copy.c
4327
screen_write_start(&ctx, &ss);
usr.bin/tmux/window-copy.c
4328
screen_write_nputs(&ctx, -1, &grid_default_cell, "%s",
usr.bin/tmux/window-copy.c
4330
screen_write_stop(&ctx);
usr.bin/tmux/window-copy.c
447
struct screen_write_ctx ctx;
usr.bin/tmux/window-copy.c
4620
struct screen_write_ctx *ctx, u_int py, u_int fy, u_int nx,
usr.bin/tmux/window-copy.c
4629
screen_write_cursormove(ctx, 0, py, 0);
usr.bin/tmux/window-copy.c
4635
screen_write_cell(ctx, &gc);
usr.bin/tmux/window-copy.c
4659
struct screen_write_ctx *ctx, u_int py)
usr.bin/tmux/window-copy.c
4683
window_copy_write_one(wme, ctx, py, hsize - data->oy + py,
usr.bin/tmux/window-copy.c
4691
screen_write_cursormove(ctx, 0, 0, 0);
usr.bin/tmux/window-copy.c
4692
format_draw(ctx, &gc, sx, expanded, NULL, 0);
usr.bin/tmux/window-copy.c
4699
screen_write_cursormove(ctx, screen_size_x(s) - 1, py, 0);
usr.bin/tmux/window-copy.c
4700
screen_write_putc(ctx, &grid_default_cell, '$');
usr.bin/tmux/window-copy.c
4708
struct screen_write_ctx *ctx, u_int py, u_int ny)
usr.bin/tmux/window-copy.c
4713
window_copy_write_line(wme, ctx, py);
usr.bin/tmux/window-copy.c
474
screen_write_start(&ctx, &data->screen);
usr.bin/tmux/window-copy.c
4749
struct screen_write_ctx ctx;
usr.bin/tmux/window-copy.c
4752
screen_write_start_pane(&ctx, wp, NULL);
usr.bin/tmux/window-copy.c
4754
window_copy_write_line(wme, &ctx, i);
usr.bin/tmux/window-copy.c
4755
screen_write_cursormove(&ctx, data->cx, data->cy, 0);
usr.bin/tmux/window-copy.c
4756
screen_write_stop(&ctx);
usr.bin/tmux/window-copy.c
476
window_copy_write_line(wme, &ctx, i);
usr.bin/tmux/window-copy.c
477
screen_write_cursormove(&ctx, data->cx, data->cy, 0);
usr.bin/tmux/window-copy.c
478
screen_write_stop(&ctx);
usr.bin/tmux/window-copy.c
4873
struct screen_write_ctx ctx;
usr.bin/tmux/window-copy.c
4883
screen_write_start_pane(&ctx, wp, NULL);
usr.bin/tmux/window-copy.c
4884
screen_write_cursormove(&ctx, data->cx, data->cy, 0);
usr.bin/tmux/window-copy.c
4885
screen_write_stop(&ctx);
usr.bin/tmux/window-copy.c
5143
struct screen_write_ctx ctx;
usr.bin/tmux/window-copy.c
5147
screen_write_start_pane(&ctx, wp, NULL);
usr.bin/tmux/window-copy.c
5148
screen_write_setselection(&ctx, "", buf, len);
usr.bin/tmux/window-copy.c
5149
screen_write_stop(&ctx);
usr.bin/tmux/window-copy.c
5224
struct screen_write_ctx ctx;
usr.bin/tmux/window-copy.c
5231
screen_write_start_pane(&ctx, wp, NULL);
usr.bin/tmux/window-copy.c
5232
screen_write_setselection(&ctx, "", buf, len);
usr.bin/tmux/window-copy.c
5233
screen_write_stop(&ctx);
usr.bin/tmux/window-copy.c
536
window_copy_init_ctx_cb(__unused struct screen_write_ctx *ctx,
usr.bin/tmux/window-copy.c
552
struct screen_write_ctx backing_ctx, ctx;
usr.bin/tmux/window-copy.c
582
screen_write_start_pane(&ctx, wp, &data->screen);
usr.bin/tmux/window-copy.c
5911
struct screen_write_ctx ctx;
usr.bin/tmux/window-copy.c
5923
screen_write_start_pane(&ctx, wp, NULL);
usr.bin/tmux/window-copy.c
5924
screen_write_cursormove(&ctx, 0, 0, 0);
usr.bin/tmux/window-copy.c
5925
screen_write_deleteline(&ctx, ny, 8);
usr.bin/tmux/window-copy.c
5926
window_copy_write_lines(wme, &ctx, screen_size_y(s) - ny, ny);
usr.bin/tmux/window-copy.c
5927
window_copy_write_line(wme, &ctx, 0);
usr.bin/tmux/window-copy.c
5929
window_copy_write_line(wme, &ctx, 1);
usr.bin/tmux/window-copy.c
5931
window_copy_write_line(wme, &ctx, screen_size_y(s) - 2);
usr.bin/tmux/window-copy.c
5933
window_copy_write_line(wme, &ctx, screen_size_y(s) - ny - 1);
usr.bin/tmux/window-copy.c
5934
screen_write_cursormove(&ctx, data->cx, data->cy, 0);
usr.bin/tmux/window-copy.c
5935
screen_write_stop(&ctx);
usr.bin/tmux/window-copy.c
594
screen_write_stop(&ctx);
usr.bin/tmux/window-copy.c
5945
struct screen_write_ctx ctx;
usr.bin/tmux/window-copy.c
5960
screen_write_start_pane(&ctx, wp, NULL);
usr.bin/tmux/window-copy.c
5961
screen_write_cursormove(&ctx, 0, 0, 0);
usr.bin/tmux/window-copy.c
5962
screen_write_insertline(&ctx, ny, 8);
usr.bin/tmux/window-copy.c
5963
window_copy_write_lines(wme, &ctx, 0, ny);
usr.bin/tmux/window-copy.c
5965
window_copy_write_line(wme, &ctx, ny);
usr.bin/tmux/window-copy.c
5967
window_copy_write_line(wme, &ctx, 1);
usr.bin/tmux/window-copy.c
5968
screen_write_cursormove(&ctx, data->cx, data->cy, 0);
usr.bin/tmux/window-copy.c
5969
screen_write_stop(&ctx);
usr.bin/tmux/window-customize.c
591
struct window_customize_itemdata *item, struct screen_write_ctx *ctx,
usr.bin/tmux/window-customize.c
594
struct screen *s = ctx->s;
usr.bin/tmux/window-customize.c
609
if (!screen_write_text(ctx, cx, sx, sy, 0, &grid_default_cell, "%s%s",
usr.bin/tmux/window-customize.c
612
screen_write_cursormove(ctx, cx, s->cy + 1, 0); /* skip line */
usr.bin/tmux/window-customize.c
616
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 0,
usr.bin/tmux/window-customize.c
619
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 0,
usr.bin/tmux/window-customize.c
623
screen_write_cursormove(ctx, cx, s->cy + 1, 0); /* skip line */
usr.bin/tmux/window-customize.c
628
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 0,
usr.bin/tmux/window-customize.c
637
!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 0,
usr.bin/tmux/window-customize.c
650
struct window_customize_itemdata *item, struct screen_write_ctx *ctx,
usr.bin/tmux/window-customize.c
653
struct screen *s = ctx->s;
usr.bin/tmux/window-customize.c
688
if (!screen_write_text(ctx, cx, sx, sy, 0, &grid_default_cell, "%s",
usr.bin/tmux/window-customize.c
691
screen_write_cursormove(ctx, cx, s->cy + 1, 0); /* skip line */
usr.bin/tmux/window-customize.c
706
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 0,
usr.bin/tmux/window-customize.c
711
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy),
usr.bin/tmux/window-customize.c
716
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy),
usr.bin/tmux/window-customize.c
723
screen_write_cursormove(ctx, cx, s->cy + 1, 0); /* skip line */
usr.bin/tmux/window-customize.c
735
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 0,
usr.bin/tmux/window-customize.c
741
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy),
usr.bin/tmux/window-customize.c
754
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 0,
usr.bin/tmux/window-customize.c
760
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 1,
usr.bin/tmux/window-customize.c
765
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 0, &gc,
usr.bin/tmux/window-customize.c
770
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 1,
usr.bin/tmux/window-customize.c
774
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 0, &gc,
usr.bin/tmux/window-customize.c
779
if (!screen_write_text(ctx, cx, sx, sy - (s->cy - cy), 0,
usr.bin/tmux/window-customize.c
785
screen_write_cursormove(ctx, cx, s->cy + 1, 0); /* skip line */
usr.bin/tmux/window-customize.c
812
if (!screen_write_text(ctx, s->cx, sx,
usr.bin/tmux/window-customize.c
823
if (!screen_write_text(ctx, s->cx, sx,
usr.bin/tmux/window-customize.c
838
struct screen_write_ctx *ctx, u_int sx, u_int sy)
usr.bin/tmux/window-customize.c
847
window_customize_draw_key(data, item, ctx, sx, sy);
usr.bin/tmux/window-customize.c
849
window_customize_draw_option(data, item, ctx, sx, sy);
usr.bin/tmux/window-tree.c
399
window_tree_draw_label(struct screen_write_ctx *ctx, u_int px, u_int py,
usr.bin/tmux/window-tree.c
412
screen_write_cursormove(ctx, px + ox - 1, py + oy - 1, 0);
usr.bin/tmux/window-tree.c
413
screen_write_box(ctx, len + 2, 3, BOX_LINES_DEFAULT, NULL,
usr.bin/tmux/window-tree.c
416
screen_write_cursormove(ctx, px + ox, py + oy, 0);
usr.bin/tmux/window-tree.c
417
screen_write_puts(ctx, gc, "%s", label);
usr.bin/tmux/window-tree.c
422
struct screen_write_ctx *ctx, u_int sx, u_int sy)
usr.bin/tmux/window-tree.c
427
u_int cx = ctx->s->cx, cy = ctx->s->cy;
usr.bin/tmux/window-tree.c
491
screen_write_cursormove(ctx, cx + 2, cy, 0);
usr.bin/tmux/window-tree.c
492
screen_write_vline(ctx, sy, 0, 0);
usr.bin/tmux/window-tree.c
493
screen_write_cursormove(ctx, cx, cy + sy / 2, 0);
usr.bin/tmux/window-tree.c
494
screen_write_puts(ctx, &grid_default_cell, "<");
usr.bin/tmux/window-tree.c
499
screen_write_cursormove(ctx, cx + sx - 3, cy, 0);
usr.bin/tmux/window-tree.c
500
screen_write_vline(ctx, sy, 0, 0);
usr.bin/tmux/window-tree.c
501
screen_write_cursormove(ctx, cx + sx - 1, cy + sy / 2, 0);
usr.bin/tmux/window-tree.c
502
screen_write_puts(ctx, &grid_default_cell, ">");
usr.bin/tmux/window-tree.c
534
screen_write_cursormove(ctx, cx + offset, cy, 0);
usr.bin/tmux/window-tree.c
535
screen_write_preview(ctx, &w->active->base, width, sy);
usr.bin/tmux/window-tree.c
542
window_tree_draw_label(ctx, cx + offset, cy, width, sy, &gc,
usr.bin/tmux/window-tree.c
547
screen_write_cursormove(ctx, cx + offset + width, cy, 0);
usr.bin/tmux/window-tree.c
548
screen_write_vline(ctx, sy, 0, 0);
usr.bin/tmux/window-tree.c
558
struct window *w, struct screen_write_ctx *ctx, u_int sx, u_int sy)
usr.bin/tmux/window-tree.c
562
u_int cx = ctx->s->cx, cy = ctx->s->cy;
usr.bin/tmux/window-tree.c
626
screen_write_cursormove(ctx, cx + 2, cy, 0);
usr.bin/tmux/window-tree.c
627
screen_write_vline(ctx, sy, 0, 0);
usr.bin/tmux/window-tree.c
628
screen_write_cursormove(ctx, cx, cy + sy / 2, 0);
usr.bin/tmux/window-tree.c
629
screen_write_puts(ctx, &grid_default_cell, "<");
usr.bin/tmux/window-tree.c
634
screen_write_cursormove(ctx, cx + sx - 3, cy, 0);
usr.bin/tmux/window-tree.c
635
screen_write_vline(ctx, sy, 0, 0);
usr.bin/tmux/window-tree.c
636
screen_write_cursormove(ctx, cx + sx - 1, cy + sy / 2, 0);
usr.bin/tmux/window-tree.c
637
screen_write_puts(ctx, &grid_default_cell, ">");
usr.bin/tmux/window-tree.c
668
screen_write_cursormove(ctx, cx + offset, cy, 0);
usr.bin/tmux/window-tree.c
669
screen_write_preview(ctx, &wp->base, width, sy);
usr.bin/tmux/window-tree.c
674
window_tree_draw_label(ctx, cx + offset, cy, each, sy, &gc,
usr.bin/tmux/window-tree.c
679
screen_write_cursormove(ctx, cx + offset + width, cy, 0);
usr.bin/tmux/window-tree.c
680
screen_write_vline(ctx, sy, 0, 0);
usr.bin/tmux/window-tree.c
689
window_tree_draw(void *modedata, void *itemdata, struct screen_write_ctx *ctx,
usr.bin/tmux/window-tree.c
705
window_tree_draw_session(modedata, sp, ctx, sx, sy);
usr.bin/tmux/window-tree.c
708
window_tree_draw_window(modedata, sp, wlp->window, ctx, sx, sy);
usr.bin/tmux/window-tree.c
711
screen_write_preview(ctx, &wp->base, sx, sy);
usr.sbin/acme-client/acctproc.c
256
EVP_MD_CTX *ctx = NULL;
usr.sbin/acme-client/acctproc.c
343
if ((ctx = EVP_MD_CTX_new()) == NULL) {
usr.sbin/acme-client/acctproc.c
347
if (!EVP_DigestSignInit(ctx, NULL, evp_md, NULL, pkey)) {
usr.sbin/acme-client/acctproc.c
351
if (!EVP_DigestSign(ctx, NULL, &digsz, sign, sign_len)) {
usr.sbin/acme-client/acctproc.c
359
if (!EVP_DigestSign(ctx, dig, &digsz, sign, sign_len)) {
usr.sbin/acme-client/acctproc.c
431
EVP_MD_CTX_free(ctx);
usr.sbin/acme-client/http.c
166
if (http->ctx != NULL) {
usr.sbin/acme-client/http.c
169
rc = tls_close(http->ctx);
usr.sbin/acme-client/http.c
172
tls_free(http->ctx);
usr.sbin/acme-client/http.c
180
http->ctx = NULL;
usr.sbin/acme-client/http.c
274
if ((http->ctx = tls_client()) == NULL) {
usr.sbin/acme-client/http.c
277
} else if (tls_configure(http->ctx, tlscfg) == -1) {
usr.sbin/acme-client/http.c
279
http->src.ip, tls_error(http->ctx));
usr.sbin/acme-client/http.c
283
if (tls_connect_socket(http->ctx, http->fd, http->host) != 0) {
usr.sbin/acme-client/http.c
285
http->host, tls_error(http->ctx));
usr.sbin/acme-client/http.c
62
struct tls *ctx; /* TLS context */
usr.sbin/acme-client/http.c
73
rc = tls_read(http->ctx, buf, sz);
usr.sbin/acme-client/http.c
78
tls_error(http->ctx));
usr.sbin/acme-client/http.c
88
rc = tls_write(http->ctx, buf, sz);
usr.sbin/acme-client/http.c
93
tls_error(http->ctx));
usr.sbin/acme-client/key.c
108
EVP_PKEY_CTX_free(ctx);
usr.sbin/acme-client/key.c
113
EVP_PKEY_CTX_free(ctx);
usr.sbin/acme-client/key.c
42
EVP_PKEY_CTX *ctx = NULL;
usr.sbin/acme-client/key.c
45
if ((ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL)) == NULL) {
usr.sbin/acme-client/key.c
49
if (EVP_PKEY_keygen_init(ctx) <= 0) {
usr.sbin/acme-client/key.c
53
if (EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, KBITS) <= 0) {
usr.sbin/acme-client/key.c
57
if (EVP_PKEY_keygen(ctx, &pkey) <= 0) {
usr.sbin/acme-client/key.c
69
EVP_PKEY_CTX_free(ctx);
usr.sbin/acme-client/key.c
74
EVP_PKEY_CTX_free(ctx);
usr.sbin/acme-client/key.c
81
EVP_PKEY_CTX *ctx = NULL;
usr.sbin/acme-client/key.c
84
if ((ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_EC, NULL)) == NULL) {
usr.sbin/acme-client/key.c
88
if (EVP_PKEY_keygen_init(ctx) <= 0) {
usr.sbin/acme-client/key.c
92
if (EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, NID_secp384r1) <= 0) {
usr.sbin/acme-client/key.c
96
if (EVP_PKEY_keygen(ctx, &pkey) <= 0) {
usr.sbin/bgpd/parse.y
5674
flow_to_flowspec(struct flowspec_context *ctx)
usr.sbin/bgpd/parse.y
5680
switch (ctx->aid) {
usr.sbin/bgpd/parse.y
5692
if (ctx->components[i] != NULL)
usr.sbin/bgpd/parse.y
5693
len += ctx->complen[i] + 1;
usr.sbin/bgpd/parse.y
5701
if (ctx->components[i] != NULL) {
usr.sbin/bgpd/parse.y
5703
component_finish(i, ctx->components[i],
usr.sbin/bgpd/parse.y
5704
ctx->complen[i]);
usr.sbin/bgpd/parse.y
5705
memcpy(f->flow->data + len, ctx->components[i],
usr.sbin/bgpd/parse.y
5706
ctx->complen[i]);
usr.sbin/bgpd/parse.y
5707
len += ctx->complen[i];
usr.sbin/bgpd/parse.y
5714
flow_free(struct flowspec_context *ctx)
usr.sbin/bgpd/parse.y
5719
free(ctx->components[i]);
usr.sbin/bgpd/parse.y
5720
free(ctx);
usr.sbin/bgpd/rde.c
3201
struct rde_dump_ctx *ctx = ptr;
usr.sbin/bgpd/rde.c
3207
rde_dump_filter(p, &ctx->req);
usr.sbin/bgpd/rde.c
3214
struct rde_dump_ctx *ctx = ptr;
usr.sbin/bgpd/rde.c
3216
rde_dump_adjout_filter(peer, pte, p, &ctx->req);
usr.sbin/bgpd/rde.c
3222
struct rde_dump_ctx *ctx = arg;
usr.sbin/bgpd/rde.c
3224
return (ctx->throttled != 0);
usr.sbin/bgpd/rde.c
3230
struct rde_dump_ctx *ctx = arg;
usr.sbin/bgpd/rde.c
3234
if (ctx->req.flags & F_CTL_ADJ_OUT) {
usr.sbin/bgpd/rde.c
3235
peer = peer_match(&ctx->req.neighbor, ctx->peerid);
usr.sbin/bgpd/rde.c
3238
ctx->peerid = peer->conf.id;
usr.sbin/bgpd/rde.c
3239
switch (ctx->req.type) {
usr.sbin/bgpd/rde.c
3241
if (adjout_prefix_dump_new(peer, ctx->req.aid,
usr.sbin/bgpd/rde.c
3242
CTL_MSG_HIGH_MARK, ctx, rde_dump_adjout_upcall,
usr.sbin/bgpd/rde.c
3247
if (adjout_prefix_dump_subtree(peer, &ctx->req.prefix,
usr.sbin/bgpd/rde.c
3248
ctx->req.prefixlen, CTL_MSG_HIGH_MARK, ctx,
usr.sbin/bgpd/rde.c
3259
imsg_compose(ibuf_se_ctl, IMSG_CTL_END, 0, ctx->req.pid, -1, NULL, 0);
usr.sbin/bgpd/rde.c
3260
LIST_REMOVE(ctx, entry);
usr.sbin/bgpd/rde.c
3261
free(ctx);
usr.sbin/bgpd/rde.c
3267
imsg_compose(ibuf_se_ctl, IMSG_CTL_RESULT, 0, ctx->req.pid, -1, &error,
usr.sbin/bgpd/rde.c
3276
struct rde_dump_ctx *ctx;
usr.sbin/bgpd/rde.c
3283
if ((ctx = calloc(1, sizeof(*ctx))) == NULL) {
usr.sbin/bgpd/rde.c
3289
free(ctx);
usr.sbin/bgpd/rde.c
3296
memcpy(&ctx->req, req, sizeof(struct ctl_show_rib_request));
usr.sbin/bgpd/rde.c
3297
ctx->req.pid = pid;
usr.sbin/bgpd/rde.c
3298
ctx->req.type = type;
usr.sbin/bgpd/rde.c
3310
free(ctx);
usr.sbin/bgpd/rde.c
3313
ctx->peerid = peer->conf.id;
usr.sbin/bgpd/rde.c
3314
switch (ctx->req.type) {
usr.sbin/bgpd/rde.c
3316
if (adjout_prefix_dump_new(peer, ctx->req.aid,
usr.sbin/bgpd/rde.c
3317
CTL_MSG_HIGH_MARK, ctx, rde_dump_adjout_upcall,
usr.sbin/bgpd/rde.c
3325
CTL_MSG_HIGH_MARK, ctx,
usr.sbin/bgpd/rde.c
3361
peer, pte, p, ctx);
usr.sbin/bgpd/rde.c
3379
ctx);
usr.sbin/bgpd/rde.c
3384
imsg_compose(ibuf_se_ctl, IMSG_CTL_END, 0, ctx->req.pid,
usr.sbin/bgpd/rde.c
3386
free(ctx);
usr.sbin/bgpd/rde.c
3392
LIST_INSERT_HEAD(&rde_dump_h, ctx, entry);
usr.sbin/bgpd/rde.c
3399
free(ctx);
usr.sbin/bgpd/rde.c
3403
switch (ctx->req.type) {
usr.sbin/bgpd/rde.c
3405
if (rib_dump_new(rid, ctx->req.aid, CTL_MSG_HIGH_MARK, ctx,
usr.sbin/bgpd/rde.c
3411
if (rib_dump_new(rid, ctx->req.aid, CTL_MSG_HIGH_MARK, ctx,
usr.sbin/bgpd/rde.c
3418
CTL_MSG_HIGH_MARK, ctx, rde_dump_upcall,
usr.sbin/bgpd/rde.c
3440
rde_dump_upcall(re, ctx);
usr.sbin/bgpd/rde.c
3444
rde_dump_upcall(re, ctx);
usr.sbin/bgpd/rde.c
3448
rde_dump_upcall(re, ctx);
usr.sbin/bgpd/rde.c
3450
imsg_compose(ibuf_se_ctl, IMSG_CTL_END, 0, ctx->req.pid,
usr.sbin/bgpd/rde.c
3452
free(ctx);
usr.sbin/bgpd/rde.c
3457
LIST_INSERT_HEAD(&rde_dump_h, ctx, entry);
usr.sbin/bgpd/rde.c
3463
struct rde_dump_ctx *ctx;
usr.sbin/bgpd/rde.c
3465
LIST_FOREACH(ctx, &rde_dump_h, entry) {
usr.sbin/bgpd/rde.c
3466
if (ctx->req.pid == pid) {
usr.sbin/bgpd/rde.c
3467
ctx->throttled = throttle;
usr.sbin/bgpd/rde.c
3476
struct rde_dump_ctx *ctx;
usr.sbin/bgpd/rde.c
3478
LIST_FOREACH(ctx, &rde_dump_h, entry) {
usr.sbin/bgpd/rde.c
3479
if (ctx->req.pid == pid) {
usr.sbin/bgpd/rde.c
3480
rib_dump_terminate(ctx);
usr.sbin/bgpd/rde.c
3503
struct rde_mrt_ctx *ctx;
usr.sbin/bgpd/rde.c
3506
if ((ctx = calloc(1, sizeof(*ctx))) == NULL) {
usr.sbin/bgpd/rde.c
3510
memcpy(&ctx->mrt, mrt, sizeof(struct mrt));
usr.sbin/bgpd/rde.c
3511
if ((ctx->mrt.wbuf = msgbuf_new()) == NULL) {
usr.sbin/bgpd/rde.c
3513
free(ctx);
usr.sbin/bgpd/rde.c
3516
ctx->mrt.fd = fd;
usr.sbin/bgpd/rde.c
3517
ctx->mrt.state = MRT_STATE_RUNNING;
usr.sbin/bgpd/rde.c
3518
rid = rib_find(ctx->mrt.rib);
usr.sbin/bgpd/rde.c
3520
log_warnx("non existing RIB %s for mrt dump", ctx->mrt.rib);
usr.sbin/bgpd/rde.c
3521
free(ctx);
usr.sbin/bgpd/rde.c
3525
if (ctx->mrt.type == MRT_TABLE_DUMP_V2)
usr.sbin/bgpd/rde.c
3526
mrt_dump_v2_hdr(&ctx->mrt, conf);
usr.sbin/bgpd/rde.c
3528
if (rib_dump_new(rid, AID_UNSPEC, CTL_MSG_HIGH_MARK, &ctx->mrt,
usr.sbin/bgpd/rde.c
3532
LIST_INSERT_HEAD(&rde_mrts, ctx, entry);
usr.sbin/bgpd/rde.c
4798
struct rde_dump_ctx *ctx = ptr;
usr.sbin/bgpd/rde.c
4816
ctx->req.pid, -1, &kf, sizeof(kf)) == -1)
usr.sbin/bgpd/rde_adjout.c
596
prefix_restart(struct rib_context *ctx)
usr.sbin/bgpd/rde_adjout.c
601
if ((peer = peer_get(ctx->ctx_id)) == NULL)
usr.sbin/bgpd/rde_adjout.c
605
if (ctx->ctx_pt != NULL) {
usr.sbin/bgpd/rde_adjout.c
606
pte = ctx->ctx_pt;
usr.sbin/bgpd/rde_adjout.c
609
pt_unref(ctx->ctx_pt);
usr.sbin/bgpd/rde_adjout.c
611
ctx->ctx_pt = NULL;
usr.sbin/bgpd/rde_adjout.c
616
adjout_prefix_dump_cleanup(struct rib_context *ctx)
usr.sbin/bgpd/rde_adjout.c
618
if (ctx->ctx_pt != NULL)
usr.sbin/bgpd/rde_adjout.c
619
pt_unref(ctx->ctx_pt);
usr.sbin/bgpd/rde_adjout.c
623
adjout_prefix_dump_r(struct rib_context *ctx)
usr.sbin/bgpd/rde_adjout.c
630
if ((peer = peer_get(ctx->ctx_id)) == NULL)
usr.sbin/bgpd/rde_adjout.c
633
if (ctx->ctx_pt == NULL && ctx->ctx_subtree.aid == AID_UNSPEC)
usr.sbin/bgpd/rde_adjout.c
634
pte = pt_first(ctx->ctx_aid);
usr.sbin/bgpd/rde_adjout.c
636
pte = prefix_restart(ctx);
usr.sbin/bgpd/rde_adjout.c
640
if (ctx->ctx_aid != AID_UNSPEC &&
usr.sbin/bgpd/rde_adjout.c
641
ctx->ctx_aid != pte->aid)
usr.sbin/bgpd/rde_adjout.c
643
if (ctx->ctx_subtree.aid != AID_UNSPEC) {
usr.sbin/bgpd/rde_adjout.c
646
if (prefix_compare(&ctx->ctx_subtree, &addr,
usr.sbin/bgpd/rde_adjout.c
647
ctx->ctx_subtreelen) != 0)
usr.sbin/bgpd/rde_adjout.c
651
if (ctx->ctx_count && i++ >= ctx->ctx_count) {
usr.sbin/bgpd/rde_adjout.c
653
ctx->ctx_pt = pt_ref(pte);
usr.sbin/bgpd/rde_adjout.c
659
ctx->ctx_prefix_call(peer, pte, p, ctx->ctx_arg);
usr.sbin/bgpd/rde_adjout.c
663
if (ctx->ctx_done)
usr.sbin/bgpd/rde_adjout.c
664
ctx->ctx_done(ctx->ctx_arg, ctx->ctx_aid);
usr.sbin/bgpd/rde_adjout.c
665
LIST_REMOVE(ctx, entry);
usr.sbin/bgpd/rde_adjout.c
666
free(ctx);
usr.sbin/bgpd/rde_adjout.c
677
struct rib_context *ctx;
usr.sbin/bgpd/rde_adjout.c
679
if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
usr.sbin/bgpd/rde_adjout.c
681
ctx->ctx_id = peer->conf.id;
usr.sbin/bgpd/rde_adjout.c
682
ctx->ctx_aid = aid;
usr.sbin/bgpd/rde_adjout.c
683
ctx->ctx_count = count;
usr.sbin/bgpd/rde_adjout.c
684
ctx->ctx_arg = arg;
usr.sbin/bgpd/rde_adjout.c
685
ctx->ctx_prefix_call = upcall;
usr.sbin/bgpd/rde_adjout.c
686
ctx->ctx_done = done;
usr.sbin/bgpd/rde_adjout.c
687
ctx->ctx_throttle = throttle;
usr.sbin/bgpd/rde_adjout.c
689
rib_dump_insert(ctx);
usr.sbin/bgpd/rde_adjout.c
693
adjout_prefix_dump_r(ctx);
usr.sbin/bgpd/rde_adjout.c
706
struct rib_context *ctx;
usr.sbin/bgpd/rde_adjout.c
708
if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
usr.sbin/bgpd/rde_adjout.c
710
ctx->ctx_id = peer->conf.id;
usr.sbin/bgpd/rde_adjout.c
711
ctx->ctx_aid = subtree->aid;
usr.sbin/bgpd/rde_adjout.c
712
ctx->ctx_count = count;
usr.sbin/bgpd/rde_adjout.c
713
ctx->ctx_arg = arg;
usr.sbin/bgpd/rde_adjout.c
714
ctx->ctx_prefix_call = upcall;
usr.sbin/bgpd/rde_adjout.c
715
ctx->ctx_done = done;
usr.sbin/bgpd/rde_adjout.c
716
ctx->ctx_throttle = throttle;
usr.sbin/bgpd/rde_adjout.c
717
ctx->ctx_subtree = *subtree;
usr.sbin/bgpd/rde_adjout.c
718
ctx->ctx_subtreelen = subtreelen;
usr.sbin/bgpd/rde_adjout.c
721
ctx->ctx_pt = pt_get_next(subtree, subtreelen);
usr.sbin/bgpd/rde_adjout.c
722
if (ctx->ctx_pt)
usr.sbin/bgpd/rde_adjout.c
723
pt_ref(ctx->ctx_pt); /* store and lock first element */
usr.sbin/bgpd/rde_adjout.c
725
rib_dump_insert(ctx);
usr.sbin/bgpd/rde_adjout.c
729
adjout_prefix_dump_r(ctx);
usr.sbin/bgpd/rde_attr.c
75
SIPHASH_CTX ctx;
usr.sbin/bgpd/rde_attr.c
77
SipHash24_Init(&ctx, &attrkey);
usr.sbin/bgpd/rde_attr.c
78
SipHash24_Update(&ctx, data, len);
usr.sbin/bgpd/rde_attr.c
79
SipHash24_Update(&ctx, &type, sizeof(type));
usr.sbin/bgpd/rde_attr.c
80
return SipHash24_End(&ctx);
usr.sbin/bgpd/rde_community.c
641
SIPHASH_CTX ctx;
usr.sbin/bgpd/rde_community.c
645
SipHash24_Init(&ctx, &commkey);
usr.sbin/bgpd/rde_community.c
646
SipHash24_Update(&ctx, comm->communities,
usr.sbin/bgpd/rde_community.c
648
SipHash24_Update(&ctx, &comm->flags, sizeof(comm->flags));
usr.sbin/bgpd/rde_community.c
649
comm->hash = SipHash24_End(&ctx);
usr.sbin/bgpd/rde_rib.c
373
rib_restart(struct rib_context *ctx)
usr.sbin/bgpd/rde_rib.c
377
if (ctx->ctx_re)
usr.sbin/bgpd/rde_rib.c
378
re = re_unlock(ctx->ctx_re);
usr.sbin/bgpd/rde_rib.c
385
if (ctx->ctx_re && rib_empty(ctx->ctx_re))
usr.sbin/bgpd/rde_rib.c
386
rib_remove(ctx->ctx_re);
usr.sbin/bgpd/rde_rib.c
387
ctx->ctx_re = NULL;
usr.sbin/bgpd/rde_rib.c
392
rib_dump_r(struct rib_context *ctx)
usr.sbin/bgpd/rde_rib.c
398
rib = rib_byid(ctx->ctx_id);
usr.sbin/bgpd/rde_rib.c
400
fatalx("%s: rib id %u gone", __func__, ctx->ctx_id);
usr.sbin/bgpd/rde_rib.c
402
if (ctx->ctx_re == NULL && ctx->ctx_subtree.aid == AID_UNSPEC)
usr.sbin/bgpd/rde_rib.c
405
re = rib_restart(ctx);
usr.sbin/bgpd/rde_rib.c
411
if (re->rib_id != ctx->ctx_id)
usr.sbin/bgpd/rde_rib.c
413
re->rib_id, ctx->ctx_id);
usr.sbin/bgpd/rde_rib.c
414
if (ctx->ctx_aid != AID_UNSPEC &&
usr.sbin/bgpd/rde_rib.c
415
ctx->ctx_aid != re->prefix->aid)
usr.sbin/bgpd/rde_rib.c
417
if (ctx->ctx_subtree.aid != AID_UNSPEC) {
usr.sbin/bgpd/rde_rib.c
420
if (prefix_compare(&ctx->ctx_subtree, &addr,
usr.sbin/bgpd/rde_rib.c
421
ctx->ctx_subtreelen) != 0)
usr.sbin/bgpd/rde_rib.c
425
if (ctx->ctx_count && i++ >= ctx->ctx_count &&
usr.sbin/bgpd/rde_rib.c
428
ctx->ctx_re = re_lock(re);
usr.sbin/bgpd/rde_rib.c
431
ctx->ctx_rib_call(re, ctx->ctx_arg);
usr.sbin/bgpd/rde_rib.c
434
if (ctx->ctx_done)
usr.sbin/bgpd/rde_rib.c
435
ctx->ctx_done(ctx->ctx_arg, ctx->ctx_aid);
usr.sbin/bgpd/rde_rib.c
436
LIST_REMOVE(ctx, entry);
usr.sbin/bgpd/rde_rib.c
437
free(ctx);
usr.sbin/bgpd/rde_rib.c
443
struct rib_context *ctx;
usr.sbin/bgpd/rde_rib.c
446
LIST_FOREACH(ctx, &rib_dumps, entry) {
usr.sbin/bgpd/rde_rib.c
447
if (ctx->ctx_throttle && ctx->ctx_throttle(ctx->ctx_arg))
usr.sbin/bgpd/rde_rib.c
457
struct rib_context *ctx, *next;
usr.sbin/bgpd/rde_rib.c
463
ctx = rib_dump_ctx;
usr.sbin/bgpd/rde_rib.c
465
ctx = LIST_FIRST(&rib_dumps);
usr.sbin/bgpd/rde_rib.c
467
for (; ctx != NULL; ctx = next) {
usr.sbin/bgpd/rde_rib.c
468
next = LIST_NEXT(ctx, entry);
usr.sbin/bgpd/rde_rib.c
471
if (ctx->ctx_throttle && ctx->ctx_throttle(ctx->ctx_arg))
usr.sbin/bgpd/rde_rib.c
473
if (ctx->ctx_rib_call != NULL)
usr.sbin/bgpd/rde_rib.c
474
rib_dump_r(ctx);
usr.sbin/bgpd/rde_rib.c
476
adjout_prefix_dump_r(ctx);
usr.sbin/bgpd/rde_rib.c
478
rib_dump_ctx = ctx;
usr.sbin/bgpd/rde_rib.c
482
rib_dump_cleanup(struct rib_context *ctx)
usr.sbin/bgpd/rde_rib.c
484
struct rib_entry *re = ctx->ctx_re;
usr.sbin/bgpd/rde_rib.c
490
rib_dump_free(struct rib_context *ctx)
usr.sbin/bgpd/rde_rib.c
492
if (ctx->ctx_done)
usr.sbin/bgpd/rde_rib.c
493
ctx->ctx_done(ctx->ctx_arg, ctx->ctx_aid);
usr.sbin/bgpd/rde_rib.c
494
if (ctx->ctx_re)
usr.sbin/bgpd/rde_rib.c
495
rib_dump_cleanup(ctx);
usr.sbin/bgpd/rde_rib.c
496
if (ctx->ctx_pt)
usr.sbin/bgpd/rde_rib.c
497
adjout_prefix_dump_cleanup(ctx);
usr.sbin/bgpd/rde_rib.c
498
if (ctx == rib_dump_ctx)
usr.sbin/bgpd/rde_rib.c
499
rib_dump_ctx = LIST_NEXT(ctx, entry);
usr.sbin/bgpd/rde_rib.c
500
LIST_REMOVE(ctx, entry);
usr.sbin/bgpd/rde_rib.c
501
free(ctx);
usr.sbin/bgpd/rde_rib.c
507
struct rib_context *ctx, *next;
usr.sbin/bgpd/rde_rib.c
509
LIST_FOREACH_SAFE(ctx, &rib_dumps, entry, next) {
usr.sbin/bgpd/rde_rib.c
510
if (id != ctx->ctx_id)
usr.sbin/bgpd/rde_rib.c
512
rib_dump_free(ctx);
usr.sbin/bgpd/rde_rib.c
519
struct rib_context *ctx, *next;
usr.sbin/bgpd/rde_rib.c
521
LIST_FOREACH_SAFE(ctx, &rib_dumps, entry, next) {
usr.sbin/bgpd/rde_rib.c
522
if (ctx->ctx_arg != arg)
usr.sbin/bgpd/rde_rib.c
524
rib_dump_free(ctx);
usr.sbin/bgpd/rde_rib.c
529
rib_dump_insert(struct rib_context *ctx)
usr.sbin/bgpd/rde_rib.c
531
LIST_INSERT_HEAD(&rib_dumps, ctx, entry);
usr.sbin/bgpd/rde_rib.c
539
struct rib_context *ctx;
usr.sbin/bgpd/rde_rib.c
541
if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
usr.sbin/bgpd/rde_rib.c
543
ctx->ctx_id = id;
usr.sbin/bgpd/rde_rib.c
544
ctx->ctx_aid = aid;
usr.sbin/bgpd/rde_rib.c
545
ctx->ctx_count = count;
usr.sbin/bgpd/rde_rib.c
546
ctx->ctx_arg = arg;
usr.sbin/bgpd/rde_rib.c
547
ctx->ctx_rib_call = upcall;
usr.sbin/bgpd/rde_rib.c
548
ctx->ctx_done = done;
usr.sbin/bgpd/rde_rib.c
549
ctx->ctx_throttle = throttle;
usr.sbin/bgpd/rde_rib.c
551
rib_dump_insert(ctx);
usr.sbin/bgpd/rde_rib.c
555
rib_dump_r(ctx);
usr.sbin/bgpd/rde_rib.c
565
struct rib_context *ctx;
usr.sbin/bgpd/rde_rib.c
568
if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
usr.sbin/bgpd/rde_rib.c
570
ctx->ctx_id = id;
usr.sbin/bgpd/rde_rib.c
571
ctx->ctx_aid = subtree->aid;
usr.sbin/bgpd/rde_rib.c
572
ctx->ctx_count = count;
usr.sbin/bgpd/rde_rib.c
573
ctx->ctx_arg = arg;
usr.sbin/bgpd/rde_rib.c
574
ctx->ctx_rib_call = upcall;
usr.sbin/bgpd/rde_rib.c
575
ctx->ctx_done = done;
usr.sbin/bgpd/rde_rib.c
576
ctx->ctx_throttle = throttle;
usr.sbin/bgpd/rde_rib.c
577
ctx->ctx_subtree = *subtree;
usr.sbin/bgpd/rde_rib.c
578
ctx->ctx_subtreelen = subtreelen;
usr.sbin/bgpd/rde_rib.c
583
ctx->ctx_re = RB_NFIND(rib_tree, rib_tree(rib_byid(id)), &xre);
usr.sbin/bgpd/rde_rib.c
584
if (ctx->ctx_re)
usr.sbin/bgpd/rde_rib.c
585
re_lock(ctx->ctx_re);
usr.sbin/bgpd/rde_rib.c
587
rib_dump_insert(ctx);
usr.sbin/bgpd/rde_rib.c
591
rib_dump_r(ctx);
usr.sbin/bgpd/rde_rib.c
612
SIPHASH_CTX ctx;
usr.sbin/bgpd/rde_rib.c
614
SipHash24_Init(&ctx, &pathkey);
usr.sbin/bgpd/rde_rib.c
615
SipHash24_Update(&ctx, PATH_HASHSTART(p), PATH_HASHSIZE);
usr.sbin/bgpd/rde_rib.c
616
SipHash24_Update(&ctx, aspath_dump(p->aspath),
usr.sbin/bgpd/rde_rib.c
618
return SipHash24_End(&ctx);
usr.sbin/bgplgd/bgplgd.c
105
for (i = 0; ctx->command->args[i] != NULL; i++)
usr.sbin/bgplgd/bgplgd.c
106
argv[argc++] = ctx->command->args[i];
usr.sbin/bgplgd/bgplgd.c
108
argc = qs_argv(argv, argc, sizeof(argv) / sizeof(argv[0]), ctx,
usr.sbin/bgplgd/bgplgd.c
109
ctx->command->barenbr);
usr.sbin/bgplgd/bgplgd.c
116
if (ctx->command->content_type == NULL)
usr.sbin/bgplgd/bgplgd.c
119
printf("Content-type: %s\r\n\r\n", ctx->command->content_type);
usr.sbin/bgplgd/bgplgd.c
54
command_from_path(const char *path, struct lg_ctx *ctx)
usr.sbin/bgplgd/bgplgd.c
60
ctx->command = &cmds[i];
usr.sbin/bgplgd/bgplgd.c
61
ctx->qs_mask = cmds[i].qs_mask;
usr.sbin/bgplgd/bgplgd.c
74
prep_request(struct lg_ctx *ctx, const char *meth, const char *path,
usr.sbin/bgplgd/bgplgd.c
81
if (command_from_path(path, ctx) != 0)
usr.sbin/bgplgd/bgplgd.c
83
if (parse_querystring(qs, ctx) != 0)
usr.sbin/bgplgd/bgplgd.c
95
bgpctl_call(struct lg_ctx *ctx)
usr.sbin/bgplgd/qs.c
172
parse_value(struct lg_ctx *ctx, unsigned int qs, enum qs_type type, char *val)
usr.sbin/bgplgd/qs.c
183
ctx->qs_args[qs].one = 1;
usr.sbin/bgplgd/qs.c
197
ctx->qs_args[qs].string = strdup(val);
usr.sbin/bgplgd/qs.c
198
if (ctx->qs_args[qs].string == NULL) {
usr.sbin/bgplgd/qs.c
208
ctx->qs_args[qs].string = strdup(val);
usr.sbin/bgplgd/qs.c
209
if (ctx->qs_args[qs].string == NULL) {
usr.sbin/bgplgd/qs.c
219
ctx->qs_args[qs].string = strdup(val);
usr.sbin/bgplgd/qs.c
220
if (ctx->qs_args[qs].string == NULL) {
usr.sbin/bgplgd/qs.c
230
ctx->qs_args[qs].string = strdup(val);
usr.sbin/bgplgd/qs.c
231
if (ctx->qs_args[qs].string == NULL) {
usr.sbin/bgplgd/qs.c
244
ctx->qs_args[qs].string = strdup(val);
usr.sbin/bgplgd/qs.c
245
if (ctx->qs_args[qs].string == NULL) {
usr.sbin/bgplgd/qs.c
258
ctx->qs_args[qs].string = strdup(val);
usr.sbin/bgplgd/qs.c
259
if (ctx->qs_args[qs].string == NULL) {
usr.sbin/bgplgd/qs.c
274
parse_querystring(const char *param, struct lg_ctx *ctx)
usr.sbin/bgplgd/qs.c
288
if (((1 << qsargs[i].qs) & ctx->qs_mask) == 0) {
usr.sbin/bgplgd/qs.c
293
if (((1 << qsargs[i].qs) & ctx->qs_set) != 0) {
usr.sbin/bgplgd/qs.c
298
ctx->qs_set |= (1 << qsargs[i].qs);
usr.sbin/bgplgd/qs.c
308
if ((rv = parse_value(ctx, qsargs[i].qs, qsargs[i].type,
usr.sbin/bgplgd/qs.c
321
qs_argv(char **argv, size_t argc, size_t len, struct lg_ctx *ctx, int barenbr)
usr.sbin/bgplgd/qs.c
327
if (ctx->qs_set & (1 << QS_NEIGHBOR)) {
usr.sbin/bgplgd/qs.c
332
argv[argc++] = ctx->qs_args[QS_NEIGHBOR].string;
usr.sbin/bgplgd/qs.c
333
} else if (ctx->qs_set & (1 << QS_GROUP)) {
usr.sbin/bgplgd/qs.c
337
argv[argc++] = ctx->qs_args[QS_GROUP].string;
usr.sbin/bgplgd/qs.c
340
if (ctx->qs_set & (1 << QS_AS)) {
usr.sbin/bgplgd/qs.c
344
argv[argc++] = ctx->qs_args[QS_AS].string;
usr.sbin/bgplgd/qs.c
346
if (ctx->qs_set & (1 << QS_COMMUNITY)) {
usr.sbin/bgplgd/qs.c
350
argv[argc++] = ctx->qs_args[QS_COMMUNITY].string;
usr.sbin/bgplgd/qs.c
352
if (ctx->qs_set & (1 << QS_EXTCOMMUNITY)) {
usr.sbin/bgplgd/qs.c
356
argv[argc++] = ctx->qs_args[QS_EXTCOMMUNITY].string;
usr.sbin/bgplgd/qs.c
358
if (ctx->qs_set & (1 << QS_LARGECOMMUNITY)) {
usr.sbin/bgplgd/qs.c
362
argv[argc++] = ctx->qs_args[QS_LARGECOMMUNITY].string;
usr.sbin/bgplgd/qs.c
364
if (ctx->qs_set & (1 << QS_AF)) {
usr.sbin/bgplgd/qs.c
366
argv[argc++] = ctx->qs_args[QS_AF].string;
usr.sbin/bgplgd/qs.c
368
if (ctx->qs_set & (1 << QS_RIB)) {
usr.sbin/bgplgd/qs.c
372
argv[argc++] = ctx->qs_args[QS_RIB].string;
usr.sbin/bgplgd/qs.c
374
if (ctx->qs_set & (1 << QS_OVS)) {
usr.sbin/bgplgd/qs.c
378
argv[argc++] = ctx->qs_args[QS_OVS].string;
usr.sbin/bgplgd/qs.c
380
if (ctx->qs_set & (1 << QS_AVS)) {
usr.sbin/bgplgd/qs.c
384
argv[argc++] = ctx->qs_args[QS_AVS].string;
usr.sbin/bgplgd/qs.c
387
if (ctx->qs_args[QS_BEST].one) {
usr.sbin/bgplgd/qs.c
390
} else if (ctx->qs_args[QS_ERROR].one) {
usr.sbin/bgplgd/qs.c
393
} else if (ctx->qs_args[QS_FILTERED].one) {
usr.sbin/bgplgd/qs.c
396
} else if (ctx->qs_args[QS_INVALID].one) {
usr.sbin/bgplgd/qs.c
399
} else if (ctx->qs_args[QS_LEAKED].one) {
usr.sbin/bgplgd/qs.c
405
if (ctx->qs_set & (1 << QS_PREFIX)) {
usr.sbin/bgplgd/qs.c
407
argv[argc++] = ctx->qs_args[QS_PREFIX].string;
usr.sbin/bgplgd/qs.c
410
if (ctx->qs_args[QS_ALL].one) {
usr.sbin/bgplgd/qs.c
413
} else if (ctx->qs_args[QS_SHORTER].one) {
usr.sbin/bgplgd/slowcgi.c
1005
bgpctl_call(&ctx);
usr.sbin/bgplgd/slowcgi.c
949
struct lg_ctx ctx = { 0 };
usr.sbin/bgplgd/slowcgi.c
953
res = prep_request(&ctx, env_get(c, "REQUEST_METHOD"),
usr.sbin/dhcpd/sync.c
399
HMAC_CTX *ctx;
usr.sbin/dhcpd/sync.c
409
if ((ctx = HMAC_CTX_new()) == NULL)
usr.sbin/dhcpd/sync.c
411
if (!HMAC_Init_ex(ctx, sync_key, strlen(sync_key), EVP_sha1(), NULL))
usr.sbin/dhcpd/sync.c
424
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
usr.sbin/dhcpd/sync.c
443
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
usr.sbin/dhcpd/sync.c
449
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
usr.sbin/dhcpd/sync.c
458
if (!HMAC_Update(ctx, iov[i].iov_base, iov[i].iov_len))
usr.sbin/dhcpd/sync.c
462
if (!HMAC_Final(ctx, hdr.sh_hmac, &hmac_len))
usr.sbin/dhcpd/sync.c
469
HMAC_CTX_free(ctx);
usr.sbin/ldapd/auth.c
217
SHA_CTX ctx;
usr.sbin/ldapd/auth.c
227
SHA1_Init(&ctx);
usr.sbin/ldapd/auth.c
228
SHA1_Update(&ctx, passwd, strlen(passwd));
usr.sbin/ldapd/auth.c
229
SHA1_Final(md, &ctx);
usr.sbin/ldapd/auth.c
236
SHA1_Init(&ctx);
usr.sbin/ldapd/auth.c
237
SHA1_Update(&ctx, passwd, strlen(passwd));
usr.sbin/ldapd/auth.c
238
SHA1_Update(&ctx, salt, sz - SHA_DIGEST_LENGTH);
usr.sbin/ldapd/auth.c
239
SHA1_Final(md, &ctx);
usr.sbin/ldapd/evbuffer_tls.c
153
struct tls *ctx = buftls->bt_ctx;
usr.sbin/ldapd/evbuffer_tls.c
163
res = evtls_write(bufev->output, fd, ctx);
usr.sbin/ldapd/evbuffer_tls.c
211
struct tls *ctx = buftls->bt_ctx;
usr.sbin/ldapd/evbuffer_tls.c
220
res = tls_handshake(ctx);
usr.sbin/ldapd/evbuffer_tls.c
253
struct tls *ctx, int fd)
usr.sbin/ldapd/evbuffer_tls.c
259
buftls->bt_ctx = ctx;
usr.sbin/ldapd/evbuffer_tls.c
295
evtls_read(struct evbuffer *buf, int fd, int howmuch, struct tls *ctx)
usr.sbin/ldapd/evbuffer_tls.c
311
n = tls_read(ctx, p, howmuch);
usr.sbin/ldapd/evbuffer_tls.c
325
evtls_write(struct evbuffer *buffer, int fd, struct tls *ctx)
usr.sbin/ldapd/evbuffer_tls.c
329
n = tls_write(ctx, buffer->buffer, buffer->off);
usr.sbin/ldapd/evbuffer_tls.c
72
struct tls *ctx = buftls->bt_ctx;
usr.sbin/ldapd/evbuffer_tls.c
99
res = evtls_read(bufev->input, fd, howmuch, ctx);
usr.sbin/lldpd/lldpd.c
1044
struct ctl_msap_ctx *ctx;
usr.sbin/lldpd/lldpd.c
1052
ctx = malloc(sizeof(*ctx));
usr.sbin/lldpd/lldpd.c
1053
if (ctx == NULL) {
usr.sbin/lldpd/lldpd.c
1057
memcpy(ctx->ifname, req->ifname, sizeof(ctx->ifname));
usr.sbin/lldpd/lldpd.c
1060
ctl->ctl_ctx = ctx;
usr.sbin/lldpd/lldpd.c
1068
struct ctl_msap_ctx *ctx = ctl->ctl_ctx;
usr.sbin/lldpd/lldpd.c
1069
struct lldp_msap *msap = ctx->msap;
usr.sbin/lldpd/lldpd.c
1114
free(ctx);
usr.sbin/lldpd/lldpd.c
1123
free(ctx);
usr.sbin/lldpd/lldpd.c
1135
struct ctl_msap_ctx *ctx = ctl->ctl_ctx;
usr.sbin/lldpd/lldpd.c
1144
if (ctx->ifname[0] == '\0')
usr.sbin/lldpd/lldpd.c
1147
if (ifp != NULL && strncmp(ifp->if_key.if_name, ctx->ifname,
usr.sbin/lldpd/lldpd.c
1154
ctx->msap = lldp_msap_take(lldpd, msap);
usr.sbin/lldpd/lldpd.c
1161
struct ctl_msap_ctx *ctx = ctl->ctl_ctx;
usr.sbin/lldpd/lldpd.c
1178
free(ctx);
usr.sbin/lldpd/lldpd.c
1183
free(ctx);
usr.sbin/npppd/l2tp/l2tp_ctrl.c
365
l2tp_ctrl_timeout(int fd, short evtype, void *ctx)
usr.sbin/npppd/l2tp/l2tp_ctrl.c
377
_this = ctx;
usr.sbin/npppd/l2tp/l2tpd.c
481
l2tpd_stop_timeout(int fd, short evtype, void *ctx)
usr.sbin/npppd/l2tp/l2tpd.c
487
_this = ctx;
usr.sbin/npppd/l2tp/l2tpd.c
593
l2tpd_io_event(int fd, short evtype, void *ctx)
usr.sbin/npppd/l2tp/l2tpd.c
603
_this = ctx;
usr.sbin/npppd/npppd/chap.c
146
_this->timerctx.ctx = _this;
usr.sbin/npppd/npppd/chap_ms.c
137
EVP_MD_CTX *ctx;
usr.sbin/npppd/npppd/chap_ms.c
140
ctx = EVP_MD_CTX_new();
usr.sbin/npppd/npppd/chap_ms.c
141
EVP_DigestInit_ex(ctx, EVP_md4(), NULL);
usr.sbin/npppd/npppd/chap_ms.c
142
EVP_DigestUpdate(ctx, in, inlen);
usr.sbin/npppd/npppd/chap_ms.c
143
EVP_DigestFinal_ex(ctx, hash, &mdlen);
usr.sbin/npppd/npppd/chap_ms.c
144
EVP_MD_CTX_free(ctx);
usr.sbin/npppd/npppd/chap_ms.c
151
EVP_MD_CTX *ctx;
usr.sbin/npppd/npppd/chap_ms.c
161
ctx = EVP_MD_CTX_new();
usr.sbin/npppd/npppd/chap_ms.c
162
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/npppd/npppd/chap_ms.c
163
EVP_DigestUpdate(ctx, peer_challenge, MSCHAPV2_CHALLENGE_SZ);
usr.sbin/npppd/npppd/chap_ms.c
164
EVP_DigestUpdate(ctx, auth_challenge, MSCHAPV2_CHALLENGE_SZ);
usr.sbin/npppd/npppd/chap_ms.c
165
EVP_DigestUpdate(ctx, name, strlen(name));
usr.sbin/npppd/npppd/chap_ms.c
166
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/npppd/npppd/chap_ms.c
167
EVP_MD_CTX_free(ctx);
usr.sbin/npppd/npppd/chap_ms.c
192
EVP_MD_CTX *ctx;
usr.sbin/npppd/npppd/chap_ms.c
217
ctx = EVP_MD_CTX_new();
usr.sbin/npppd/npppd/chap_ms.c
218
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/npppd/npppd/chap_ms.c
219
EVP_DigestUpdate(ctx, password_hash2, sizeof(password_hash2));
usr.sbin/npppd/npppd/chap_ms.c
220
EVP_DigestUpdate(ctx, ntresponse, 24);
usr.sbin/npppd/npppd/chap_ms.c
221
EVP_DigestUpdate(ctx, magic1, 39);
usr.sbin/npppd/npppd/chap_ms.c
222
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/npppd/npppd/chap_ms.c
227
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/npppd/npppd/chap_ms.c
228
EVP_DigestUpdate(ctx, md, sizeof(md));
usr.sbin/npppd/npppd/chap_ms.c
229
EVP_DigestUpdate(ctx, challenge, sizeof(challenge));
usr.sbin/npppd/npppd/chap_ms.c
230
EVP_DigestUpdate(ctx, magic2, 41);
usr.sbin/npppd/npppd/chap_ms.c
231
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/npppd/npppd/chap_ms.c
232
EVP_MD_CTX_free(ctx);
usr.sbin/npppd/npppd/chap_ms.c
256
EVP_MD_CTX *ctx;
usr.sbin/npppd/npppd/chap_ms.c
263
ctx = EVP_MD_CTX_new();
usr.sbin/npppd/npppd/chap_ms.c
264
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/npppd/npppd/chap_ms.c
265
EVP_DigestUpdate(ctx, password_hash2, MSCHAP_HASH_SZ);
usr.sbin/npppd/npppd/chap_ms.c
266
EVP_DigestUpdate(ctx, ntresponse, 24);
usr.sbin/npppd/npppd/chap_ms.c
267
EVP_DigestUpdate(ctx, magic1, 27);
usr.sbin/npppd/npppd/chap_ms.c
268
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/npppd/npppd/chap_ms.c
269
EVP_MD_CTX_free(ctx);
usr.sbin/npppd/npppd/chap_ms.c
278
EVP_MD_CTX *ctx;
usr.sbin/npppd/npppd/chap_ms.c
310
ctx = EVP_MD_CTX_new();
usr.sbin/npppd/npppd/chap_ms.c
311
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/npppd/npppd/chap_ms.c
312
EVP_DigestUpdate(ctx, masterkey, 16);
usr.sbin/npppd/npppd/chap_ms.c
313
EVP_DigestUpdate(ctx, sha1_pad1, 40);
usr.sbin/npppd/npppd/chap_ms.c
314
EVP_DigestUpdate(ctx, s, 84);
usr.sbin/npppd/npppd/chap_ms.c
315
EVP_DigestUpdate(ctx, sha1_pad2, 40);
usr.sbin/npppd/npppd/chap_ms.c
316
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/npppd/npppd/chap_ms.c
317
EVP_MD_CTX_free(ctx);
usr.sbin/npppd/npppd/chap_ms.c
349
EVP_MD_CTX *ctx;
usr.sbin/npppd/npppd/chap_ms.c
353
ctx = EVP_MD_CTX_new();
usr.sbin/npppd/npppd/chap_ms.c
354
EVP_DigestInit_ex(ctx, EVP_md5(), NULL);
usr.sbin/npppd/npppd/chap_ms.c
355
EVP_DigestUpdate(ctx, secret, strlen(secret));
usr.sbin/npppd/npppd/chap_ms.c
356
EVP_DigestUpdate(ctx, authenticator, 16);
usr.sbin/npppd/npppd/chap_ms.c
357
EVP_DigestUpdate(ctx, encrypted, 2);
usr.sbin/npppd/npppd/chap_ms.c
358
EVP_DigestFinal_ex(ctx, b, &mdlen);
usr.sbin/npppd/npppd/chap_ms.c
364
EVP_DigestInit_ex(ctx, EVP_md5(), NULL);
usr.sbin/npppd/npppd/chap_ms.c
365
EVP_DigestUpdate(ctx, secret, strlen(secret));
usr.sbin/npppd/npppd/chap_ms.c
366
EVP_DigestUpdate(ctx, encrypted + 2, mdlen);
usr.sbin/npppd/npppd/chap_ms.c
367
EVP_DigestFinal_ex(ctx, b, &mdlen);
usr.sbin/npppd/npppd/chap_ms.c
368
EVP_MD_CTX_free(ctx);
usr.sbin/npppd/npppd/control.c
183
if ((c->ctx = npppd_ctl_create(cs->cs_ctx)) == NULL) {
usr.sbin/npppd/npppd/control.c
193
free(c->ctx);
usr.sbin/npppd/npppd/control.c
242
npppd_ctl_destroy(c->ctx);
usr.sbin/npppd/npppd/control.c
267
npppd_ctl_imsg_compose(c->ctx, &c->iev.ibuf);
usr.sbin/npppd/npppd/control.c
309
retval = npppd_ctl_who(c->ctx);
usr.sbin/npppd/npppd/control.c
311
retval = npppd_ctl_monitor(c->ctx);
usr.sbin/npppd/npppd/control.c
313
retval = npppd_ctl_who_and_monitor(c->ctx);
usr.sbin/npppd/npppd/control.c
325
retval = npppd_ctl_disconnect(c->ctx,
usr.sbin/npppd/npppd/control.c
340
npppd_ctl_imsg_compose(c->ctx, &c->iev.ibuf);
usr.sbin/npppd/npppd/fsm.c
110
f->timerctx.ctx = f;
usr.sbin/npppd/npppd/fsm.c
84
fsm_evtimer_timeout(int fd, short evtype, void *ctx)
usr.sbin/npppd/npppd/fsm.c
88
wrap = ctx;
usr.sbin/npppd/npppd/fsm.c
89
wrap->func(wrap->ctx);
usr.sbin/npppd/npppd/fsm.h
47
void *ctx;
usr.sbin/npppd/npppd/lcp.c
123
_this->timerctx.ctx = _this;
usr.sbin/npppd/npppd/lcp.c
933
lcp_reset_timeout(void *ctx)
usr.sbin/npppd/npppd/lcp.c
937
_this = ctx;
usr.sbin/npppd/npppd/lcp.c
951
lcp_timeout(void *ctx)
usr.sbin/npppd/npppd/lcp.c
956
_this = ctx;
usr.sbin/npppd/npppd/mppe.c
579
#define SHAFinal(ctx,digest) SHA1_Final(digest, ctx)
usr.sbin/npppd/npppd/npppd.c
1928
npppd_on_sighup(int fd, short ev_type, void *ctx)
usr.sbin/npppd/npppd/npppd.c
1932
_this = ctx;
usr.sbin/npppd/npppd/npppd.c
1942
npppd_on_sigterm(int fd, short ev_type, void *ctx)
usr.sbin/npppd/npppd/npppd.c
1946
_this = ctx;
usr.sbin/npppd/npppd/npppd.c
1951
npppd_on_sigint(int fd, short ev_type, void *ctx)
usr.sbin/npppd/npppd/npppd.c
1955
_this = ctx;
usr.sbin/npppd/npppd/npppd.c
1960
npppd_on_sigchld(int fd, short ev_type, void *ctx)
usr.sbin/npppd/npppd/npppd.c
1966
_this = ctx;
usr.sbin/npppd/npppd/npppd.c
2390
if (npppd_ctl_add_started_ppp_id(c->ctx, ppp->id) == 0) {
usr.sbin/npppd/npppd/npppd.c
2391
npppd_ctl_imsg_compose(c->ctx, &c->iev.ibuf);
usr.sbin/npppd/npppd/npppd.c
2403
if (npppd_ctl_add_stopped_ppp(c->ctx, ppp) == 0) {
usr.sbin/npppd/npppd/npppd.c
2404
npppd_ctl_imsg_compose(c->ctx, &c->iev.ibuf);
usr.sbin/npppd/npppd/npppd.c
548
npppd_timer(int fd, short evtype, void *ctx)
usr.sbin/npppd/npppd/npppd.c
552
_this = ctx;
usr.sbin/npppd/npppd/npppd.h
285
void *ctx;
usr.sbin/npppd/npppd/npppd_ctl.c
161
npppd_ctl_who_walk_rd(struct radish *rd, void *ctx)
usr.sbin/npppd/npppd/npppd_ctl.c
163
struct npppd_ctl *_this = ctx;
usr.sbin/npppd/npppd/npppd_radius.c
175
RADIUS_REQUEST_CTX ctx)
usr.sbin/npppd/npppd/npppd_radius.c
200
if (radius_request_can_failover(ctx)) {
usr.sbin/npppd/npppd/npppd_radius.c
201
if (radius_request_failover(ctx) == 0) {
usr.sbin/npppd/npppd/npppd_radius.c
205
sa = radius_get_server_address(ctx);
usr.sbin/npppd/npppd/npppd_radius.c
420
RADIUS_REQUEST_CTX ctx)
usr.sbin/npppd/npppd/npppd_radius.c
423
radius_request_failover(ctx);
usr.sbin/npppd/npppd/npppd_radius.c
692
npppd_radius_dae_on_event(int fd, short ev, void *ctx)
usr.sbin/npppd/npppd/npppd_radius.c
697
struct npppd_radius_dae_listen *listen = ctx;
usr.sbin/npppd/npppd/ppp.c
426
ppp_destroy(void *ctx)
usr.sbin/npppd/npppd/ppp.c
428
npppd_ppp *_this = ctx;
usr.sbin/npppd/npppd/radius_req.c
104
RADIUS_REQ_ASSERT(ctx != NULL);
usr.sbin/npppd/npppd/radius_req.c
105
lap = ctx;
usr.sbin/npppd/npppd/radius_req.c
176
radius_request_can_failover(RADIUS_REQUEST_CTX ctx)
usr.sbin/npppd/npppd/radius_req.c
181
lap = ctx;
usr.sbin/npppd/npppd/radius_req.c
196
radius_request_failover(RADIUS_REQUEST_CTX ctx)
usr.sbin/npppd/npppd/radius_req.c
200
lap = ctx;
usr.sbin/npppd/npppd/radius_req.c
309
radius_cancel_request(RADIUS_REQUEST_CTX ctx)
usr.sbin/npppd/npppd/radius_req.c
311
struct overlapped *lap = ctx;
usr.sbin/npppd/npppd/radius_req.c
339
radius_get_server_secret(RADIUS_REQUEST_CTX ctx)
usr.sbin/npppd/npppd/radius_req.c
343
lap = ctx;
usr.sbin/npppd/npppd/radius_req.c
351
radius_get_server_address(RADIUS_REQUEST_CTX ctx)
usr.sbin/npppd/npppd/radius_req.c
355
lap = ctx;
usr.sbin/npppd/npppd/radius_req.c
471
radius_on_response(RADIUS_REQUEST_CTX ctx, RADIUS_PACKET *pkt, int flags,
usr.sbin/npppd/npppd/radius_req.c
477
lap = ctx;
usr.sbin/npppd/npppd/radius_req.c
504
lap->response_fn(lap->context, pkt, flags, ctx);
usr.sbin/npppd/npppd/radius_req.c
98
radius_request(RADIUS_REQUEST_CTX ctx, RADIUS_PACKET *pkt)
usr.sbin/npppd/pppoe/pppoe_session.c
141
pppoe_session_dispose_event(int fd, short ev, void *ctx)
usr.sbin/npppd/pppoe/pppoe_session.c
145
_this = ctx;
usr.sbin/npppd/pppoe/pppoed.c
577
pppoed_io_event(int fd, short evmask, void *ctx)
usr.sbin/npppd/pppoe/pppoed.c
585
_this = ctx;
usr.sbin/npppd/pptp/pptp_ctrl.c
203
pptp_ctrl_timeout(int fd, short event, void *ctx)
usr.sbin/npppd/pptp/pptp_ctrl.c
210
_this = ctx;
usr.sbin/npppd/pptp/pptp_ctrl.c
390
pptp_ctrl_io_event(int fd, short evmask, void *ctx)
usr.sbin/npppd/pptp/pptp_ctrl.c
396
_this = ctx;
usr.sbin/npppd/pptp/pptpd.c
510
pptpd_stop_timeout(int fd, short event, void *ctx)
usr.sbin/npppd/pptp/pptpd.c
514
_this = ctx;
usr.sbin/npppd/pptp/pptpd.c
603
pptpd_io_event(int fd, short evmask, void *ctx)
usr.sbin/npppd/pptp/pptpd.c
612
listener = ctx;
usr.sbin/npppd/pptp/pptpd.c
648
pptpd_gre_io_event(int fd, short evmask, void *ctx)
usr.sbin/npppd/pptp/pptpd.c
657
listener = ctx;
usr.sbin/npppd/pptp/pptpd.c
918
pptp_call_hash(const void *ctx, int size)
usr.sbin/npppd/pptp/pptpd.c
920
return (uintptr_t)ctx % size;
usr.sbin/nsd/dnstap/dnstap.c
142
SSL_CTX* ctx;
usr.sbin/nsd/dnstap/dnstap.c
165
dtw->ctx = SSL_CTX_new(SSLv23_client_method());
usr.sbin/nsd/dnstap/dnstap.c
166
if(!dtw->ctx) {
usr.sbin/nsd/dnstap/dnstap.c
173
if((SSL_CTX_set_options(dtw->ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2)
usr.sbin/nsd/dnstap/dnstap.c
176
SSL_CTX_free(dtw->ctx);
usr.sbin/nsd/dnstap/dnstap.c
182
if((SSL_CTX_set_options(dtw->ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)
usr.sbin/nsd/dnstap/dnstap.c
185
SSL_CTX_free(dtw->ctx);
usr.sbin/nsd/dnstap/dnstap.c
192
if((SSL_CTX_set_options(dtw->ctx, SSL_OP_NO_RENEGOTIATION) &
usr.sbin/nsd/dnstap/dnstap.c
195
SSL_CTX_free(dtw->ctx);
usr.sbin/nsd/dnstap/dnstap.c
202
if(!SSL_CTX_use_certificate_chain_file(dtw->ctx,
usr.sbin/nsd/dnstap/dnstap.c
205
SSL_CTX_free(dtw->ctx);
usr.sbin/nsd/dnstap/dnstap.c
210
if(!SSL_CTX_use_PrivateKey_file(dtw->ctx, tls_client_key_file,
usr.sbin/nsd/dnstap/dnstap.c
213
SSL_CTX_free(dtw->ctx);
usr.sbin/nsd/dnstap/dnstap.c
218
if(!SSL_CTX_check_private_key(dtw->ctx)) {
usr.sbin/nsd/dnstap/dnstap.c
220
SSL_CTX_free(dtw->ctx);
usr.sbin/nsd/dnstap/dnstap.c
227
if(!SSL_CTX_load_verify_locations(dtw->ctx, tls_cert_bundle, NULL)) {
usr.sbin/nsd/dnstap/dnstap.c
229
SSL_CTX_free(dtw->ctx);
usr.sbin/nsd/dnstap/dnstap.c
234
if(SSL_CTX_set_default_verify_paths(dtw->ctx) != 1) {
usr.sbin/nsd/dnstap/dnstap.c
236
SSL_CTX_free(dtw->ctx);
usr.sbin/nsd/dnstap/dnstap.c
241
SSL_CTX_set_verify(dtw->ctx, SSL_VERIFY_PEER, NULL);
usr.sbin/nsd/dnstap/dnstap.c
247
SSL_CTX_free(dtw->ctx);
usr.sbin/nsd/dnstap/dnstap.c
266
SSL_CTX_free(dtw->ctx);
usr.sbin/nsd/dnstap/dnstap.c
361
dtw->ssl = SSL_new(dtw->ctx);
usr.sbin/nsd/iterated_hash.c
30
SHA_CTX ctx;
usr.sbin/nsd/iterated_hash.c
32
EVP_MD_CTX* ctx;
usr.sbin/nsd/iterated_hash.c
37
ctx = EVP_MD_CTX_create();
usr.sbin/nsd/iterated_hash.c
38
if(!ctx) {
usr.sbin/nsd/iterated_hash.c
47
SHA1_Init(&ctx);
usr.sbin/nsd/iterated_hash.c
48
SHA1_Update(&ctx, in, inlength);
usr.sbin/nsd/iterated_hash.c
50
SHA1_Update(&ctx, salt, saltlength);
usr.sbin/nsd/iterated_hash.c
51
SHA1_Final(out, &ctx);
usr.sbin/nsd/iterated_hash.c
53
if(!EVP_DigestInit(ctx, EVP_sha1()))
usr.sbin/nsd/iterated_hash.c
56
if(!EVP_DigestUpdate(ctx, in, inlength))
usr.sbin/nsd/iterated_hash.c
59
if(!EVP_DigestUpdate(ctx, salt, saltlength))
usr.sbin/nsd/iterated_hash.c
62
if(!EVP_DigestFinal_ex(ctx, out, NULL))
usr.sbin/nsd/iterated_hash.c
70
EVP_MD_CTX_destroy(ctx);
usr.sbin/nsd/nsd-control.c
173
SSL_CTX* ctx;
usr.sbin/nsd/nsd-control.c
189
ctx = SSL_CTX_new(SSLv23_client_method());
usr.sbin/nsd/nsd-control.c
190
if(!ctx)
usr.sbin/nsd/nsd-control.c
193
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2)
usr.sbin/nsd/nsd-control.c
197
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)
usr.sbin/nsd/nsd-control.c
202
if((SSL_CTX_set_options(ctx, SSL_OP_NO_RENEGOTIATION) &
usr.sbin/nsd/nsd-control.c
206
if(!SSL_CTX_use_certificate_file(ctx,c_cert,SSL_FILETYPE_PEM))
usr.sbin/nsd/nsd-control.c
208
if(!SSL_CTX_use_PrivateKey_file(ctx,c_key,SSL_FILETYPE_PEM))
usr.sbin/nsd/nsd-control.c
210
if(!SSL_CTX_check_private_key(ctx))
usr.sbin/nsd/nsd-control.c
212
if (SSL_CTX_load_verify_locations(ctx, s_cert, NULL) != 1)
usr.sbin/nsd/nsd-control.c
215
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
usr.sbin/nsd/nsd-control.c
217
return ctx;
usr.sbin/nsd/nsd-control.c
375
setup_ssl(SSL_CTX* ctx, int fd)
usr.sbin/nsd/nsd-control.c
381
if(!ctx) return NULL;
usr.sbin/nsd/nsd-control.c
382
ssl = SSL_new(ctx);
usr.sbin/nsd/nsd-control.c
520
SSL_CTX* ctx = NULL;
usr.sbin/nsd/nsd-control.c
538
ctx = setup_ctx(opt);
usr.sbin/nsd/nsd-control.c
549
ssl = setup_ssl(ctx, fd);
usr.sbin/nsd/nsd-control.c
560
if(ctx) SSL_CTX_free(ctx);
usr.sbin/nsd/remote.c
177
SSL_CTX* ctx;
usr.sbin/nsd/remote.c
272
rc->ctx = server_tls_ctx_setup(s_key, s_cert, s_cert);
usr.sbin/nsd/remote.c
273
if(!rc->ctx) {
usr.sbin/nsd/remote.c
302
rc->ctx = NULL;
usr.sbin/nsd/remote.c
367
if(rc->ctx) {
usr.sbin/nsd/remote.c
368
SSL_CTX_free(rc->ctx);
usr.sbin/nsd/remote.c
666
if(rc->ctx) {
usr.sbin/nsd/remote.c
668
n->ssl = SSL_new(rc->ctx);
usr.sbin/nsd/server.c
2089
SSL_CTX* ctx = (SSL_CTX*)ctxt;
usr.sbin/nsd/server.c
2090
(void)ctx;
usr.sbin/nsd/server.c
2092
if(!SSL_CTX_set_ecdh_auto(ctx,1)) {
usr.sbin/nsd/server.c
2102
if (1 != SSL_CTX_set_tmp_ecdh (ctx, ecdh)) {
usr.sbin/nsd/server.c
2149
SSL_CTX *ctx = SSL_CTX_new(SSLv23_server_method());
usr.sbin/nsd/server.c
2150
if(!ctx) {
usr.sbin/nsd/server.c
2156
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2) != SSL_OP_NO_SSLv2){
usr.sbin/nsd/server.c
2158
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2162
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)
usr.sbin/nsd/server.c
2165
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2170
if((SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1) & SSL_OP_NO_TLSv1)
usr.sbin/nsd/server.c
2173
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2179
if((SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_1) & SSL_OP_NO_TLSv1_1)
usr.sbin/nsd/server.c
2182
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2188
if((SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_2) & SSL_OP_NO_TLSv1_2)
usr.sbin/nsd/server.c
2191
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2197
if((SSL_CTX_set_options(ctx, SSL_OP_NO_RENEGOTIATION) &
usr.sbin/nsd/server.c
2200
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2206
if((SSL_CTX_set_options(ctx, SSL_OP_IGNORE_UNEXPECTED_EOF) &
usr.sbin/nsd/server.c
2215
if(!SSL_CTX_set_cipher_list(ctx, "ECDHE+AESGCM:ECDHE+CHACHA20"))
usr.sbin/nsd/server.c
2219
if((SSL_CTX_set_options(ctx, SSL_OP_CIPHER_SERVER_PREFERENCE) &
usr.sbin/nsd/server.c
2223
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2227
SSL_CTX_set_security_level(ctx, 0);
usr.sbin/nsd/server.c
2229
if(!SSL_CTX_use_certificate_chain_file(ctx, pem)) {
usr.sbin/nsd/server.c
2232
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2235
if(!SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM)) {
usr.sbin/nsd/server.c
2238
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2241
if(!SSL_CTX_check_private_key(ctx)) {
usr.sbin/nsd/server.c
2244
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2247
listen_sslctx_setup_2(ctx);
usr.sbin/nsd/server.c
2249
if(!SSL_CTX_load_verify_locations(ctx, verifypem, NULL)) {
usr.sbin/nsd/server.c
2251
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2254
SSL_CTX_set_client_CA_list(ctx, SSL_load_client_CA_file(verifypem));
usr.sbin/nsd/server.c
2255
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, NULL);
usr.sbin/nsd/server.c
2257
SSL_CTX_set_alpn_select_cb(ctx, server_alpn_cb, NULL);
usr.sbin/nsd/server.c
2258
return ctx;
usr.sbin/nsd/server.c
2265
SSL_CTX *ctx;
usr.sbin/nsd/server.c
2280
ctx = server_tls_ctx_setup(key, pem, verifypem);
usr.sbin/nsd/server.c
2281
if(!ctx) {
usr.sbin/nsd/server.c
2288
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2292
if(!SSL_CTX_set_tlsext_status_cb(ctx, add_ocsp_data_cb)) {
usr.sbin/nsd/server.c
2294
SSL_CTX_free(ctx);
usr.sbin/nsd/server.c
2299
return ctx;
usr.sbin/nsd/server.c
355
static SSL* incoming_ssl_fd(SSL_CTX* ctx, int fd);
usr.sbin/nsd/server.c
4929
incoming_ssl_fd(SSL_CTX* ctx, int fd)
usr.sbin/nsd/server.c
4931
SSL* ssl = SSL_new((SSL_CTX*)ctx);
usr.sbin/nsd/tsig-openssl.c
218
HMAC_CTX *ctx = (HMAC_CTX *) context;
usr.sbin/nsd/tsig-openssl.c
220
HMAC_Init_ex(ctx, key->data, key->size, md, NULL);
usr.sbin/nsd/tsig-openssl.c
262
HMAC_CTX *ctx = (HMAC_CTX *) context;
usr.sbin/nsd/tsig-openssl.c
263
HMAC_Update(ctx, (unsigned char *) data, (int) size);
usr.sbin/nsd/tsig-openssl.c
276
HMAC_CTX *ctx = (HMAC_CTX *) context;
usr.sbin/nsd/tsig-openssl.c
278
HMAC_Final(ctx, digest, &len);
usr.sbin/nsd/xdp-dns-redirect_kern.c
101
cursor_init(&c, ctx);
usr.sbin/nsd/xdp-dns-redirect_kern.c
36
static __always_inline void cursor_init(struct cursor *c, struct xdp_md *ctx) {
usr.sbin/nsd/xdp-dns-redirect_kern.c
37
c->end = (void *)(long)ctx->data_end;
usr.sbin/nsd/xdp-dns-redirect_kern.c
38
c->pos = (void *)(long)ctx->data;
usr.sbin/nsd/xdp-dns-redirect_kern.c
90
int xdp_dns_redirect(struct xdp_md *ctx) {
usr.sbin/nsd/xdp-dns-redirect_kern.c
99
__u32 index = ctx->rx_queue_index;
usr.sbin/nsd/xfrd-tcp.c
129
SSL_CTX *ctx;
usr.sbin/nsd/xfrd-tcp.c
131
ctx = SSL_CTX_new(TLS_client_method());
usr.sbin/nsd/xfrd-tcp.c
132
if (!ctx) {
usr.sbin/nsd/xfrd-tcp.c
135
else if (SSL_CTX_set_default_verify_paths(ctx) != 1) {
usr.sbin/nsd/xfrd-tcp.c
136
SSL_CTX_free(ctx);
usr.sbin/nsd/xfrd-tcp.c
141
else if (!SSL_CTX_set_min_proto_version(ctx, TLS1_3_VERSION)) {
usr.sbin/nsd/xfrd-tcp.c
142
SSL_CTX_free(ctx);
usr.sbin/nsd/xfrd-tcp.c
147
if (SSL_CTX_set_alpn_protos(ctx, protos, sizeof(protos)) != 0) {
usr.sbin/nsd/xfrd-tcp.c
148
SSL_CTX_free(ctx);
usr.sbin/nsd/xfrd-tcp.c
152
return ctx;
usr.sbin/nsd/xfrd-tcp.c
156
tls_verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
usr.sbin/nsd/xfrd-tcp.c
158
int err = X509_STORE_CTX_get_error(ctx);
usr.sbin/nsd/xfrd-tcp.c
159
int depth = X509_STORE_CTX_get_error_depth(ctx);
usr.sbin/ntpd/constraint.c
368
void *ctx;
usr.sbin/ntpd/constraint.c
447
if ((ctx = httpsdate_query(addr,
usr.sbin/ntpd/constraint.c
463
httpsdate_free(ctx);
usr.sbin/ocspcheck/http.c
101
tls_error(http->ctx));
usr.sbin/ocspcheck/http.c
111
rc = tls_write(http->ctx, buf, sz);
usr.sbin/ocspcheck/http.c
116
tls_error(http->ctx));
usr.sbin/ocspcheck/http.c
185
if (http->ctx != NULL) {
usr.sbin/ocspcheck/http.c
188
rc = tls_close(http->ctx);
usr.sbin/ocspcheck/http.c
193
tls_error(http->ctx));
usr.sbin/ocspcheck/http.c
195
tls_free(http->ctx);
usr.sbin/ocspcheck/http.c
203
http->ctx = NULL;
usr.sbin/ocspcheck/http.c
308
if ((http->ctx = tls_client()) == NULL) {
usr.sbin/ocspcheck/http.c
311
} else if (tls_configure(http->ctx, tlscfg) == -1) {
usr.sbin/ocspcheck/http.c
313
http->src.ip, tls_error(http->ctx));
usr.sbin/ocspcheck/http.c
317
if (tls_connect_socket(http->ctx, http->fd, http->host) != 0) {
usr.sbin/ocspcheck/http.c
319
http->host, tls_error(http->ctx));
usr.sbin/ocspcheck/http.c
61
struct tls *ctx; /* if TLS */
usr.sbin/ocspcheck/http.c
96
rc = tls_read(http->ctx, buf, sz);
usr.sbin/radiusctl/chap_ms.c
137
EVP_MD_CTX *ctx;
usr.sbin/radiusctl/chap_ms.c
140
ctx = EVP_MD_CTX_new();
usr.sbin/radiusctl/chap_ms.c
141
EVP_DigestInit_ex(ctx, EVP_md4(), NULL);
usr.sbin/radiusctl/chap_ms.c
142
EVP_DigestUpdate(ctx, in, inlen);
usr.sbin/radiusctl/chap_ms.c
143
EVP_DigestFinal_ex(ctx, hash, &mdlen);
usr.sbin/radiusctl/chap_ms.c
144
EVP_MD_CTX_free(ctx);
usr.sbin/radiusctl/chap_ms.c
151
EVP_MD_CTX *ctx;
usr.sbin/radiusctl/chap_ms.c
161
ctx = EVP_MD_CTX_new();
usr.sbin/radiusctl/chap_ms.c
162
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/radiusctl/chap_ms.c
163
EVP_DigestUpdate(ctx, peer_challenge, MSCHAPV2_CHALLENGE_SZ);
usr.sbin/radiusctl/chap_ms.c
164
EVP_DigestUpdate(ctx, auth_challenge, MSCHAPV2_CHALLENGE_SZ);
usr.sbin/radiusctl/chap_ms.c
165
EVP_DigestUpdate(ctx, name, strlen(name));
usr.sbin/radiusctl/chap_ms.c
166
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/radiusctl/chap_ms.c
167
EVP_MD_CTX_free(ctx);
usr.sbin/radiusctl/chap_ms.c
192
EVP_MD_CTX *ctx;
usr.sbin/radiusctl/chap_ms.c
217
ctx = EVP_MD_CTX_new();
usr.sbin/radiusctl/chap_ms.c
218
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/radiusctl/chap_ms.c
219
EVP_DigestUpdate(ctx, password_hash2, sizeof(password_hash2));
usr.sbin/radiusctl/chap_ms.c
220
EVP_DigestUpdate(ctx, ntresponse, 24);
usr.sbin/radiusctl/chap_ms.c
221
EVP_DigestUpdate(ctx, magic1, 39);
usr.sbin/radiusctl/chap_ms.c
222
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/radiusctl/chap_ms.c
227
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/radiusctl/chap_ms.c
228
EVP_DigestUpdate(ctx, md, sizeof(md));
usr.sbin/radiusctl/chap_ms.c
229
EVP_DigestUpdate(ctx, challenge, sizeof(challenge));
usr.sbin/radiusctl/chap_ms.c
230
EVP_DigestUpdate(ctx, magic2, 41);
usr.sbin/radiusctl/chap_ms.c
231
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/radiusctl/chap_ms.c
232
EVP_MD_CTX_free(ctx);
usr.sbin/radiusctl/chap_ms.c
256
EVP_MD_CTX *ctx;
usr.sbin/radiusctl/chap_ms.c
263
ctx = EVP_MD_CTX_new();
usr.sbin/radiusctl/chap_ms.c
264
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/radiusctl/chap_ms.c
265
EVP_DigestUpdate(ctx, password_hash2, MSCHAP_HASH_SZ);
usr.sbin/radiusctl/chap_ms.c
266
EVP_DigestUpdate(ctx, ntresponse, 24);
usr.sbin/radiusctl/chap_ms.c
267
EVP_DigestUpdate(ctx, magic1, 27);
usr.sbin/radiusctl/chap_ms.c
268
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/radiusctl/chap_ms.c
269
EVP_MD_CTX_free(ctx);
usr.sbin/radiusctl/chap_ms.c
278
EVP_MD_CTX *ctx;
usr.sbin/radiusctl/chap_ms.c
310
ctx = EVP_MD_CTX_new();
usr.sbin/radiusctl/chap_ms.c
311
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/radiusctl/chap_ms.c
312
EVP_DigestUpdate(ctx, masterkey, 16);
usr.sbin/radiusctl/chap_ms.c
313
EVP_DigestUpdate(ctx, sha1_pad1, 40);
usr.sbin/radiusctl/chap_ms.c
314
EVP_DigestUpdate(ctx, s, 84);
usr.sbin/radiusctl/chap_ms.c
315
EVP_DigestUpdate(ctx, sha1_pad2, 40);
usr.sbin/radiusctl/chap_ms.c
316
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/radiusctl/chap_ms.c
317
EVP_MD_CTX_free(ctx);
usr.sbin/radiusctl/chap_ms.c
349
EVP_MD_CTX *ctx;
usr.sbin/radiusctl/chap_ms.c
353
ctx = EVP_MD_CTX_new();
usr.sbin/radiusctl/chap_ms.c
354
EVP_DigestInit_ex(ctx, EVP_md5(), NULL);
usr.sbin/radiusctl/chap_ms.c
355
EVP_DigestUpdate(ctx, secret, strlen(secret));
usr.sbin/radiusctl/chap_ms.c
356
EVP_DigestUpdate(ctx, authenticator, 16);
usr.sbin/radiusctl/chap_ms.c
357
EVP_DigestUpdate(ctx, crypted, 2);
usr.sbin/radiusctl/chap_ms.c
358
EVP_DigestFinal_ex(ctx, b, &mdlen);
usr.sbin/radiusctl/chap_ms.c
364
EVP_DigestInit_ex(ctx, EVP_md5(), NULL);
usr.sbin/radiusctl/chap_ms.c
365
EVP_DigestUpdate(ctx, secret, strlen(secret));
usr.sbin/radiusctl/chap_ms.c
366
EVP_DigestUpdate(ctx, crypted + 2, mdlen);
usr.sbin/radiusctl/chap_ms.c
367
EVP_DigestFinal_ex(ctx, b, &mdlen);
usr.sbin/radiusctl/chap_ms.c
368
EVP_MD_CTX_free(ctx);
usr.sbin/radiusd/chap_ms.c
137
EVP_MD_CTX *ctx;
usr.sbin/radiusd/chap_ms.c
140
ctx = EVP_MD_CTX_new();
usr.sbin/radiusd/chap_ms.c
141
EVP_DigestInit_ex(ctx, EVP_md4(), NULL);
usr.sbin/radiusd/chap_ms.c
142
EVP_DigestUpdate(ctx, in, inlen);
usr.sbin/radiusd/chap_ms.c
143
EVP_DigestFinal_ex(ctx, hash, &mdlen);
usr.sbin/radiusd/chap_ms.c
144
EVP_MD_CTX_free(ctx);
usr.sbin/radiusd/chap_ms.c
151
EVP_MD_CTX *ctx;
usr.sbin/radiusd/chap_ms.c
161
ctx = EVP_MD_CTX_new();
usr.sbin/radiusd/chap_ms.c
162
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/radiusd/chap_ms.c
163
EVP_DigestUpdate(ctx, peer_challenge, MSCHAPV2_CHALLENGE_SZ);
usr.sbin/radiusd/chap_ms.c
164
EVP_DigestUpdate(ctx, auth_challenge, MSCHAPV2_CHALLENGE_SZ);
usr.sbin/radiusd/chap_ms.c
165
EVP_DigestUpdate(ctx, name, strlen(name));
usr.sbin/radiusd/chap_ms.c
166
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/radiusd/chap_ms.c
167
EVP_MD_CTX_free(ctx);
usr.sbin/radiusd/chap_ms.c
192
EVP_MD_CTX *ctx;
usr.sbin/radiusd/chap_ms.c
217
ctx = EVP_MD_CTX_new();
usr.sbin/radiusd/chap_ms.c
218
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/radiusd/chap_ms.c
219
EVP_DigestUpdate(ctx, password_hash2, sizeof(password_hash2));
usr.sbin/radiusd/chap_ms.c
220
EVP_DigestUpdate(ctx, ntresponse, 24);
usr.sbin/radiusd/chap_ms.c
221
EVP_DigestUpdate(ctx, magic1, 39);
usr.sbin/radiusd/chap_ms.c
222
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/radiusd/chap_ms.c
227
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/radiusd/chap_ms.c
228
EVP_DigestUpdate(ctx, md, sizeof(md));
usr.sbin/radiusd/chap_ms.c
229
EVP_DigestUpdate(ctx, challenge, sizeof(challenge));
usr.sbin/radiusd/chap_ms.c
230
EVP_DigestUpdate(ctx, magic2, 41);
usr.sbin/radiusd/chap_ms.c
231
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/radiusd/chap_ms.c
232
EVP_MD_CTX_free(ctx);
usr.sbin/radiusd/chap_ms.c
256
EVP_MD_CTX *ctx;
usr.sbin/radiusd/chap_ms.c
263
ctx = EVP_MD_CTX_new();
usr.sbin/radiusd/chap_ms.c
264
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/radiusd/chap_ms.c
265
EVP_DigestUpdate(ctx, password_hash2, MSCHAP_HASH_SZ);
usr.sbin/radiusd/chap_ms.c
266
EVP_DigestUpdate(ctx, ntresponse, 24);
usr.sbin/radiusd/chap_ms.c
267
EVP_DigestUpdate(ctx, magic1, 27);
usr.sbin/radiusd/chap_ms.c
268
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/radiusd/chap_ms.c
269
EVP_MD_CTX_free(ctx);
usr.sbin/radiusd/chap_ms.c
278
EVP_MD_CTX *ctx;
usr.sbin/radiusd/chap_ms.c
310
ctx = EVP_MD_CTX_new();
usr.sbin/radiusd/chap_ms.c
311
EVP_DigestInit_ex(ctx, EVP_sha1(), NULL);
usr.sbin/radiusd/chap_ms.c
312
EVP_DigestUpdate(ctx, masterkey, 16);
usr.sbin/radiusd/chap_ms.c
313
EVP_DigestUpdate(ctx, sha1_pad1, 40);
usr.sbin/radiusd/chap_ms.c
314
EVP_DigestUpdate(ctx, s, 84);
usr.sbin/radiusd/chap_ms.c
315
EVP_DigestUpdate(ctx, sha1_pad2, 40);
usr.sbin/radiusd/chap_ms.c
316
EVP_DigestFinal_ex(ctx, md, &mdlen);
usr.sbin/radiusd/chap_ms.c
317
EVP_MD_CTX_free(ctx);
usr.sbin/radiusd/chap_ms.c
349
EVP_MD_CTX *ctx;
usr.sbin/radiusd/chap_ms.c
353
ctx = EVP_MD_CTX_new();
usr.sbin/radiusd/chap_ms.c
354
EVP_DigestInit_ex(ctx, EVP_md5(), NULL);
usr.sbin/radiusd/chap_ms.c
355
EVP_DigestUpdate(ctx, secret, strlen(secret));
usr.sbin/radiusd/chap_ms.c
356
EVP_DigestUpdate(ctx, authenticator, 16);
usr.sbin/radiusd/chap_ms.c
357
EVP_DigestUpdate(ctx, encrypted, 2);
usr.sbin/radiusd/chap_ms.c
358
EVP_DigestFinal_ex(ctx, b, &mdlen);
usr.sbin/radiusd/chap_ms.c
364
EVP_DigestInit_ex(ctx, EVP_md5(), NULL);
usr.sbin/radiusd/chap_ms.c
365
EVP_DigestUpdate(ctx, secret, strlen(secret));
usr.sbin/radiusd/chap_ms.c
366
EVP_DigestUpdate(ctx, encrypted + 2, mdlen);
usr.sbin/radiusd/chap_ms.c
367
EVP_DigestFinal_ex(ctx, b, &mdlen);
usr.sbin/radiusd/chap_ms.c
368
EVP_MD_CTX_free(ctx);
usr.sbin/radiusd/radiusd.c
1322
radiusd_module_on_imsg_io(int fd, short evmask, void *ctx)
usr.sbin/radiusd/radiusd.c
1324
struct radiusd_module *module = ctx;
usr.sbin/radiusd/radiusd.c
406
radiusd_listen_on_event(int fd, short evmask, void *ctx)
usr.sbin/radiusd/radiusd.c
412
struct radiusd_listen *listn = ctx;
usr.sbin/radiusd/radiusd.c
902
radiusd_on_sigterm(int fd, short evmask, void *ctx)
usr.sbin/radiusd/radiusd.c
909
radiusd_on_sigint(int fd, short evmask, void *ctx)
usr.sbin/radiusd/radiusd.c
916
radiusd_on_sighup(int fd, short evmask, void *ctx)
usr.sbin/radiusd/radiusd.c
922
radiusd_on_sigchld(int fd, short evmask, void *ctx)
usr.sbin/radiusd/radiusd.c
924
struct radiusd *radiusd = ctx;
usr.sbin/radiusd/radiusd_bsdauth.c
284
module_bsdauth_config_set(void *ctx, const char *name, int argc,
usr.sbin/radiusd/radiusd_bsdauth.c
287
struct module_bsdauth *module = ctx;
usr.sbin/radiusd/radiusd_bsdauth.c
330
module_bsdauth_userpass(void *ctx, u_int q_id, const char *user,
usr.sbin/radiusd/radiusd_bsdauth.c
333
struct module_bsdauth *module = ctx;
usr.sbin/radiusd/radiusd_eap2mschap.c
108
eap2mschap_config_set(void *ctx, const char *name, int argc,
usr.sbin/radiusd/radiusd_eap2mschap.c
111
struct eap2mschap *self = ctx;
usr.sbin/radiusd/radiusd_eap2mschap.c
140
eap2mschap_stop(void *ctx)
usr.sbin/radiusd/radiusd_eap2mschap.c
142
struct eap2mschap *self = ctx;
usr.sbin/radiusd/radiusd_eap2mschap.c
158
eap2mschap_access_request(void *ctx, u_int q_id, const u_char *reqpkt,
usr.sbin/radiusd/radiusd_eap2mschap.c
161
struct eap2mschap *self = ctx;
usr.sbin/radiusd/radiusd_eap2mschap.c
188
eap2mschap_next_response(void *ctx, u_int q_id, const u_char *respkt,
usr.sbin/radiusd/radiusd_eap2mschap.c
191
struct eap2mschap *self = ctx;
usr.sbin/radiusd/radiusd_eap2mschap.c
218
eap2mschap_on_eapt(int fd, short ev, void *ctx)
usr.sbin/radiusd/radiusd_eap2mschap.c
220
struct eap2mschap *self = ctx;
usr.sbin/radiusd/radiusd_eap2mschap.c
95
eap2mschap_start(void *ctx)
usr.sbin/radiusd/radiusd_eap2mschap.c
97
struct eap2mschap *self = ctx;
usr.sbin/radiusd/radiusd_file.c
292
module_file_config_set(void *ctx, const char *name, int valc,
usr.sbin/radiusd/radiusd_file.c
295
struct module_file *module = ctx;
usr.sbin/radiusd/radiusd_file.c
324
module_file_start(void *ctx)
usr.sbin/radiusd/radiusd_file.c
326
struct module_file *module = ctx;
usr.sbin/radiusd/radiusd_file.c
342
module_file_access_request(void *ctx, u_int query_id, const u_char *pkt,
usr.sbin/radiusd/radiusd_file.c
346
struct module_file *self = ctx;
usr.sbin/radiusd/radiusd_ipcp.c
1088
ipcp_accounting_request(void *ctx, u_int q_id, const u_char *pkt,
usr.sbin/radiusd/radiusd_ipcp.c
1096
struct module_ipcp *self = ctx;
usr.sbin/radiusd/radiusd_ipcp.c
1614
ipcp_on_timer(int fd, short ev, void *ctx)
usr.sbin/radiusd/radiusd_ipcp.c
1616
struct module_ipcp *self = ctx;
usr.sbin/radiusd/radiusd_ipcp.c
1721
ipcp_dae_request_on_timeout(int fd, short ev, void *ctx)
usr.sbin/radiusd/radiusd_ipcp.c
1723
struct assigned_ipv4 *assign = ctx;
usr.sbin/radiusd/radiusd_ipcp.c
1740
ipcp_dae_on_event(int fd, short ev, void *ctx)
usr.sbin/radiusd/radiusd_ipcp.c
1742
struct module_ipcp_dae *dae = ctx;
usr.sbin/radiusd/radiusd_ipcp.c
1859
ipcp_dae_send_pending_requests(int fd, short ev, void *ctx)
usr.sbin/radiusd/radiusd_ipcp.c
1861
struct module_ipcp_dae *dae = ctx;
usr.sbin/radiusd/radiusd_ipcp.c
286
ipcp_start(void *ctx)
usr.sbin/radiusd/radiusd_ipcp.c
288
struct module_ipcp *self = ctx;
usr.sbin/radiusd/radiusd_ipcp.c
336
ipcp_stop(void *ctx)
usr.sbin/radiusd/radiusd_ipcp.c
338
struct module_ipcp *self = ctx;
usr.sbin/radiusd/radiusd_ipcp.c
388
ipcp_config_set(void *ctx, const char *name, int argc, char * const * argv)
usr.sbin/radiusd/radiusd_ipcp.c
390
struct module_ipcp *module = ctx;
usr.sbin/radiusd/radiusd_ipcp.c
570
ipcp_dispatch_control(void *ctx, struct imsg *imsg)
usr.sbin/radiusd/radiusd_ipcp.c
572
struct module_ipcp *self = ctx;
usr.sbin/radiusd/radiusd_ipcp.c
735
ipcp_resdeco(void *ctx, u_int q_id, const u_char *req, size_t reqlen,
usr.sbin/radiusd/radiusd_ipcp.c
738
struct module_ipcp *self = ctx;
usr.sbin/radiusd/radiusd_module.c
102
base->ctx = ctx;
usr.sbin/radiusd/radiusd_module.c
420
module_config_set(base->ctx, arg->paramname,
usr.sbin/radiusd/radiusd_module.c
431
module_start_module(base->ctx);
usr.sbin/radiusd/radiusd_module.c
465
module_userpass(base->ctx, userpass->q_id, userpass->user,
usr.sbin/radiusd/radiusd_module.c
562
module_access_request(base->ctx, accessreq->q_id,
usr.sbin/radiusd/radiusd_module.c
565
module_next_response(base->ctx, accessreq->q_id,
usr.sbin/radiusd/radiusd_module.c
568
module_request_decoration(base->ctx, accessreq->q_id,
usr.sbin/radiusd/radiusd_module.c
587
module_response_decoration(base->ctx, accessreq->q_id,
usr.sbin/radiusd/radiusd_module.c
592
module_accounting_request(base->ctx, accessreq->q_id,
usr.sbin/radiusd/radiusd_module.c
60
void *ctx;
usr.sbin/radiusd/radiusd_module.c
610
module_dispatch_control(base->ctx, imsg);
usr.sbin/radiusd/radiusd_module.c
621
module_stop_module(base->ctx);
usr.sbin/radiusd/radiusd_module.c
631
module_on_event(int fd, short evmask, void *ctx)
usr.sbin/radiusd/radiusd_module.c
633
struct module_base *base = ctx;
usr.sbin/radiusd/radiusd_module.c
91
module_create(int sock, void *ctx, struct module_handlers *handler)
usr.sbin/radiusd/radiusd_module.h
27
void (*config_set)(void *ctx, const char *paramname, int paramvalc,
usr.sbin/radiusd/radiusd_module.h
30
void (*start)(void *ctx);
usr.sbin/radiusd/radiusd_module.h
32
void (*stop)(void *ctx);
usr.sbin/radiusd/radiusd_module.h
34
void (*userpass)(void *ctx, u_int query_id, const char *user,
usr.sbin/radiusd/radiusd_module.h
37
void (*access_request)(void *ctx, u_int query_id, const u_char *pkt,
usr.sbin/radiusd/radiusd_module.h
41
void (*next_response)(void *ctx, u_int query_id, const u_char *pkt,
usr.sbin/radiusd/radiusd_module.h
44
void (*request_decoration)(void *ctx, u_int query_id, const u_char *pkt,
usr.sbin/radiusd/radiusd_module.h
47
void (*response_decoration)(void *ctx, u_int query_id,
usr.sbin/radiusd/radiusd_module.h
50
void (*accounting_request)(void *ctx, u_int query_id, const u_char *pkt,
usr.sbin/radiusd/radiusd_module.h
53
void (*dispatch_control)(void *ctx, struct imsg *);
usr.sbin/radiusd/radiusd_radius.c
156
module_radius_config_set(void *ctx, const char *paramname, int paramvalc,
usr.sbin/radiusd/radiusd_radius.c
161
struct module_radius *module = ctx;
usr.sbin/radiusd/radiusd_radius.c
240
module_radius_start(void *ctx)
usr.sbin/radiusd/radiusd_radius.c
243
struct module_radius *module = ctx;
usr.sbin/radiusd/radiusd_radius.c
272
module_radius_stop(void *ctx)
usr.sbin/radiusd/radiusd_radius.c
276
struct module_radius *module = ctx;
usr.sbin/radiusd/radiusd_radius.c
286
module_radius_access_request(void *ctx, u_int q_id, const u_char *pkt,
usr.sbin/radiusd/radiusd_radius.c
289
struct module_radius *module = ctx;
usr.sbin/radiusd/radiusd_radius.c
401
radius_server_on_event(int fd, short evmask, void *ctx)
usr.sbin/radiusd/radiusd_radius.c
406
struct radius_server *server = ctx;
usr.sbin/radiusd/radiusd_radius.c
552
module_radius_req_on_timeout(int fd, short evmask, void *ctx)
usr.sbin/radiusd/radiusd_radius.c
554
struct module_radius_req *req = ctx;
usr.sbin/radiusd/radiusd_standard.c
128
module_standard_config_set(void *ctx, const char *name, int argc,
usr.sbin/radiusd/radiusd_standard.c
131
struct module_standard *module = ctx;
usr.sbin/radiusd/radiusd_standard.c
217
module_standard_reqdeco(void *ctx, u_int q_id, const u_char *pkt, size_t pktlen)
usr.sbin/radiusd/radiusd_standard.c
219
struct module_standard *module = ctx;
usr.sbin/radiusd/radiusd_standard.c
291
module_standard_resdeco(void *ctx, u_int q_id, const u_char *req, size_t reqlen,
usr.sbin/radiusd/radiusd_standard.c
294
struct module_standard *module = ctx;
usr.sbin/radiusd/radiusd_standard.c
329
module_accounting_request(void *ctx, u_int query_id, const u_char *pkt,
usr.sbin/radiusd/radiusd_standard.c
333
struct module_standard *module = ctx;
usr.sbin/relayd/relay.c
1268
relay_hash_addr(SIPHASH_CTX *ctx, struct sockaddr_storage *ss, int portset)
usr.sbin/relayd/relay.c
1276
SipHash24_Update(ctx, &sin4->sin_addr,
usr.sbin/relayd/relay.c
1280
SipHash24_Update(ctx, &sin6->sin6_addr,
usr.sbin/relayd/relay.c
1286
SipHash24_Update(ctx, &port, sizeof(port));
usr.sbin/rpki-client/encoding.c
154
EVP_ENCODE_CTX *ctx;
usr.sbin/rpki-client/encoding.c
159
if ((ctx = EVP_ENCODE_CTX_new()) == NULL)
usr.sbin/rpki-client/encoding.c
171
EVP_DecodeInit(ctx);
usr.sbin/rpki-client/encoding.c
172
if (EVP_DecodeUpdate(ctx, to, &evplen, in, inlen) == -1)
usr.sbin/rpki-client/encoding.c
175
if (EVP_DecodeFinal(ctx, to + evplen, &evplen) == -1)
usr.sbin/rpki-client/encoding.c
180
EVP_ENCODE_CTX_free(ctx);
usr.sbin/rpki-client/encoding.c
185
EVP_ENCODE_CTX_free(ctx);
usr.sbin/rpki-client/filemode.c
222
if (!valid_x509(uri, ctx, cert->x509, a, crl, &errstr) ||
usr.sbin/rpki-client/filemode.c
45
static X509_STORE_CTX *ctx;
usr.sbin/rpki-client/filemode.c
594
if ((status = valid_x509(file, ctx, cert->x509, a, c, &errstr))) {
usr.sbin/rpki-client/filemode.c
802
if ((ctx = X509_STORE_CTX_new()) == NULL)
usr.sbin/rpki-client/filemode.c
868
X509_STORE_CTX_free(ctx);
usr.sbin/rpki-client/parser.c
1030
X509_STORE_CTX *ctx;
usr.sbin/rpki-client/parser.c
1034
if ((ctx = X509_STORE_CTX_new()) == NULL)
usr.sbin/rpki-client/parser.c
1066
parse_entity(&q, myq, ctx, bn_ctx);
usr.sbin/rpki-client/parser.c
1084
X509_STORE_CTX_free(ctx);
usr.sbin/rpki-client/parser.c
186
const struct entity *entp, X509_STORE_CTX *ctx)
usr.sbin/rpki-client/parser.c
202
if (!valid_x509(file, ctx, cert->x509, a, crl, &errstr)) {
usr.sbin/rpki-client/parser.c
227
const struct entity *entp, X509_STORE_CTX *ctx)
usr.sbin/rpki-client/parser.c
243
if (!valid_x509(file, ctx, cert->x509, a, crl, &errstr)) {
usr.sbin/rpki-client/parser.c
369
X509_STORE_CTX *ctx, BN_CTX *bn_ctx)
usr.sbin/rpki-client/parser.c
412
if (!valid_x509(file, ctx, cert->x509, a, *crl, errstr))
usr.sbin/rpki-client/parser.c
500
time_t *crlmtime, X509_STORE_CTX *ctx, BN_CTX *bn_ctx)
usr.sbin/rpki-client/parser.c
513
&err2, ctx, bn_ctx);
usr.sbin/rpki-client/parser.c
519
&err1, ctx, bn_ctx);
usr.sbin/rpki-client/parser.c
579
const struct entity *entp, X509_STORE_CTX *ctx)
usr.sbin/rpki-client/parser.c
597
if (!valid_x509(file, ctx, cert->x509, a, crl, &errstr) ||
usr.sbin/rpki-client/parser.c
742
const struct entity *entp, X509_STORE_CTX *ctx)
usr.sbin/rpki-client/parser.c
758
if (!valid_x509(file, ctx, cert->x509, a, crl, &errstr)) {
usr.sbin/rpki-client/parser.c
782
const struct entity *entp, X509_STORE_CTX *ctx)
usr.sbin/rpki-client/parser.c
798
if (!valid_x509(file, ctx, cert->x509, a, crl, &errstr)) {
usr.sbin/rpki-client/parser.c
845
parse_entity(struct entityq *q, struct ibufqueue *msgq, X509_STORE_CTX *ctx,
usr.sbin/rpki-client/parser.c
901
ctx);
usr.sbin/rpki-client/parser.c
921
ctx, bn_ctx);
usr.sbin/rpki-client/parser.c
955
roa = proc_parser_roa(file, f, flen, entp, ctx);
usr.sbin/rpki-client/parser.c
968
aspa = proc_parser_aspa(file, f, flen, entp, ctx);
usr.sbin/rpki-client/parser.c
981
tak = proc_parser_tak(file, f, flen, entp, ctx);
usr.sbin/rpki-client/parser.c
991
spl = proc_parser_spl(file, f, flen, entp, ctx);
usr.sbin/rpki-client/rrdp.c
511
SHA256_Final(h, &s->ctx);
usr.sbin/rpki-client/rrdp.c
525
SHA256_Update(&s->ctx, buf, len);
usr.sbin/rpki-client/rrdp.c
572
SHA256_Init(&s->ctx);
usr.sbin/rpki-client/rrdp.c
66
SHA256_CTX ctx;
usr.sbin/rpki-client/validate.c
175
SHA256_CTX ctx;
usr.sbin/rpki-client/validate.c
186
SHA256_Init(&ctx);
usr.sbin/rpki-client/validate.c
188
SHA256_Update(&ctx, buffer, nr);
usr.sbin/rpki-client/validate.c
190
SHA256_Final(filehash, &ctx);
usr.sbin/sasyncd/net.c
327
SHA_CTX ctx;
usr.sbin/sasyncd/net.c
341
SHA1_Init(&ctx);
usr.sbin/sasyncd/net.c
342
SHA1_Update(&ctx, buf, len);
usr.sbin/sasyncd/net.c
343
SHA1_Final(hash, &ctx);
usr.sbin/sasyncd/net.c
670
SHA_CTX ctx;
usr.sbin/sasyncd/net.c
740
SHA1_Init(&ctx);
usr.sbin/sasyncd/net.c
741
SHA1_Update(&ctx, msg, *msglen);
usr.sbin/sasyncd/net.c
742
SHA1_Final(hash, &ctx);
usr.sbin/smtpd/crypto.c
105
if (!EVP_EncryptFinal_ex(ctx, obuf, &len))
usr.sbin/smtpd/crypto.c
111
EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, sizeof tag, tag);
usr.sbin/smtpd/crypto.c
119
EVP_CIPHER_CTX_free(ctx);
usr.sbin/smtpd/crypto.c
126
EVP_CIPHER_CTX *ctx;
usr.sbin/smtpd/crypto.c
170
ctx = EVP_CIPHER_CTX_new();
usr.sbin/smtpd/crypto.c
171
if (ctx == NULL)
usr.sbin/smtpd/crypto.c
174
EVP_DecryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, cp.key, iv);
usr.sbin/smtpd/crypto.c
177
EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, sizeof tag, tag);
usr.sbin/smtpd/crypto.c
187
if (!EVP_DecryptUpdate(ctx, obuf, &len, ibuf, r))
usr.sbin/smtpd/crypto.c
197
if (!EVP_DecryptFinal_ex(ctx, obuf, &len))
usr.sbin/smtpd/crypto.c
206
EVP_CIPHER_CTX_free(ctx);
usr.sbin/smtpd/crypto.c
213
EVP_CIPHER_CTX *ctx;
usr.sbin/smtpd/crypto.c
241
ctx = EVP_CIPHER_CTX_new();
usr.sbin/smtpd/crypto.c
242
if (ctx == NULL)
usr.sbin/smtpd/crypto.c
245
EVP_EncryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, cp.key, iv);
usr.sbin/smtpd/crypto.c
248
if (!EVP_EncryptUpdate(ctx, out + len, &olen, in, inlen))
usr.sbin/smtpd/crypto.c
253
if (!EVP_EncryptFinal_ex(ctx, out + len, &olen))
usr.sbin/smtpd/crypto.c
258
EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, sizeof tag, tag);
usr.sbin/smtpd/crypto.c
263
EVP_CIPHER_CTX_free(ctx);
usr.sbin/smtpd/crypto.c
270
EVP_CIPHER_CTX *ctx;
usr.sbin/smtpd/crypto.c
297
ctx = EVP_CIPHER_CTX_new();
usr.sbin/smtpd/crypto.c
298
if (ctx == NULL)
usr.sbin/smtpd/crypto.c
301
EVP_DecryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, cp.key, iv);
usr.sbin/smtpd/crypto.c
304
EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, sizeof tag, tag);
usr.sbin/smtpd/crypto.c
307
if (!EVP_DecryptUpdate(ctx, out, &olen, in, inlen))
usr.sbin/smtpd/crypto.c
312
if (!EVP_DecryptFinal_ex(ctx, out + len, &olen))
usr.sbin/smtpd/crypto.c
317
EVP_CIPHER_CTX_free(ctx);
usr.sbin/smtpd/crypto.c
61
EVP_CIPHER_CTX *ctx;
usr.sbin/smtpd/crypto.c
88
ctx = EVP_CIPHER_CTX_new();
usr.sbin/smtpd/crypto.c
89
if (ctx == NULL)
usr.sbin/smtpd/crypto.c
92
EVP_EncryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, cp.key, iv);
usr.sbin/smtpd/crypto.c
96
if (!EVP_EncryptUpdate(ctx, obuf, &len, ibuf, r))
usr.sbin/smtpd/smtp_client.c
187
smtp_set_tls(struct smtp_client *proto, void *ctx)
usr.sbin/smtpd/smtp_client.c
189
io_connect_tls(proto->io, ctx, proto->params.tls_servname);
usr.sbin/snmpd/application.c
175
#define APPL_CONTEXT_NAME(ctx) (ctx->ac_name[0] == '\0' ? NULL : ctx->ac_name)
usr.sbin/snmpd/application.c
196
struct appl_context *ctx, *tctx;
usr.sbin/snmpd/application.c
202
TAILQ_FOREACH_SAFE(ctx, &contexts, ac_entries, tctx) {
usr.sbin/snmpd/application.c
203
assert(RB_EMPTY(&(ctx->ac_regions)));
usr.sbin/snmpd/application.c
204
assert(TAILQ_EMPTY(&(ctx->ac_agentcaps)));
usr.sbin/snmpd/application.c
205
TAILQ_REMOVE(&contexts, ctx, ac_entries);
usr.sbin/snmpd/application.c
206
free(ctx);
usr.sbin/snmpd/application.c
213
struct appl_context *ctx;
usr.sbin/snmpd/application.c
223
TAILQ_FOREACH(ctx, &contexts, ac_entries) {
usr.sbin/snmpd/application.c
224
if (strcmp(name, ctx->ac_name) == 0)
usr.sbin/snmpd/application.c
225
return ctx;
usr.sbin/snmpd/application.c
234
if ((ctx = malloc(sizeof(*ctx))) == NULL)
usr.sbin/snmpd/application.c
237
strlcpy(ctx->ac_name, name, sizeof(ctx->ac_name));
usr.sbin/snmpd/application.c
238
RB_INIT(&(ctx->ac_regions));
usr.sbin/snmpd/application.c
239
TAILQ_INIT(&(ctx->ac_agentcaps));
usr.sbin/snmpd/application.c
240
ctx->ac_agentcap_lastid = 0;
usr.sbin/snmpd/application.c
241
ctx->ac_agentcap_lastchange = 0;
usr.sbin/snmpd/application.c
243
TAILQ_INSERT_TAIL(&contexts, ctx, ac_entries);
usr.sbin/snmpd/application.c
245
if (clock_gettime(CLOCK_MONOTONIC, &ctx->ac_starttime) == -1)
usr.sbin/snmpd/application.c
247
return ctx;
usr.sbin/snmpd/application.c
255
struct appl_context *ctx;
usr.sbin/snmpd/application.c
266
if ((ctx = appl_context(ctxname, 0)) == NULL) {
usr.sbin/snmpd/application.c
280
cap->aa_context = ctx;
usr.sbin/snmpd/application.c
281
cap->aa_index = ++ctx->ac_agentcap_lastid;
usr.sbin/snmpd/application.c
292
TAILQ_INSERT_TAIL(&(ctx->ac_agentcaps), cap, aa_entry);
usr.sbin/snmpd/application.c
293
ctx->ac_agentcap_lastchange = cap->aa_uptime;
usr.sbin/snmpd/application.c
303
struct appl_context *ctx;
usr.sbin/snmpd/application.c
315
if ((ctx = appl_context(ctxname, 0)) == NULL) {
usr.sbin/snmpd/application.c
322
TAILQ_FOREACH_SAFE(cap, &(ctx->ac_agentcaps), aa_entry, tmp) {
usr.sbin/snmpd/application.c
351
struct appl_context *ctx;
usr.sbin/snmpd/application.c
354
if ((ctx = appl_context(ctxname, 0)) == NULL)
usr.sbin/snmpd/application.c
360
timespecsub(&now, &ctx->ac_starttime, &uptime);
usr.sbin/snmpd/application.c
367
struct appl_context *ctx;
usr.sbin/snmpd/application.c
370
ctx = appl_context(NULL, 0);
usr.sbin/snmpd/application.c
371
value = ober_add_integer(NULL, ctx->ac_agentcap_lastchange);
usr.sbin/snmpd/application.c
384
struct appl_context *ctx;
usr.sbin/snmpd/application.c
391
ctx = appl_context(NULL, 0);
usr.sbin/snmpd/application.c
392
TAILQ_FOREACH(cap, &(ctx->ac_agentcaps), aa_entry) {
usr.sbin/snmpd/application.c
421
struct appl_context *ctx;
usr.sbin/snmpd/application.c
431
ctx = appl_context(NULL, 0);
usr.sbin/snmpd/application.c
432
TAILQ_FOREACH(cap, &(ctx->ac_agentcaps), aa_entry) {
usr.sbin/snmpd/application.c
479
appl_region(struct appl_context *ctx, uint32_t timeout, uint8_t priority,
usr.sbin/snmpd/application.c
507
region = appl_region_find(ctx, oid);
usr.sbin/snmpd/application.c
525
region = RB_INSERT(appl_regions, &(ctx->ac_regions), nregion);
usr.sbin/snmpd/application.c
532
RB_REMOVE(appl_regions, &(ctx->ac_regions), region);
usr.sbin/snmpd/application.c
533
RB_INSERT(appl_regions, &(ctx->ac_regions), nregion);
usr.sbin/snmpd/application.c
572
struct appl_context *ctx;
usr.sbin/snmpd/application.c
610
if ((ctx = appl_context(ctxname, 0)) == NULL) {
usr.sbin/snmpd/application.c
630
return appl_region(ctx, timeout, priority, oid, range_subid,
usr.sbin/snmpd/application.c
647
if ((error = appl_region(ctx, timeout, priority, oid,
usr.sbin/snmpd/application.c
652
if ((error = appl_region(ctx, timeout, priority, oid, range_subid,
usr.sbin/snmpd/application.c
665
region = RB_FIND(appl_regions, &(ctx->ac_regions), &search);
usr.sbin/snmpd/application.c
668
appl_region_free(ctx, region);
usr.sbin/snmpd/application.c
670
region = RB_FIND(appl_regions, &(ctx->ac_regions), &search);
usr.sbin/snmpd/application.c
673
appl_region_free(ctx, region);
usr.sbin/snmpd/application.c
682
struct appl_context *ctx;
usr.sbin/snmpd/application.c
710
if ((ctx = appl_context(ctxname, 0)) == NULL) {
usr.sbin/snmpd/application.c
728
return appl_region_unregister_match(ctx, priority, oid, oidbuf,
usr.sbin/snmpd/application.c
745
if ((error = appl_region_unregister_match(ctx, priority, oid,
usr.sbin/snmpd/application.c
752
(void)appl_region_unregister_match(ctx, priority, oid, oidbuf,
usr.sbin/snmpd/application.c
760
appl_region_unregister_match(struct appl_context *ctx, uint8_t priority,
usr.sbin/snmpd/application.c
766
region = RB_FIND(appl_regions, &(ctx->ac_regions), &search);
usr.sbin/snmpd/application.c
780
appl_region_free(ctx, region);
usr.sbin/snmpd/application.c
785
appl_region_free(struct appl_context *ctx, struct appl_region *region)
usr.sbin/snmpd/application.c
789
pregion = RB_FIND(appl_regions, &(ctx->ac_regions), region);
usr.sbin/snmpd/application.c
792
RB_REMOVE(appl_regions, &(ctx->ac_regions), region);
usr.sbin/snmpd/application.c
794
RB_INSERT(appl_regions, &(ctx->ac_regions),
usr.sbin/snmpd/application.c
809
struct appl_context *ctx;
usr.sbin/snmpd/application.c
814
TAILQ_FOREACH(ctx, &contexts, ac_entries) {
usr.sbin/snmpd/application.c
815
TAILQ_FOREACH_SAFE(cap, &(ctx->ac_agentcaps), aa_entry, tcap) {
usr.sbin/snmpd/application.c
820
&(ctx->ac_regions), tregion) {
usr.sbin/snmpd/application.c
824
appl_region_free(ctx, region);
usr.sbin/snmpd/application.c
836
appl_region_find(struct appl_context *ctx,
usr.sbin/snmpd/application.c
843
region = RB_FIND(appl_regions, &(ctx->ac_regions), &search);
usr.sbin/snmpd/application.c
852
appl_region_next(struct appl_context *ctx, struct ber_oid *oid,
usr.sbin/snmpd/application.c
859
nregion = RB_NFIND(appl_regions, &(ctx->ac_regions), &search);
usr.sbin/snmpd/application.c
862
nregion = RB_NEXT(appl_regions, &(ctx->ac_regions), nregion);
usr.sbin/snmpd/application.c
867
return appl_region_find(ctx, &(search.ar_oid));
usr.sbin/snmpd/application.c
885
pregion = appl_region_find(ctx, &(search.ar_oid));
usr.sbin/snmpd/application.c
895
struct appl_context *ctx;
usr.sbin/snmpd/application.c
908
if ((ctx = appl_context(ctxname, 0)) == NULL) {
usr.sbin/snmpd/application.c
918
ureq->aru_ctx = ctx;
usr.sbin/snmpd/application_agentx.c
717
int32_t requestid, const char *ctx, struct appl_varbind *vblist)
usr.sbin/snmpd/application_agentx.c
745
if ((context = appl_agentx_string2ostring(ctx, &string)) == NULL) {
usr.sbin/snmpd/application_agentx.c
768
int32_t requestid, const char *ctx, struct appl_varbind *vblist)
usr.sbin/snmpd/application_agentx.c
798
if ((context = appl_agentx_string2ostring(ctx, &string)) == NULL) {
usr.sbin/snmpd/application_blocklist.c
122
__unused int32_t transactionid, int32_t requestid, __unused const char *ctx,
usr.sbin/snmpd/application_blocklist.c
94
int32_t requestid, __unused const char *ctx, struct appl_varbind *vblist)
usr.sbin/snmpd/application_internal.c
316
int32_t requestid, __unused const char *ctx, struct appl_varbind *vblist)
usr.sbin/snmpd/application_internal.c
373
__unused int32_t transactionid, int32_t requestid, __unused const char *ctx,
usr.sbin/snmpd/usm.c
627
EVP_CIPHER_CTX *ctx;
usr.sbin/snmpd/usm.c
660
if ((ctx = EVP_CIPHER_CTX_new()) == NULL)
usr.sbin/snmpd/usm.c
663
if (!EVP_CipherInit(ctx, cipher, privkey, iv, do_encrypt)) {
usr.sbin/snmpd/usm.c
664
EVP_CIPHER_CTX_free(ctx);
usr.sbin/snmpd/usm.c
669
EVP_CIPHER_CTX_set_padding(ctx, 0);
usr.sbin/snmpd/usm.c
671
if (EVP_CipherUpdate(ctx, outbuf, &len, inbuf, inlen) &&
usr.sbin/snmpd/usm.c
672
EVP_CipherFinal_ex(ctx, outbuf + len, &len2))
usr.sbin/snmpd/usm.c
677
EVP_CIPHER_CTX_free(ctx);
usr.sbin/snmpd/usm.c
687
EVP_MD_CTX *ctx;
usr.sbin/snmpd/usm.c
695
if ((ctx = EVP_MD_CTX_new()) == NULL)
usr.sbin/snmpd/usm.c
697
if (!EVP_DigestInit_ex(ctx, md, NULL)) {
usr.sbin/snmpd/usm.c
698
EVP_MD_CTX_free(ctx);
usr.sbin/snmpd/usm.c
709
if (!EVP_DigestUpdate(ctx, pwbuf, 64)) {
usr.sbin/snmpd/usm.c
710
EVP_MD_CTX_free(ctx);
usr.sbin/snmpd/usm.c
714
if (!EVP_DigestFinal_ex(ctx, keybuf, &dlen)) {
usr.sbin/snmpd/usm.c
715
EVP_MD_CTX_free(ctx);
usr.sbin/snmpd/usm.c
728
if (!EVP_DigestInit_ex(ctx, md, NULL) ||
usr.sbin/snmpd/usm.c
729
!EVP_DigestUpdate(ctx, pwbuf,
usr.sbin/snmpd/usm.c
731
!EVP_DigestFinal_ex(ctx, keybuf, &dlen)) {
usr.sbin/snmpd/usm.c
732
EVP_MD_CTX_free(ctx);
usr.sbin/snmpd/usm.c
735
EVP_MD_CTX_free(ctx);
usr.sbin/syslogd/evbuffer_tls.c
114
tls_close(ctx);
usr.sbin/syslogd/evbuffer_tls.c
154
struct tls *ctx = buftls->bt_ctx;
usr.sbin/syslogd/evbuffer_tls.c
164
res = evtls_write(bufev->output, fd, ctx);
usr.sbin/syslogd/evbuffer_tls.c
212
struct tls *ctx = buftls->bt_ctx;
usr.sbin/syslogd/evbuffer_tls.c
221
res = tls_handshake(ctx);
usr.sbin/syslogd/evbuffer_tls.c
254
struct tls *ctx, int fd)
usr.sbin/syslogd/evbuffer_tls.c
260
buftls->bt_ctx = ctx;
usr.sbin/syslogd/evbuffer_tls.c
296
evtls_read(struct evbuffer *buf, int fd, int howmuch, struct tls *ctx)
usr.sbin/syslogd/evbuffer_tls.c
312
n = tls_read(ctx, p, howmuch);
usr.sbin/syslogd/evbuffer_tls.c
326
evtls_write(struct evbuffer *buffer, int fd, struct tls *ctx)
usr.sbin/syslogd/evbuffer_tls.c
330
n = tls_write(ctx, buffer->buffer, buffer->off);
usr.sbin/syslogd/evbuffer_tls.c
72
struct tls *ctx = buftls->bt_ctx;
usr.sbin/syslogd/evbuffer_tls.c
99
res = evtls_read(bufev->input, fd, howmuch, ctx);
usr.sbin/tcpdump/print-ipsec.c
108
if ((ctx = EVP_CIPHER_CTX_new()) == NULL) {
usr.sbin/tcpdump/print-ipsec.c
112
if (!EVP_CipherInit(ctx, evp, key, NULL, 0)) {
usr.sbin/tcpdump/print-ipsec.c
113
EVP_CIPHER_CTX_free(ctx);
usr.sbin/tcpdump/print-ipsec.c
131
blocksz = EVP_CIPHER_CTX_block_size(ctx);
usr.sbin/tcpdump/print-ipsec.c
156
if (!EVP_CipherInit(ctx, NULL, NULL, data, 0))
usr.sbin/tcpdump/print-ipsec.c
163
if (!EVP_Cipher(ctx, data, data, len))
usr.sbin/tcpdump/print-ipsec.c
62
static EVP_CIPHER_CTX *ctx;
usr.sbin/tcpdump/print-nsh.c
227
const struct nsh_context_header *ctx;
usr.sbin/tcpdump/print-nsh.c
230
if (len != sizeof(*ctx))
usr.sbin/tcpdump/print-nsh.c
231
printf("nsh-mdtype1-length-%u (not %zu)", len, sizeof(*ctx));
usr.sbin/tcpdump/print-nsh.c
235
ctx = (const struct nsh_context_header *)p;
usr.sbin/tcpdump/print-nsh.c
236
for (i = 0; i < nitems(ctx->ch); i++) {
usr.sbin/tcpdump/print-nsh.c
238
nsh_print_bytes(&ctx->ch[i], sizeof(ctx->ch[i]));
usr.sbin/unbound/cachedb/redis.c
145
redisContext* ctx;
usr.sbin/unbound/cachedb/redis.c
170
ctx = redisConnectUnixWithTimeout(path, connect_timeout);
usr.sbin/unbound/cachedb/redis.c
172
ctx = redisConnectWithTimeout(host, port, connect_timeout);
usr.sbin/unbound/cachedb/redis.c
174
if(!ctx || ctx->err) {
usr.sbin/unbound/cachedb/redis.c
176
if(ctx)
usr.sbin/unbound/cachedb/redis.c
177
errstr = ctx->errstr;
usr.sbin/unbound/cachedb/redis.c
181
if(redisSetTimeout(ctx, command_timeout) != REDIS_OK) {
usr.sbin/unbound/cachedb/redis.c
182
log_err("failed to set redis %stimeout, %s", infostr, ctx->errstr);
usr.sbin/unbound/cachedb/redis.c
187
rep = redisCommand(ctx, "AUTH %s", password);
usr.sbin/unbound/cachedb/redis.c
197
rep = redisCommand(ctx, "SELECT %d", logical_db);
usr.sbin/unbound/cachedb/redis.c
216
return ctx;
usr.sbin/unbound/cachedb/redis.c
219
if(ctx)
usr.sbin/unbound/cachedb/redis.c
220
redisFree(ctx);
usr.sbin/unbound/cachedb/redis.c
320
redisContext* ctx = redis_connect(
usr.sbin/unbound/cachedb/redis.c
334
if(!ctx) {
usr.sbin/unbound/cachedb/redis.c
340
moddata->ctxs[i] = ctx;
usr.sbin/unbound/cachedb/redis.c
344
redisContext* ctx = redis_connect(
usr.sbin/unbound/cachedb/redis.c
358
if(!ctx) {
usr.sbin/unbound/cachedb/redis.c
364
moddata->replica_ctxs[i] = ctx;
usr.sbin/unbound/cachedb/redis.c
429
redisContext* ctx, **ctx_selector;
usr.sbin/unbound/cachedb/redis.c
444
ctx = ctx_selector[env->alloc->thread_num];
usr.sbin/unbound/cachedb/redis.c
449
if(!ctx) {
usr.sbin/unbound/cachedb/redis.c
451
ctx = redis_connect(
usr.sbin/unbound/cachedb/redis.c
466
ctx = redis_connect(
usr.sbin/unbound/cachedb/redis.c
481
ctx_selector[env->alloc->thread_num] = ctx;
usr.sbin/unbound/cachedb/redis.c
483
if(!ctx) return NULL;
usr.sbin/unbound/cachedb/redis.c
486
rep = (redisReply*)redisCommand(ctx, command, data, data_len);
usr.sbin/unbound/cachedb/redis.c
491
"closing connection: %s", ctx->errstr);
usr.sbin/unbound/cachedb/redis.c
492
redisFree(ctx);
usr.sbin/unbound/daemon/remote.c
151
rc->ctx = SSL_CTX_new(SSLv23_server_method());
usr.sbin/unbound/daemon/remote.c
152
if(!rc->ctx) {
usr.sbin/unbound/daemon/remote.c
156
if(!listen_sslctx_setup(rc->ctx)) {
usr.sbin/unbound/daemon/remote.c
167
if (!SSL_CTX_use_certificate_chain_file(rc->ctx,s_cert)) {
usr.sbin/unbound/daemon/remote.c
172
if(!SSL_CTX_use_PrivateKey_file(rc->ctx,s_key,SSL_FILETYPE_PEM)) {
usr.sbin/unbound/daemon/remote.c
177
if(!SSL_CTX_check_private_key(rc->ctx)) {
usr.sbin/unbound/daemon/remote.c
182
listen_sslctx_setup_2(rc->ctx);
usr.sbin/unbound/daemon/remote.c
183
if(!SSL_CTX_load_verify_locations(rc->ctx, s_cert, NULL)) {
usr.sbin/unbound/daemon/remote.c
190
SSL_CTX_set_client_CA_list(rc->ctx, SSL_load_client_CA_file(s_cert));
usr.sbin/unbound/daemon/remote.c
191
SSL_CTX_set_verify(rc->ctx, SSL_VERIFY_PEER, NULL);
usr.sbin/unbound/daemon/remote.c
209
rc->ctx = NULL;
usr.sbin/unbound/daemon/remote.c
220
rc->ctx = NULL;
usr.sbin/unbound/daemon/remote.c
257
if(rc->ctx) {
usr.sbin/unbound/daemon/remote.c
258
SSL_CTX_free(rc->ctx);
usr.sbin/unbound/daemon/remote.c
495
n->ssl = SSL_new(rc->ctx);
usr.sbin/unbound/daemon/remote.h
106
SSL_CTX* ctx;
usr.sbin/unbound/daemon/unbound.c
469
setup_listen_sslctx(void** ctx, int is_dot, int is_doh, struct config_file* cfg)
usr.sbin/unbound/daemon/unbound.c
471
if(!(*ctx = listen_sslctx_create(
usr.sbin/unbound/libunbound/context.c
100
if(!slabhash_is_size(ctx->env->msg_cache, cfg->msg_cache_size,
usr.sbin/unbound/libunbound/context.c
102
slabhash_delete(ctx->env->msg_cache);
usr.sbin/unbound/libunbound/context.c
103
ctx->env->msg_cache = slabhash_create(cfg->msg_cache_slabs,
usr.sbin/unbound/libunbound/context.c
107
if(!ctx->env->msg_cache)
usr.sbin/unbound/libunbound/context.c
110
ctx->env->rrset_cache = rrset_cache_adjust(ctx->env->rrset_cache,
usr.sbin/unbound/libunbound/context.c
111
ctx->env->cfg, ctx->env->alloc);
usr.sbin/unbound/libunbound/context.c
112
if(!ctx->env->rrset_cache)
usr.sbin/unbound/libunbound/context.c
114
ctx->env->infra_cache = infra_adjust(ctx->env->infra_cache, cfg);
usr.sbin/unbound/libunbound/context.c
115
if(!ctx->env->infra_cache)
usr.sbin/unbound/libunbound/context.c
117
ctx->finalized = 1;
usr.sbin/unbound/libunbound/context.c
143
find_id(struct ub_ctx* ctx, int* id)
usr.sbin/unbound/libunbound/context.c
146
ctx->next_querynum++;
usr.sbin/unbound/libunbound/context.c
147
while(rbtree_search(&ctx->queries, &ctx->next_querynum)) {
usr.sbin/unbound/libunbound/context.c
148
ctx->next_querynum++; /* numerical wraparound is fine */
usr.sbin/unbound/libunbound/context.c
152
*id = ctx->next_querynum;
usr.sbin/unbound/libunbound/context.c
157
context_new(struct ub_ctx* ctx, const char* name, int rrtype, int rrclass,
usr.sbin/unbound/libunbound/context.c
162
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/context.c
163
if(!find_id(ctx, &q->querynum)) {
usr.sbin/unbound/libunbound/context.c
164
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/context.c
168
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/context.c
189
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/context.c
191
ctx->num_async ++;
usr.sbin/unbound/libunbound/context.c
192
(void)rbtree_insert(&ctx->queries, &q->node);
usr.sbin/unbound/libunbound/context.c
193
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/context.c
198
context_obtain_alloc(struct ub_ctx* ctx, int locking)
usr.sbin/unbound/libunbound/context.c
203
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/context.c
205
a = ctx->alloc_list;
usr.sbin/unbound/libunbound/context.c
207
ctx->alloc_list = a->super; /* snip off list */
usr.sbin/unbound/libunbound/context.c
208
else tnum = ctx->thr_next_num++;
usr.sbin/unbound/libunbound/context.c
210
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/context.c
213
a->super = &ctx->superalloc;
usr.sbin/unbound/libunbound/context.c
219
alloc_init(a, &ctx->superalloc, tnum);
usr.sbin/unbound/libunbound/context.c
224
context_release_alloc(struct ub_ctx* ctx, struct alloc_cache* alloc,
usr.sbin/unbound/libunbound/context.c
227
if(!ctx || !alloc)
usr.sbin/unbound/libunbound/context.c
230
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/context.c
232
alloc->super = ctx->alloc_list;
usr.sbin/unbound/libunbound/context.c
233
ctx->alloc_list = alloc;
usr.sbin/unbound/libunbound/context.c
235
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/context.c
263
context_deserialize_new_query(struct ub_ctx* ctx, uint8_t* p, uint32_t len)
usr.sbin/unbound/libunbound/context.c
290
ctx->num_async++;
usr.sbin/unbound/libunbound/context.c
291
(void)rbtree_insert(&ctx->queries, &q->node);
usr.sbin/unbound/libunbound/context.c
296
context_lookup_new_query(struct ub_ctx* ctx, uint8_t* p, uint32_t len)
usr.sbin/unbound/libunbound/context.c
305
q = (struct ctx_query*)rbtree_search(&ctx->queries, &querynum);
usr.sbin/unbound/libunbound/context.c
350
context_deserialize_answer(struct ub_ctx* ctx,
usr.sbin/unbound/libunbound/context.c
360
q = (struct ctx_query*)rbtree_search(&ctx->queries, &id);
usr.sbin/unbound/libunbound/context.c
406
struct ctx_query* context_deserialize_cancel(struct ub_ctx* ctx,
usr.sbin/unbound/libunbound/context.c
414
q = (struct ctx_query*)rbtree_search(&ctx->queries, &id);
usr.sbin/unbound/libunbound/context.c
60
context_finalize(struct ub_ctx* ctx)
usr.sbin/unbound/libunbound/context.c
63
struct config_file* cfg = ctx->env->cfg;
usr.sbin/unbound/libunbound/context.c
65
if(ctx_logfile_overridden && !ctx->logfile_override) {
usr.sbin/unbound/libunbound/context.c
69
if(ctx->logfile_override) {
usr.sbin/unbound/libunbound/context.c
71
log_file(ctx->log_out);
usr.sbin/unbound/libunbound/context.c
75
ctx->pipe_pid = getpid();
usr.sbin/unbound/libunbound/context.c
78
if(!modstack_call_startup(&ctx->mods, cfg->module_conf, ctx->env))
usr.sbin/unbound/libunbound/context.c
80
if(!modstack_call_init(&ctx->mods, cfg->module_conf, ctx->env))
usr.sbin/unbound/libunbound/context.c
83
log_edns_known_options(VERB_ALGO, ctx->env);
usr.sbin/unbound/libunbound/context.c
84
ctx->local_zones = local_zones_create();
usr.sbin/unbound/libunbound/context.c
85
if(!ctx->local_zones)
usr.sbin/unbound/libunbound/context.c
87
if(!local_zones_apply_cfg(ctx->local_zones, cfg))
usr.sbin/unbound/libunbound/context.c
89
if(!auth_zones_apply_cfg(ctx->env->auth_zones, cfg, 1, &is_rpz,
usr.sbin/unbound/libunbound/context.c
90
ctx->env, &ctx->mods))
usr.sbin/unbound/libunbound/context.c
92
if(!(ctx->env->fwds = forwards_create()) ||
usr.sbin/unbound/libunbound/context.c
93
!forwards_apply_cfg(ctx->env->fwds, cfg))
usr.sbin/unbound/libunbound/context.c
95
if(!(ctx->env->hints = hints_create()) ||
usr.sbin/unbound/libunbound/context.c
96
!hints_apply_cfg(ctx->env->hints, cfg))
usr.sbin/unbound/libunbound/context.c
98
if(!edns_strings_apply_cfg(ctx->env->edns_strings, cfg))
usr.sbin/unbound/libunbound/context.h
209
int context_finalize(struct ub_ctx* ctx);
usr.sbin/unbound/libunbound/context.h
231
struct ctx_query* context_new(struct ub_ctx* ctx, const char* name, int rrtype,
usr.sbin/unbound/libunbound/context.h
241
struct alloc_cache* context_obtain_alloc(struct ub_ctx* ctx, int locking);
usr.sbin/unbound/libunbound/context.h
249
void context_release_alloc(struct ub_ctx* ctx, struct alloc_cache* alloc,
usr.sbin/unbound/libunbound/context.h
306
struct ctx_query* context_lookup_new_query(struct ub_ctx* ctx,
usr.sbin/unbound/libunbound/context.h
316
struct ctx_query* context_deserialize_new_query(struct ub_ctx* ctx,
usr.sbin/unbound/libunbound/context.h
327
struct ctx_query* context_deserialize_answer(struct ub_ctx* ctx,
usr.sbin/unbound/libunbound/context.h
337
struct ctx_query* context_deserialize_cancel(struct ub_ctx* ctx,
usr.sbin/unbound/libunbound/libunbound.c
1000
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1009
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1010
if(!ctx->env->cfg->forwards ||
usr.sbin/unbound/libunbound/libunbound.c
1011
(ctx->env->cfg->forwards->name &&
usr.sbin/unbound/libunbound/libunbound.c
1012
strcmp(ctx->env->cfg->forwards->name, ".") != 0)) {
usr.sbin/unbound/libunbound/libunbound.c
1015
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1022
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1026
s->next = ctx->env->cfg->forwards;
usr.sbin/unbound/libunbound/libunbound.c
1027
ctx->env->cfg->forwards = s;
usr.sbin/unbound/libunbound/libunbound.c
1029
log_assert(ctx->env->cfg->forwards);
usr.sbin/unbound/libunbound/libunbound.c
1030
log_assert(ctx->env->cfg->forwards->name);
usr.sbin/unbound/libunbound/libunbound.c
1031
s = ctx->env->cfg->forwards;
usr.sbin/unbound/libunbound/libunbound.c
1035
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1040
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1044
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1048
int ub_ctx_set_tls(struct ub_ctx* ctx, int tls)
usr.sbin/unbound/libunbound/libunbound.c
1050
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1051
if(ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
1052
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1056
ctx->env->cfg->ssl_upstream = tls;
usr.sbin/unbound/libunbound/libunbound.c
1057
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1061
int ub_ctx_set_stub(struct ub_ctx* ctx, const char* zone, const char* addr,
usr.sbin/unbound/libunbound/libunbound.c
1091
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1092
if(ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
1093
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1099
prev = &ctx->env->cfg->stubs;
usr.sbin/unbound/libunbound/libunbound.c
1103
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1109
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
111
ctx = (struct ub_ctx*)calloc(1, sizeof(*ctx));
usr.sbin/unbound/libunbound/libunbound.c
1117
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
112
if(!ctx) {
usr.sbin/unbound/libunbound/libunbound.c
1121
elem->next = ctx->env->cfg->stubs;
usr.sbin/unbound/libunbound/libunbound.c
1122
ctx->env->cfg->stubs = elem;
usr.sbin/unbound/libunbound/libunbound.c
1129
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1134
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1138
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1143
ub_ctx_resolvconf(struct ub_ctx* ctx, const char* fname)
usr.sbin/unbound/libunbound/libunbound.c
116
alloc_init(&ctx->superalloc, NULL, 0);
usr.sbin/unbound/libunbound/libunbound.c
117
if(!(ctx->seed_rnd = ub_initstate(NULL))) {
usr.sbin/unbound/libunbound/libunbound.c
1175
if((retval=ub_ctx_set_fwd(ctx,
usr.sbin/unbound/libunbound/libunbound.c
118
ub_randfree(ctx->seed_rnd);
usr.sbin/unbound/libunbound/libunbound.c
119
free(ctx);
usr.sbin/unbound/libunbound/libunbound.c
1214
if((r = ub_ctx_set_fwd(ctx, addr)) != UB_NOERROR) {
usr.sbin/unbound/libunbound/libunbound.c
1223
return ub_ctx_set_fwd(ctx, "127.0.0.1");
usr.sbin/unbound/libunbound/libunbound.c
1229
ub_ctx_hosts(struct ub_ctx* ctx, const char* fname)
usr.sbin/unbound/libunbound/libunbound.c
123
lock_basic_init(&ctx->qqpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
1234
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1235
if(ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
1236
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
124
lock_basic_init(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
1240
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
125
lock_basic_init(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1253
if((retval=ub_ctx_hosts(ctx, buf)) !=0 ) {
usr.sbin/unbound/libunbound/libunbound.c
1256
retval=ub_ctx_hosts(ctx, buf);
usr.sbin/unbound/libunbound/libunbound.c
126
ctx->env = (struct module_env*)calloc(1, sizeof(*ctx->env));
usr.sbin/unbound/libunbound/libunbound.c
127
if(!ctx->env) {
usr.sbin/unbound/libunbound/libunbound.c
128
ub_randfree(ctx->seed_rnd);
usr.sbin/unbound/libunbound/libunbound.c
129
free(ctx);
usr.sbin/unbound/libunbound/libunbound.c
1317
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1318
if(!cfg_strlist_insert(&ctx->env->cfg->local_data,
usr.sbin/unbound/libunbound/libunbound.c
1320
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1325
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
133
ctx->env->cfg = config_create_forlib();
usr.sbin/unbound/libunbound/libunbound.c
1333
static int ub_ctx_finalize(struct ub_ctx* ctx)
usr.sbin/unbound/libunbound/libunbound.c
1336
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1337
if (!ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
1338
res = context_finalize(ctx);
usr.sbin/unbound/libunbound/libunbound.c
134
if(!ctx->env->cfg) {
usr.sbin/unbound/libunbound/libunbound.c
1340
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1345
int ub_ctx_print_local_zones(struct ub_ctx* ctx)
usr.sbin/unbound/libunbound/libunbound.c
1347
int res = ub_ctx_finalize(ctx);
usr.sbin/unbound/libunbound/libunbound.c
135
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
1350
local_zones_print(ctx->local_zones);
usr.sbin/unbound/libunbound/libunbound.c
1356
int ub_ctx_zone_add(struct ub_ctx* ctx, const char *zone_name,
usr.sbin/unbound/libunbound/libunbound.c
136
ub_randfree(ctx->seed_rnd);
usr.sbin/unbound/libunbound/libunbound.c
1365
int res = ub_ctx_finalize(ctx);
usr.sbin/unbound/libunbound/libunbound.c
137
free(ctx);
usr.sbin/unbound/libunbound/libunbound.c
1376
lock_rw_wrlock(&ctx->local_zones->lock);
usr.sbin/unbound/libunbound/libunbound.c
1377
if((z=local_zones_find(ctx->local_zones, nm, nmlen, nmlabs,
usr.sbin/unbound/libunbound/libunbound.c
1383
lock_rw_unlock(&ctx->local_zones->lock);
usr.sbin/unbound/libunbound/libunbound.c
1387
if(!local_zones_add_zone(ctx->local_zones, nm, nmlen, nmlabs,
usr.sbin/unbound/libunbound/libunbound.c
1389
lock_rw_unlock(&ctx->local_zones->lock);
usr.sbin/unbound/libunbound/libunbound.c
1392
lock_rw_unlock(&ctx->local_zones->lock);
usr.sbin/unbound/libunbound/libunbound.c
1397
int ub_ctx_zone_remove(struct ub_ctx* ctx, const char *zone_name)
usr.sbin/unbound/libunbound/libunbound.c
1404
int res = ub_ctx_finalize(ctx);
usr.sbin/unbound/libunbound/libunbound.c
1411
lock_rw_wrlock(&ctx->local_zones->lock);
usr.sbin/unbound/libunbound/libunbound.c
1412
if((z=local_zones_find(ctx->local_zones, nm, nmlen, nmlabs,
usr.sbin/unbound/libunbound/libunbound.c
1415
local_zones_del_zone(ctx->local_zones, z);
usr.sbin/unbound/libunbound/libunbound.c
1417
lock_rw_unlock(&ctx->local_zones->lock);
usr.sbin/unbound/libunbound/libunbound.c
142
if(!edns_known_options_init(ctx->env)) {
usr.sbin/unbound/libunbound/libunbound.c
1423
int ub_ctx_data_add(struct ub_ctx* ctx, const char *data)
usr.sbin/unbound/libunbound/libunbound.c
1425
int res = ub_ctx_finalize(ctx);
usr.sbin/unbound/libunbound/libunbound.c
1428
res = local_zones_add_RR(ctx->local_zones, data);
usr.sbin/unbound/libunbound/libunbound.c
143
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
1433
int ub_ctx_data_remove(struct ub_ctx* ctx, const char *data)
usr.sbin/unbound/libunbound/libunbound.c
1438
int res = ub_ctx_finalize(ctx);
usr.sbin/unbound/libunbound/libunbound.c
144
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
1444
local_zones_del_data(ctx->local_zones, nm, nmlen, nmlabs,
usr.sbin/unbound/libunbound/libunbound.c
145
ub_randfree(ctx->seed_rnd);
usr.sbin/unbound/libunbound/libunbound.c
1457
ub_ctx_set_event(struct ub_ctx* ctx, struct event_base* base) {
usr.sbin/unbound/libunbound/libunbound.c
146
free(ctx);
usr.sbin/unbound/libunbound/libunbound.c
1460
if (!ctx || !ctx->event_base || !base) {
usr.sbin/unbound/libunbound/libunbound.c
1463
if (ub_libevent_get_event_base(ctx->event_base) == base) {
usr.sbin/unbound/libunbound/libunbound.c
1468
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
1470
libworker_delete_event(ctx->event_worker);
usr.sbin/unbound/libunbound/libunbound.c
1471
ctx->event_worker = NULL;
usr.sbin/unbound/libunbound/libunbound.c
1474
ctx->event_base = new_base;
usr.sbin/unbound/libunbound/libunbound.c
1475
ctx->created_bg = 0;
usr.sbin/unbound/libunbound/libunbound.c
1476
ctx->dothread = 1;
usr.sbin/unbound/libunbound/libunbound.c
1477
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
150
ctx->env->auth_zones = auth_zones_create();
usr.sbin/unbound/libunbound/libunbound.c
151
if(!ctx->env->auth_zones) {
usr.sbin/unbound/libunbound/libunbound.c
152
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
153
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
154
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
155
ub_randfree(ctx->seed_rnd);
usr.sbin/unbound/libunbound/libunbound.c
156
free(ctx);
usr.sbin/unbound/libunbound/libunbound.c
160
ctx->env->edns_strings = edns_strings_create();
usr.sbin/unbound/libunbound/libunbound.c
161
if(!ctx->env->edns_strings) {
usr.sbin/unbound/libunbound/libunbound.c
162
auth_zones_delete(ctx->env->auth_zones);
usr.sbin/unbound/libunbound/libunbound.c
163
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
164
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
165
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
166
ub_randfree(ctx->seed_rnd);
usr.sbin/unbound/libunbound/libunbound.c
167
free(ctx);
usr.sbin/unbound/libunbound/libunbound.c
172
ctx->env->alloc = &ctx->superalloc;
usr.sbin/unbound/libunbound/libunbound.c
173
ctx->env->worker = NULL;
usr.sbin/unbound/libunbound/libunbound.c
174
ctx->env->need_to_validate = 0;
usr.sbin/unbound/libunbound/libunbound.c
175
modstack_init(&ctx->mods);
usr.sbin/unbound/libunbound/libunbound.c
176
ctx->env->modstack = &ctx->mods;
usr.sbin/unbound/libunbound/libunbound.c
177
rbtree_init(&ctx->queries, &context_query_cmp);
usr.sbin/unbound/libunbound/libunbound.c
178
return ctx;
usr.sbin/unbound/libunbound/libunbound.c
184
struct ub_ctx* ctx = ub_ctx_create_nopipe();
usr.sbin/unbound/libunbound/libunbound.c
185
if(!ctx)
usr.sbin/unbound/libunbound/libunbound.c
187
if((ctx->qq_pipe = tube_create()) == NULL) {
usr.sbin/unbound/libunbound/libunbound.c
189
ub_randfree(ctx->seed_rnd);
usr.sbin/unbound/libunbound/libunbound.c
190
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
191
modstack_call_deinit(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
192
modstack_call_destartup(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
193
modstack_free(&ctx->mods);
usr.sbin/unbound/libunbound/libunbound.c
195
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
196
edns_strings_delete(ctx->env->edns_strings);
usr.sbin/unbound/libunbound/libunbound.c
197
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
198
free(ctx);
usr.sbin/unbound/libunbound/libunbound.c
202
if((ctx->rr_pipe = tube_create()) == NULL) {
usr.sbin/unbound/libunbound/libunbound.c
204
tube_delete(ctx->qq_pipe);
usr.sbin/unbound/libunbound/libunbound.c
205
ub_randfree(ctx->seed_rnd);
usr.sbin/unbound/libunbound/libunbound.c
206
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
207
modstack_call_deinit(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
208
modstack_call_destartup(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
209
modstack_free(&ctx->mods);
usr.sbin/unbound/libunbound/libunbound.c
211
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
212
edns_strings_delete(ctx->env->edns_strings);
usr.sbin/unbound/libunbound/libunbound.c
213
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
214
free(ctx);
usr.sbin/unbound/libunbound/libunbound.c
218
return ctx;
usr.sbin/unbound/libunbound/libunbound.c
224
struct ub_ctx* ctx = ub_ctx_create_nopipe();
usr.sbin/unbound/libunbound/libunbound.c
225
if(!ctx)
usr.sbin/unbound/libunbound/libunbound.c
228
ctx->created_bg = 0;
usr.sbin/unbound/libunbound/libunbound.c
229
ctx->dothread = 1; /* the processing is in the same process,
usr.sbin/unbound/libunbound/libunbound.c
231
ctx->event_base = ueb;
usr.sbin/unbound/libunbound/libunbound.c
232
return ctx;
usr.sbin/unbound/libunbound/libunbound.c
238
struct ub_ctx* ctx = ub_ctx_create_nopipe();
usr.sbin/unbound/libunbound/libunbound.c
239
if(!ctx)
usr.sbin/unbound/libunbound/libunbound.c
242
ctx->created_bg = 0;
usr.sbin/unbound/libunbound/libunbound.c
243
ctx->dothread = 1; /* the processing is in the same process,
usr.sbin/unbound/libunbound/libunbound.c
245
ctx->event_base = ub_libevent_event_base(eb);
usr.sbin/unbound/libunbound/libunbound.c
246
if (!ctx->event_base) {
usr.sbin/unbound/libunbound/libunbound.c
247
ub_ctx_delete(ctx);
usr.sbin/unbound/libunbound/libunbound.c
250
ctx->event_base_malloced = 1;
usr.sbin/unbound/libunbound/libunbound.c
251
return ctx;
usr.sbin/unbound/libunbound/libunbound.c
263
static void ub_stop_bg(struct ub_ctx* ctx)
usr.sbin/unbound/libunbound/libunbound.c
266
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
267
if(ctx->created_bg) {
usr.sbin/unbound/libunbound/libunbound.c
271
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
272
lock_basic_lock(&ctx->qqpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
273
(void)tube_write_msg(ctx->qq_pipe, (uint8_t*)&cmd,
usr.sbin/unbound/libunbound/libunbound.c
275
lock_basic_unlock(&ctx->qqpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
276
lock_basic_lock(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
277
while(tube_read_msg(ctx->rr_pipe, &msg, &len, 0)) {
usr.sbin/unbound/libunbound/libunbound.c
285
lock_basic_unlock(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
289
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
290
if(ctx->dothread) {
usr.sbin/unbound/libunbound/libunbound.c
291
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
292
ub_thread_join(ctx->bg_tid);
usr.sbin/unbound/libunbound/libunbound.c
294
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
296
if(waitpid(ctx->bg_pid, NULL, 0) == -1) {
usr.sbin/unbound/libunbound/libunbound.c
304
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
309
ub_ctx_delete(struct ub_ctx* ctx)
usr.sbin/unbound/libunbound/libunbound.c
313
if(!ctx) return;
usr.sbin/unbound/libunbound/libunbound.c
319
if(ctx->created_bg && ctx->pipe_pid != getpid()) {
usr.sbin/unbound/libunbound/libunbound.c
325
if(ctx->qq_pipe->listen_com)
usr.sbin/unbound/libunbound/libunbound.c
326
ctx->qq_pipe->listen_com->event_added = 0;
usr.sbin/unbound/libunbound/libunbound.c
327
if(ctx->qq_pipe->res_com)
usr.sbin/unbound/libunbound/libunbound.c
328
ctx->qq_pipe->res_com->event_added = 0;
usr.sbin/unbound/libunbound/libunbound.c
329
if(ctx->rr_pipe->listen_com)
usr.sbin/unbound/libunbound/libunbound.c
330
ctx->rr_pipe->listen_com->event_added = 0;
usr.sbin/unbound/libunbound/libunbound.c
331
if(ctx->rr_pipe->res_com)
usr.sbin/unbound/libunbound/libunbound.c
332
ctx->rr_pipe->res_com->event_added = 0;
usr.sbin/unbound/libunbound/libunbound.c
339
if(ctx->created_bg && ctx->dothread && do_stop) {
usr.sbin/unbound/libunbound/libunbound.c
340
if(pthread_kill(ctx->bg_tid, 0) == ESRCH) {
usr.sbin/unbound/libunbound/libunbound.c
347
ub_stop_bg(ctx);
usr.sbin/unbound/libunbound/libunbound.c
348
if(ctx->created_bg && ctx->pipe_pid != getpid() && ctx->thread_worker) {
usr.sbin/unbound/libunbound/libunbound.c
353
ctx->thread_worker->base);
usr.sbin/unbound/libunbound/libunbound.c
354
libworker_delete_event(ctx->thread_worker);
usr.sbin/unbound/libunbound/libunbound.c
355
ctx->thread_worker = NULL;
usr.sbin/unbound/libunbound/libunbound.c
365
libworker_delete_event(ctx->event_worker);
usr.sbin/unbound/libunbound/libunbound.c
367
modstack_call_deinit(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
368
modstack_call_destartup(&ctx->mods, ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
369
modstack_free(&ctx->mods);
usr.sbin/unbound/libunbound/libunbound.c
370
a = ctx->alloc_list;
usr.sbin/unbound/libunbound/libunbound.c
373
a->super = &ctx->superalloc;
usr.sbin/unbound/libunbound/libunbound.c
378
local_zones_delete(ctx->local_zones);
usr.sbin/unbound/libunbound/libunbound.c
379
lock_basic_destroy(&ctx->qqpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
380
lock_basic_destroy(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
381
lock_basic_destroy(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
382
tube_delete(ctx->qq_pipe);
usr.sbin/unbound/libunbound/libunbound.c
383
tube_delete(ctx->rr_pipe);
usr.sbin/unbound/libunbound/libunbound.c
384
if(ctx->env) {
usr.sbin/unbound/libunbound/libunbound.c
385
slabhash_delete(ctx->env->msg_cache);
usr.sbin/unbound/libunbound/libunbound.c
386
rrset_cache_delete(ctx->env->rrset_cache);
usr.sbin/unbound/libunbound/libunbound.c
387
infra_delete(ctx->env->infra_cache);
usr.sbin/unbound/libunbound/libunbound.c
388
config_delete(ctx->env->cfg);
usr.sbin/unbound/libunbound/libunbound.c
389
edns_known_options_delete(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
390
edns_strings_delete(ctx->env->edns_strings);
usr.sbin/unbound/libunbound/libunbound.c
391
forwards_delete(ctx->env->fwds);
usr.sbin/unbound/libunbound/libunbound.c
392
hints_delete(ctx->env->hints);
usr.sbin/unbound/libunbound/libunbound.c
393
auth_zones_delete(ctx->env->auth_zones);
usr.sbin/unbound/libunbound/libunbound.c
394
free(ctx->env);
usr.sbin/unbound/libunbound/libunbound.c
396
ub_randfree(ctx->seed_rnd);
usr.sbin/unbound/libunbound/libunbound.c
397
alloc_clear(&ctx->superalloc);
usr.sbin/unbound/libunbound/libunbound.c
399
traverse_postorder(&ctx->queries, delq, NULL);
usr.sbin/unbound/libunbound/libunbound.c
404
if(ctx->event_base_malloced)
usr.sbin/unbound/libunbound/libunbound.c
405
free(ctx->event_base);
usr.sbin/unbound/libunbound/libunbound.c
406
free(ctx);
usr.sbin/unbound/libunbound/libunbound.c
413
ub_ctx_set_option(struct ub_ctx* ctx, const char* opt, const char* val)
usr.sbin/unbound/libunbound/libunbound.c
415
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
416
if(ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
417
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
420
if(!config_set_option(ctx->env->cfg, opt, val)) {
usr.sbin/unbound/libunbound/libunbound.c
421
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
424
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
429
ub_ctx_get_option(struct ub_ctx* ctx, const char* opt, char** str)
usr.sbin/unbound/libunbound/libunbound.c
432
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
433
r = config_get_option_collate(ctx->env->cfg, opt, str);
usr.sbin/unbound/libunbound/libunbound.c
434
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
442
ub_ctx_config(struct ub_ctx* ctx, const char* fname)
usr.sbin/unbound/libunbound/libunbound.c
444
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
445
if(ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
446
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
449
if(!config_read(ctx->env->cfg, fname, NULL)) {
usr.sbin/unbound/libunbound/libunbound.c
450
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
453
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
458
ub_ctx_add_ta(struct ub_ctx* ctx, const char* ta)
usr.sbin/unbound/libunbound/libunbound.c
462
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
463
if(ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
464
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
468
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_list, dup)) {
usr.sbin/unbound/libunbound/libunbound.c
469
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
472
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
477
ub_ctx_add_ta_file(struct ub_ctx* ctx, const char* fname)
usr.sbin/unbound/libunbound/libunbound.c
481
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
482
if(ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
483
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
487
if(!cfg_strlist_insert(&ctx->env->cfg->trust_anchor_file_list, dup)) {
usr.sbin/unbound/libunbound/libunbound.c
488
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
491
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
495
int ub_ctx_add_ta_autr(struct ub_ctx* ctx, const char* fname)
usr.sbin/unbound/libunbound/libunbound.c
499
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
500
if(ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
501
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
505
if(!cfg_strlist_insert(&ctx->env->cfg->auto_trust_anchor_file_list,
usr.sbin/unbound/libunbound/libunbound.c
507
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
510
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
515
ub_ctx_trustedkeys(struct ub_ctx* ctx, const char* fname)
usr.sbin/unbound/libunbound/libunbound.c
519
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
520
if(ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
521
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
525
if(!cfg_strlist_insert(&ctx->env->cfg->trusted_keys_file_list, dup)) {
usr.sbin/unbound/libunbound/libunbound.c
526
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
529
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
534
ub_ctx_debuglevel(struct ub_ctx* ctx, int d)
usr.sbin/unbound/libunbound/libunbound.c
536
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
538
ctx->env->cfg->verbosity = d;
usr.sbin/unbound/libunbound/libunbound.c
539
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
543
int ub_ctx_debugout(struct ub_ctx* ctx, void* out)
usr.sbin/unbound/libunbound/libunbound.c
545
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
548
ctx->logfile_override = 1;
usr.sbin/unbound/libunbound/libunbound.c
549
ctx->log_out = out;
usr.sbin/unbound/libunbound/libunbound.c
550
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
555
ub_ctx_async(struct ub_ctx* ctx, int dothread)
usr.sbin/unbound/libunbound/libunbound.c
561
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
562
if(ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
563
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
566
ctx->dothread = dothread;
usr.sbin/unbound/libunbound/libunbound.c
567
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
572
ub_poll(struct ub_ctx* ctx)
usr.sbin/unbound/libunbound/libunbound.c
575
return tube_poll(ctx->rr_pipe);
usr.sbin/unbound/libunbound/libunbound.c
579
ub_fd(struct ub_ctx* ctx)
usr.sbin/unbound/libunbound/libunbound.c
581
return tube_read_fd(ctx->rr_pipe);
usr.sbin/unbound/libunbound/libunbound.c
586
process_answer_detail(struct ub_ctx* ctx, uint8_t* msg, uint32_t len,
usr.sbin/unbound/libunbound/libunbound.c
597
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
598
q = context_deserialize_answer(ctx, msg, len, err);
usr.sbin/unbound/libunbound/libunbound.c
600
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
639
(void)rbtree_delete(&ctx->queries, q->node.key);
usr.sbin/unbound/libunbound/libunbound.c
640
ctx->num_async--;
usr.sbin/unbound/libunbound/libunbound.c
642
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
651
process_answer(struct ub_ctx* ctx, uint8_t* msg, uint32_t len)
usr.sbin/unbound/libunbound/libunbound.c
659
r = process_answer_detail(ctx, msg, len, &cb, &cbarg, &err, &res);
usr.sbin/unbound/libunbound/libunbound.c
670
ub_process(struct ub_ctx* ctx)
usr.sbin/unbound/libunbound/libunbound.c
677
lock_basic_lock(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
678
r = tube_read_msg(ctx->rr_pipe, &msg, &len, 1);
usr.sbin/unbound/libunbound/libunbound.c
679
lock_basic_unlock(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
684
if(!process_answer(ctx, msg, len)) {
usr.sbin/unbound/libunbound/libunbound.c
694
ub_wait(struct ub_ctx* ctx)
usr.sbin/unbound/libunbound/libunbound.c
706
lock_basic_lock(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
707
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
708
if(ctx->num_async == 0) {
usr.sbin/unbound/libunbound/libunbound.c
709
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
710
lock_basic_unlock(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
713
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
721
r = tube_wait(ctx->rr_pipe);
usr.sbin/unbound/libunbound/libunbound.c
723
r = tube_read_msg(ctx->rr_pipe, &msg, &len, 1);
usr.sbin/unbound/libunbound/libunbound.c
725
lock_basic_unlock(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
729
lock_basic_unlock(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
732
r = process_answer_detail(ctx, msg, len,
usr.sbin/unbound/libunbound/libunbound.c
734
lock_basic_unlock(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
741
lock_basic_unlock(&ctx->rrpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
748
ub_resolve(struct ub_ctx* ctx, const char* name, int rrtype,
usr.sbin/unbound/libunbound/libunbound.c
755
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
756
if(!ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
757
r = context_finalize(ctx);
usr.sbin/unbound/libunbound/libunbound.c
759
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
764
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
765
q = context_new(ctx, name, rrtype, rrclass, NULL, NULL, NULL);
usr.sbin/unbound/libunbound/libunbound.c
770
r = libworker_fg(ctx, q);
usr.sbin/unbound/libunbound/libunbound.c
772
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
773
(void)rbtree_delete(&ctx->queries, q->node.key);
usr.sbin/unbound/libunbound/libunbound.c
775
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
784
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
785
(void)rbtree_delete(&ctx->queries, q->node.key);
usr.sbin/unbound/libunbound/libunbound.c
787
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
792
ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype,
usr.sbin/unbound/libunbound/libunbound.c
801
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
802
if(!ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
803
r = context_finalize(ctx);
usr.sbin/unbound/libunbound/libunbound.c
805
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
809
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
810
if(!ctx->event_worker) {
usr.sbin/unbound/libunbound/libunbound.c
811
ctx->event_worker = libworker_create_event(ctx,
usr.sbin/unbound/libunbound/libunbound.c
812
ctx->event_base);
usr.sbin/unbound/libunbound/libunbound.c
813
if(!ctx->event_worker) {
usr.sbin/unbound/libunbound/libunbound.c
819
ub_comm_base_now(ctx->event_worker->base);
usr.sbin/unbound/libunbound/libunbound.c
822
q = context_new(ctx, name, rrtype, rrclass, NULL, callback, mydata);
usr.sbin/unbound/libunbound/libunbound.c
827
if((r=libworker_attach_mesh(ctx, q, async_id)) != 0)
usr.sbin/unbound/libunbound/libunbound.c
834
ub_resolve_async(struct ub_ctx* ctx, const char* name, int rrtype,
usr.sbin/unbound/libunbound/libunbound.c
843
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
844
if(!ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
845
int r = context_finalize(ctx);
usr.sbin/unbound/libunbound/libunbound.c
847
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
851
if(!ctx->created_bg) {
usr.sbin/unbound/libunbound/libunbound.c
853
ctx->created_bg = 1;
usr.sbin/unbound/libunbound/libunbound.c
854
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
855
r = libworker_bg(ctx);
usr.sbin/unbound/libunbound/libunbound.c
857
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
858
ctx->created_bg = 0;
usr.sbin/unbound/libunbound/libunbound.c
859
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
863
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
867
q = context_new(ctx, name, rrtype, rrclass, callback, NULL, mydata);
usr.sbin/unbound/libunbound/libunbound.c
872
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
875
(void)rbtree_delete(&ctx->queries, q->node.key);
usr.sbin/unbound/libunbound/libunbound.c
876
ctx->num_async--;
usr.sbin/unbound/libunbound/libunbound.c
878
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
883
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
885
lock_basic_lock(&ctx->qqpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
886
if(!tube_write_msg(ctx->qq_pipe, msg, len, 0)) {
usr.sbin/unbound/libunbound/libunbound.c
887
lock_basic_unlock(&ctx->qqpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
891
lock_basic_unlock(&ctx->qqpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
897
ub_cancel(struct ub_ctx* ctx, int async_id)
usr.sbin/unbound/libunbound/libunbound.c
902
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
903
q = (struct ctx_query*)rbtree_search(&ctx->queries, &async_id);
usr.sbin/unbound/libunbound/libunbound.c
906
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
913
if(!ctx->dothread) { /* if forked */
usr.sbin/unbound/libunbound/libunbound.c
914
(void)rbtree_delete(&ctx->queries, q->node.key);
usr.sbin/unbound/libunbound/libunbound.c
915
ctx->num_async--;
usr.sbin/unbound/libunbound/libunbound.c
918
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
92
struct ub_ctx* ctx;
usr.sbin/unbound/libunbound/libunbound.c
923
lock_basic_lock(&ctx->qqpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
924
if(!tube_write_msg(ctx->qq_pipe, msg, len, 0)) {
usr.sbin/unbound/libunbound/libunbound.c
925
lock_basic_unlock(&ctx->qqpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
929
lock_basic_unlock(&ctx->qqpipe_lock);
usr.sbin/unbound/libunbound/libunbound.c
932
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
975
ub_ctx_set_fwd(struct ub_ctx* ctx, const char* addr)
usr.sbin/unbound/libunbound/libunbound.c
981
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
982
if(ctx->finalized) {
usr.sbin/unbound/libunbound/libunbound.c
983
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libunbound.c
989
if(ctx->env->cfg->forwards &&
usr.sbin/unbound/libunbound/libunbound.c
990
(ctx->env->cfg->forwards->name &&
usr.sbin/unbound/libunbound/libunbound.c
991
strcmp(ctx->env->cfg->forwards->name, ".") == 0)) {
usr.sbin/unbound/libunbound/libunbound.c
992
s = ctx->env->cfg->forwards;
usr.sbin/unbound/libunbound/libunbound.c
993
ctx->env->cfg->forwards = s->next;
usr.sbin/unbound/libunbound/libunbound.c
997
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
131
libworker_setup(struct ub_ctx* ctx, int is_bg, struct ub_event_base* eb)
usr.sbin/unbound/libunbound/libworker.c
134
struct config_file* cfg = ctx->env->cfg;
usr.sbin/unbound/libunbound/libworker.c
139
w->ctx = ctx;
usr.sbin/unbound/libunbound/libworker.c
145
*w->env = *ctx->env;
usr.sbin/unbound/libunbound/libworker.c
146
w->env->alloc = context_obtain_alloc(ctx, !w->is_bg || w->is_bg_thread);
usr.sbin/unbound/libunbound/libworker.c
154
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
168
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
177
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
179
if(!(w->env->rnd = ub_initstate(ctx->seed_rnd))) {
usr.sbin/unbound/libunbound/libworker.c
181
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
187
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
212
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
217
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
235
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
242
w->env->mesh = mesh_create(&ctx->mods, w->env);
usr.sbin/unbound/libunbound/libworker.c
258
struct libworker* libworker_create_event(struct ub_ctx* ctx,
usr.sbin/unbound/libunbound/libworker.c
261
return libworker_setup(ctx, 0, eb);
usr.sbin/unbound/libunbound/libworker.c
270
lock_basic_lock(&w->ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
271
q = context_deserialize_cancel(w->ctx, buf, len);
usr.sbin/unbound/libunbound/libworker.c
272
lock_basic_unlock(&w->ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
274
q = context_deserialize_cancel(w->ctx, buf, len);
usr.sbin/unbound/libunbound/libworker.c
333
struct ub_ctx* ctx;
usr.sbin/unbound/libunbound/libworker.c
338
ctx = w->ctx;
usr.sbin/unbound/libunbound/libworker.c
344
tube_close_write(ctx->qq_pipe);
usr.sbin/unbound/libunbound/libworker.c
345
tube_close_read(ctx->rr_pipe);
usr.sbin/unbound/libunbound/libworker.c
347
if(!tube_setup_bg_listen(ctx->qq_pipe, w->base,
usr.sbin/unbound/libunbound/libworker.c
352
if(!tube_setup_bg_write(ctx->rr_pipe, w->base)) {
usr.sbin/unbound/libunbound/libworker.c
363
tube_remove_bg_listen(w->ctx->qq_pipe);
usr.sbin/unbound/libunbound/libworker.c
364
tube_remove_bg_write(w->ctx->rr_pipe);
usr.sbin/unbound/libunbound/libworker.c
366
(void)tube_write_msg(ctx->rr_pipe, (uint8_t*)&m,
usr.sbin/unbound/libunbound/libworker.c
370
tube_close_read(ctx->qq_pipe);
usr.sbin/unbound/libunbound/libworker.c
371
tube_close_write(ctx->rr_pipe);
usr.sbin/unbound/libunbound/libworker.c
376
int libworker_bg(struct ub_ctx* ctx)
usr.sbin/unbound/libunbound/libworker.c
380
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
381
if(ctx->dothread) {
usr.sbin/unbound/libunbound/libworker.c
382
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
383
w = libworker_setup(ctx, 1, NULL);
usr.sbin/unbound/libunbound/libworker.c
386
ctx->thread_worker = w;
usr.sbin/unbound/libunbound/libworker.c
390
ub_thread_create(&ctx->bg_tid, libworker_dobg, w);
usr.sbin/unbound/libunbound/libworker.c
392
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
397
switch((ctx->bg_pid=fork())) {
usr.sbin/unbound/libunbound/libworker.c
399
w = libworker_setup(ctx, 1, NULL);
usr.sbin/unbound/libunbound/libworker.c
402
tube_close_write(ctx->qq_pipe);
usr.sbin/unbound/libunbound/libworker.c
403
tube_close_read(ctx->rr_pipe);
usr.sbin/unbound/libunbound/libworker.c
413
tube_close_read(ctx->qq_pipe);
usr.sbin/unbound/libunbound/libworker.c
414
tube_close_write(ctx->rr_pipe);
usr.sbin/unbound/libunbound/libworker.c
605
int libworker_fg(struct ub_ctx* ctx, struct ctx_query* q)
usr.sbin/unbound/libunbound/libworker.c
607
struct libworker* w = libworker_setup(ctx, 0, NULL);
usr.sbin/unbound/libunbound/libworker.c
623
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
usr.sbin/unbound/libunbound/libworker.c
633
if(ctx->env->auth_zones && auth_zones_downstream_answer(
usr.sbin/unbound/libunbound/libworker.c
634
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
usr.sbin/unbound/libunbound/libworker.c
668
struct ub_ctx* ctx = q->w->ctx;
usr.sbin/unbound/libunbound/libworker.c
669
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
670
(void)rbtree_delete(&ctx->queries, q->node.key);
usr.sbin/unbound/libunbound/libworker.c
671
ctx->num_async--;
usr.sbin/unbound/libunbound/libworker.c
673
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
687
int libworker_attach_mesh(struct ub_ctx* ctx, struct ctx_query* q,
usr.sbin/unbound/libunbound/libworker.c
690
struct libworker* w = ctx->event_worker;
usr.sbin/unbound/libunbound/libworker.c
704
if(local_zones_answer(ctx->local_zones, w->env, &qinfo, &edns,
usr.sbin/unbound/libunbound/libworker.c
713
if(ctx->env->auth_zones && auth_zones_downstream_answer(
usr.sbin/unbound/libunbound/libworker.c
714
ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
usr.sbin/unbound/libunbound/libworker.c
748
lock_basic_lock(&w->ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
763
lock_basic_unlock(&w->ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
769
(void)rbtree_delete(&w->ctx->queries, q->node.key);
usr.sbin/unbound/libunbound/libworker.c
770
w->ctx->num_async--;
usr.sbin/unbound/libunbound/libworker.c
778
if(!tube_queue_item(w->ctx->rr_pipe, msg, len)) {
usr.sbin/unbound/libunbound/libworker.c
793
struct ub_ctx* ctx = q->w->ctx;
usr.sbin/unbound/libunbound/libworker.c
794
lock_basic_lock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
795
(void)rbtree_delete(&ctx->queries, q->node.key);
usr.sbin/unbound/libunbound/libworker.c
796
ctx->num_async--;
usr.sbin/unbound/libunbound/libworker.c
798
lock_basic_unlock(&ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
823
lock_basic_lock(&w->ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
824
q = context_lookup_new_query(w->ctx, buf, len);
usr.sbin/unbound/libunbound/libworker.c
825
lock_basic_unlock(&w->ctx->cfglock);
usr.sbin/unbound/libunbound/libworker.c
827
q = context_deserialize_new_query(w->ctx, buf, len);
usr.sbin/unbound/libunbound/libworker.c
843
if(local_zones_answer(w->ctx->local_zones, w->env, &qinfo, &edns,
usr.sbin/unbound/libunbound/libworker.c
852
if(w->ctx->env->auth_zones && auth_zones_downstream_answer(
usr.sbin/unbound/libunbound/libworker.c
853
w->ctx->env->auth_zones, w->env, &qinfo, &edns, NULL,
usr.sbin/unbound/libunbound/libworker.c
97
context_release_alloc(w->ctx, w->env->alloc,
usr.sbin/unbound/libunbound/libworker.h
101
int libworker_bg(struct ub_ctx* ctx);
usr.sbin/unbound/libunbound/libworker.h
112
int libworker_fg(struct ub_ctx* ctx, struct ctx_query* q);
usr.sbin/unbound/libunbound/libworker.h
120
struct libworker* libworker_create_event(struct ub_ctx* ctx,
usr.sbin/unbound/libunbound/libworker.h
130
int libworker_attach_mesh(struct ub_ctx* ctx, struct ctx_query* q,
usr.sbin/unbound/libunbound/libworker.h
72
struct ub_ctx* ctx;
usr.sbin/unbound/libunbound/unbound-event.h
216
int ub_ctx_set_event(struct ub_ctx* ctx, struct event_base* base);
usr.sbin/unbound/libunbound/unbound-event.h
257
int ub_resolve_event(struct ub_ctx* ctx, const char* name, int rrtype,
usr.sbin/unbound/libunbound/unbound.h
278
void ub_ctx_delete(struct ub_ctx* ctx);
usr.sbin/unbound/libunbound/unbound.h
293
int ub_ctx_set_option(struct ub_ctx* ctx, const char* opt, const char* val);
usr.sbin/unbound/libunbound/unbound.h
309
int ub_ctx_get_option(struct ub_ctx* ctx, const char* opt, char** str);
usr.sbin/unbound/libunbound/unbound.h
321
int ub_ctx_config(struct ub_ctx* ctx, const char* fname);
usr.sbin/unbound/libunbound/unbound.h
340
int ub_ctx_set_fwd(struct ub_ctx* ctx, const char* addr);
usr.sbin/unbound/libunbound/unbound.h
351
int ub_ctx_set_tls(struct ub_ctx* ctx, int tls);
usr.sbin/unbound/libunbound/unbound.h
371
int ub_ctx_set_stub(struct ub_ctx* ctx, const char* zone, const char* addr,
usr.sbin/unbound/libunbound/unbound.h
388
int ub_ctx_resolvconf(struct ub_ctx* ctx, const char* fname);
usr.sbin/unbound/libunbound/unbound.h
401
int ub_ctx_hosts(struct ub_ctx* ctx, const char* fname);
usr.sbin/unbound/libunbound/unbound.h
414
int ub_ctx_add_ta(struct ub_ctx* ctx, const char* ta);
usr.sbin/unbound/libunbound/unbound.h
425
int ub_ctx_add_ta_file(struct ub_ctx* ctx, const char* fname);
usr.sbin/unbound/libunbound/unbound.h
440
int ub_ctx_add_ta_autr(struct ub_ctx* ctx, const char* fname);
usr.sbin/unbound/libunbound/unbound.h
452
int ub_ctx_trustedkeys(struct ub_ctx* ctx, const char* fname);
usr.sbin/unbound/libunbound/unbound.h
462
int ub_ctx_debugout(struct ub_ctx* ctx, void* out);
usr.sbin/unbound/libunbound/unbound.h
472
int ub_ctx_debuglevel(struct ub_ctx* ctx, int d);
usr.sbin/unbound/libunbound/unbound.h
484
int ub_ctx_async(struct ub_ctx* ctx, int dothread);
usr.sbin/unbound/libunbound/unbound.h
494
int ub_poll(struct ub_ctx* ctx);
usr.sbin/unbound/libunbound/unbound.h
503
int ub_wait(struct ub_ctx* ctx);
usr.sbin/unbound/libunbound/unbound.h
514
int ub_fd(struct ub_ctx* ctx);
usr.sbin/unbound/libunbound/unbound.h
523
int ub_process(struct ub_ctx* ctx);
usr.sbin/unbound/libunbound/unbound.h
537
int ub_resolve(struct ub_ctx* ctx, const char* name, int rrtype,
usr.sbin/unbound/libunbound/unbound.h
568
int ub_resolve_async(struct ub_ctx* ctx, const char* name, int rrtype,
usr.sbin/unbound/libunbound/unbound.h
584
int ub_cancel(struct ub_ctx* ctx, int async_id);
usr.sbin/unbound/libunbound/unbound.h
605
int ub_ctx_print_local_zones(struct ub_ctx* ctx);
usr.sbin/unbound/libunbound/unbound.h
616
int ub_ctx_zone_add(struct ub_ctx* ctx, const char *zone_name,
usr.sbin/unbound/libunbound/unbound.h
626
int ub_ctx_zone_remove(struct ub_ctx* ctx, const char *zone_name);
usr.sbin/unbound/libunbound/unbound.h
636
int ub_ctx_data_add(struct ub_ctx* ctx, const char *data);
usr.sbin/unbound/libunbound/unbound.h
644
int ub_ctx_data_remove(struct ub_ctx* ctx, const char *data);
usr.sbin/unbound/services/listen_dnsport.c
4648
SSL_CTX* ctx = SSL_CTX_new(TLS_server_method());
usr.sbin/unbound/services/listen_dnsport.c
4649
if(!ctx) {
usr.sbin/unbound/services/listen_dnsport.c
4655
SSL_CTX_free(ctx);
usr.sbin/unbound/services/listen_dnsport.c
4660
SSL_CTX_free(ctx);
usr.sbin/unbound/services/listen_dnsport.c
4663
SSL_CTX_set_options(ctx,
usr.sbin/unbound/services/listen_dnsport.c
4668
SSL_CTX_set_mode(ctx, SSL_MODE_RELEASE_BUFFERS);
usr.sbin/unbound/services/listen_dnsport.c
4669
SSL_CTX_set_min_proto_version(ctx, TLS1_3_VERSION);
usr.sbin/unbound/services/listen_dnsport.c
4670
SSL_CTX_set_max_proto_version(ctx, TLS1_3_VERSION);
usr.sbin/unbound/services/listen_dnsport.c
4672
SSL_CTX_set_alpn_select_cb(ctx, doq_alpn_select_cb, NULL);
usr.sbin/unbound/services/listen_dnsport.c
4674
SSL_CTX_set_default_verify_paths(ctx);
usr.sbin/unbound/services/listen_dnsport.c
4675
if(!SSL_CTX_use_certificate_chain_file(ctx, pem)) {
usr.sbin/unbound/services/listen_dnsport.c
4679
SSL_CTX_free(ctx);
usr.sbin/unbound/services/listen_dnsport.c
4682
if(!SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM)) {
usr.sbin/unbound/services/listen_dnsport.c
4685
SSL_CTX_free(ctx);
usr.sbin/unbound/services/listen_dnsport.c
4688
if(!SSL_CTX_check_private_key(ctx)) {
usr.sbin/unbound/services/listen_dnsport.c
4691
SSL_CTX_free(ctx);
usr.sbin/unbound/services/listen_dnsport.c
4694
SSL_CTX_set_session_id_context(ctx, (void*)sid_ctx, strlen(sid_ctx));
usr.sbin/unbound/services/listen_dnsport.c
4696
if(!SSL_CTX_load_verify_locations(ctx, verifypem, NULL)) {
usr.sbin/unbound/services/listen_dnsport.c
4701
SSL_CTX_free(ctx);
usr.sbin/unbound/services/listen_dnsport.c
4704
SSL_CTX_set_client_CA_list(ctx, SSL_load_client_CA_file(
usr.sbin/unbound/services/listen_dnsport.c
4706
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER|
usr.sbin/unbound/services/listen_dnsport.c
4711
SSL_CTX_set_max_early_data(ctx, 0xffffffff);
usr.sbin/unbound/services/listen_dnsport.c
4713
if(ngtcp2_crypto_quictls_configure_server_context(ctx) != 0) {
usr.sbin/unbound/services/listen_dnsport.c
4715
SSL_CTX_free(ctx);
usr.sbin/unbound/services/listen_dnsport.c
4725
SSL_CTX_free(ctx);
usr.sbin/unbound/services/listen_dnsport.c
4733
SSL_CTX_set_quic_method(ctx, doq_socket->quic_method);
usr.sbin/unbound/services/listen_dnsport.c
4735
return ctx;
usr.sbin/unbound/services/listen_dnsport.c
4751
doq_ssl_server_setup(SSL_CTX* ctx, struct doq_conn* conn)
usr.sbin/unbound/services/listen_dnsport.c
4756
SSL* ssl = SSL_new(ctx);
usr.sbin/unbound/services/listen_dnsport.c
4902
conn->ssl = doq_ssl_server_setup((SSL_CTX*)conn->doq_socket->ctx,
usr.sbin/unbound/sldns/keyraw.c
290
EVP_PKEY_CTX* ctx;
usr.sbin/unbound/sldns/keyraw.c
320
ctx = EVP_PKEY_CTX_new_from_name(NULL, "DSA", NULL);
usr.sbin/unbound/sldns/keyraw.c
321
if(!ctx) {
usr.sbin/unbound/sldns/keyraw.c
329
if(EVP_PKEY_fromdata_init(ctx) <= 0) {
usr.sbin/unbound/sldns/keyraw.c
330
EVP_PKEY_CTX_free(ctx);
usr.sbin/unbound/sldns/keyraw.c
338
if(EVP_PKEY_fromdata(ctx, &evp_key, EVP_PKEY_PUBLIC_KEY, params) <= 0) {
usr.sbin/unbound/sldns/keyraw.c
339
EVP_PKEY_CTX_free(ctx);
usr.sbin/unbound/sldns/keyraw.c
348
EVP_PKEY_CTX_free(ctx);
usr.sbin/unbound/sldns/keyraw.c
458
EVP_PKEY_CTX* ctx;
usr.sbin/unbound/sldns/keyraw.c
488
ctx = EVP_PKEY_CTX_new_from_name(NULL, "RSA", NULL);
usr.sbin/unbound/sldns/keyraw.c
489
if(!ctx) {
usr.sbin/unbound/sldns/keyraw.c
495
if(EVP_PKEY_fromdata_init(ctx) <= 0) {
usr.sbin/unbound/sldns/keyraw.c
496
EVP_PKEY_CTX_free(ctx);
usr.sbin/unbound/sldns/keyraw.c
502
if(EVP_PKEY_fromdata(ctx, &evp_key, EVP_PKEY_PUBLIC_KEY, params) <= 0) {
usr.sbin/unbound/sldns/keyraw.c
503
EVP_PKEY_CTX_free(ctx);
usr.sbin/unbound/sldns/keyraw.c
510
EVP_PKEY_CTX_free(ctx);
usr.sbin/unbound/sldns/keyraw.c
567
EVP_PKEY_CTX* ctx;
usr.sbin/unbound/sldns/keyraw.c
601
ctx = EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL);
usr.sbin/unbound/sldns/keyraw.c
602
if(!ctx) {
usr.sbin/unbound/sldns/keyraw.c
606
if(EVP_PKEY_fromdata_init(ctx) <= 0) {
usr.sbin/unbound/sldns/keyraw.c
607
EVP_PKEY_CTX_free(ctx);
usr.sbin/unbound/sldns/keyraw.c
611
if(EVP_PKEY_fromdata(ctx, &evp_key, EVP_PKEY_PUBLIC_KEY, params) <= 0) {
usr.sbin/unbound/sldns/keyraw.c
612
EVP_PKEY_CTX_free(ctx);
usr.sbin/unbound/sldns/keyraw.c
616
EVP_PKEY_CTX_free(ctx);
usr.sbin/unbound/sldns/keyraw.c
706
EVP_MD_CTX* ctx;
usr.sbin/unbound/sldns/keyraw.c
707
ctx = EVP_MD_CTX_create();
usr.sbin/unbound/sldns/keyraw.c
708
if(!ctx)
usr.sbin/unbound/sldns/keyraw.c
710
if(!EVP_DigestInit_ex(ctx, md, NULL) ||
usr.sbin/unbound/sldns/keyraw.c
711
!EVP_DigestUpdate(ctx, data, len) ||
usr.sbin/unbound/sldns/keyraw.c
712
!EVP_DigestFinal_ex(ctx, dest, NULL)) {
usr.sbin/unbound/sldns/keyraw.c
713
EVP_MD_CTX_destroy(ctx);
usr.sbin/unbound/sldns/keyraw.c
716
EVP_MD_CTX_destroy(ctx);
usr.sbin/unbound/smallapp/unbound-anchor.c
2129
add_5011_probe_root(struct ub_ctx* ctx, const char* root_anchor_file)
usr.sbin/unbound/smallapp/unbound-anchor.c
2132
r = ub_ctx_set_option(ctx, "auto-trust-anchor-file:", root_anchor_file);
usr.sbin/unbound/smallapp/unbound-anchor.c
2135
ub_ctx_delete(ctx);
usr.sbin/unbound/smallapp/unbound-anchor.c
2146
prime_root_key(struct ub_ctx* ctx)
usr.sbin/unbound/smallapp/unbound-anchor.c
2150
r = ub_resolve(ctx, ".", LDNS_RR_TYPE_DNSKEY, LDNS_RR_CLASS_IN, &res);
usr.sbin/unbound/smallapp/unbound-anchor.c
2153
ub_ctx_delete(ctx);
usr.sbin/unbound/smallapp/unbound-anchor.c
2158
ub_ctx_delete(ctx);
usr.sbin/unbound/smallapp/unbound-anchor.c
2266
struct ub_ctx* ctx;
usr.sbin/unbound/smallapp/unbound-anchor.c
2269
ctx = create_unbound_context(res_conf, root_hints, debugconf,
usr.sbin/unbound/smallapp/unbound-anchor.c
2271
add_5011_probe_root(ctx, root_anchor_file);
usr.sbin/unbound/smallapp/unbound-anchor.c
2272
dnskey = prime_root_key(ctx);
usr.sbin/unbound/smallapp/unbound-anchor.c
2273
ub_ctx_delete(ctx);
usr.sbin/unbound/smallapp/unbound-anchor.c
276
ub_ctx_error_exit(struct ub_ctx* ctx, const char* str, const char* str2)
usr.sbin/unbound/smallapp/unbound-anchor.c
278
ub_ctx_delete(ctx);
usr.sbin/unbound/smallapp/unbound-anchor.c
292
struct ub_ctx* ctx = ub_ctx_create();
usr.sbin/unbound/smallapp/unbound-anchor.c
293
if(!ctx) {
usr.sbin/unbound/smallapp/unbound-anchor.c
298
r = ub_ctx_set_option(ctx, "target-fetch-policy:", "0 0 0 0 0");
usr.sbin/unbound/smallapp/unbound-anchor.c
302
r = ub_ctx_config(ctx, debugconf);
usr.sbin/unbound/smallapp/unbound-anchor.c
303
if(r) ub_ctx_error_exit(ctx, debugconf, ub_strerror(r));
usr.sbin/unbound/smallapp/unbound-anchor.c
306
r = ub_ctx_resolvconf(ctx, res_conf);
usr.sbin/unbound/smallapp/unbound-anchor.c
307
if(r) ub_ctx_error_exit(ctx, res_conf, ub_strerror(r));
usr.sbin/unbound/smallapp/unbound-anchor.c
310
r = ub_ctx_set_option(ctx, "root-hints:", root_hints);
usr.sbin/unbound/smallapp/unbound-anchor.c
311
if(r) ub_ctx_error_exit(ctx, root_hints, ub_strerror(r));
usr.sbin/unbound/smallapp/unbound-anchor.c
314
r = ub_ctx_set_option(ctx, "outgoing-interface:", srcaddr);
usr.sbin/unbound/smallapp/unbound-anchor.c
315
if(r) ub_ctx_error_exit(ctx, srcaddr, ub_strerror(r));
usr.sbin/unbound/smallapp/unbound-anchor.c
318
r = ub_ctx_set_option(ctx, "do-ip6:", "no");
usr.sbin/unbound/smallapp/unbound-anchor.c
319
if(r) ub_ctx_error_exit(ctx, "ip4only", ub_strerror(r));
usr.sbin/unbound/smallapp/unbound-anchor.c
322
r = ub_ctx_set_option(ctx, "do-ip4:", "no");
usr.sbin/unbound/smallapp/unbound-anchor.c
323
if(r) ub_ctx_error_exit(ctx, "ip6only", ub_strerror(r));
usr.sbin/unbound/smallapp/unbound-anchor.c
325
return ctx;
usr.sbin/unbound/smallapp/unbound-anchor.c
563
resolve_host_ip(struct ub_ctx* ctx, const char* host, int port, int tp, int cl,
usr.sbin/unbound/smallapp/unbound-anchor.c
570
r = ub_resolve(ctx, host, tp, cl, &res);
usr.sbin/unbound/smallapp/unbound-anchor.c
578
ub_ctx_delete(ctx);
usr.sbin/unbound/smallapp/unbound-anchor.c
653
struct ub_ctx* ctx;
usr.sbin/unbound/smallapp/unbound-anchor.c
661
ctx = create_unbound_context(res_conf, root_hints, debugconf,
usr.sbin/unbound/smallapp/unbound-anchor.c
666
resolve_host_ip(ctx, host, port, LDNS_RR_TYPE_A,
usr.sbin/unbound/smallapp/unbound-anchor.c
672
resolve_host_ip(ctx, host, port, LDNS_RR_TYPE_AAAA,
usr.sbin/unbound/smallapp/unbound-anchor.c
676
ub_ctx_delete(ctx);
usr.sbin/unbound/smallapp/unbound-control.c
550
SSL_CTX* ctx;
usr.sbin/unbound/smallapp/unbound-control.c
559
ctx = SSL_CTX_new(SSLv23_client_method());
usr.sbin/unbound/smallapp/unbound-control.c
560
if(!ctx)
usr.sbin/unbound/smallapp/unbound-control.c
563
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2)
usr.sbin/unbound/smallapp/unbound-control.c
567
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)
usr.sbin/unbound/smallapp/unbound-control.c
572
if((SSL_CTX_set_options(ctx, SSL_OP_NO_RENEGOTIATION) &
usr.sbin/unbound/smallapp/unbound-control.c
576
if(!SSL_CTX_use_certificate_chain_file(ctx,c_cert))
usr.sbin/unbound/smallapp/unbound-control.c
578
if(!SSL_CTX_use_PrivateKey_file(ctx,c_key,SSL_FILETYPE_PEM))
usr.sbin/unbound/smallapp/unbound-control.c
580
if(!SSL_CTX_check_private_key(ctx))
usr.sbin/unbound/smallapp/unbound-control.c
582
if(SSL_CTX_load_verify_locations(ctx, s_cert, NULL) != 1)
usr.sbin/unbound/smallapp/unbound-control.c
585
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
usr.sbin/unbound/smallapp/unbound-control.c
590
return ctx;
usr.sbin/unbound/smallapp/unbound-control.c
762
setup_ssl(SSL_CTX* ctx, int fd)
usr.sbin/unbound/smallapp/unbound-control.c
768
if(!ctx) return NULL;
usr.sbin/unbound/smallapp/unbound-control.c
769
ssl = SSL_new(ctx);
usr.sbin/unbound/smallapp/unbound-control.c
936
SSL_CTX* ctx;
usr.sbin/unbound/smallapp/unbound-control.c
949
ctx = setup_ctx(cfg);
usr.sbin/unbound/smallapp/unbound-control.c
953
ssl = setup_ssl(ctx, fd);
usr.sbin/unbound/smallapp/unbound-control.c
960
if(ctx) SSL_CTX_free(ctx);
usr.sbin/unbound/smallapp/unbound-host.c
369
dnslook(struct ub_ctx* ctx, char* q, int t, int c, int docname)
usr.sbin/unbound/smallapp/unbound-host.c
374
ret = ub_resolve(ctx, q, t, c, &result);
usr.sbin/unbound/smallapp/unbound-host.c
387
lookup(struct ub_ctx* ctx, const char* nm, const char* qt, const char* qc)
usr.sbin/unbound/smallapp/unbound-host.c
398
if(!dnslook(ctx, realq, LDNS_RR_TYPE_A, c, 1)) {
usr.sbin/unbound/smallapp/unbound-host.c
400
(void)dnslook(ctx, realq, LDNS_RR_TYPE_AAAA, c, 0);
usr.sbin/unbound/smallapp/unbound-host.c
401
(void)dnslook(ctx, realq, LDNS_RR_TYPE_MX, c, 0);
usr.sbin/unbound/smallapp/unbound-host.c
404
(void)dnslook(ctx, realq, t, c, 1);
usr.sbin/unbound/smallapp/unbound-host.c
406
ub_ctx_delete(ctx);
usr.sbin/unbound/smallapp/unbound-host.c
432
struct ub_ctx* ctx = NULL;
usr.sbin/unbound/smallapp/unbound-host.c
435
ctx = ub_ctx_create();
usr.sbin/unbound/smallapp/unbound-host.c
436
if(!ctx) {
usr.sbin/unbound/smallapp/unbound-host.c
441
check_ub_res(ub_ctx_set_option(ctx, "target-fetch-policy:", "0 0 0 0 0"));
usr.sbin/unbound/smallapp/unbound-host.c
447
check_ub_res(ub_ctx_set_option(ctx, "do-ip6:", "no"));
usr.sbin/unbound/smallapp/unbound-host.c
450
check_ub_res(ub_ctx_set_option(ctx, "do-ip4:", "no"));
usr.sbin/unbound/smallapp/unbound-host.c
456
check_ub_res(ub_ctx_config(ctx, optarg));
usr.sbin/unbound/smallapp/unbound-host.c
459
check_ub_res(ub_ctx_add_ta_file(ctx, ROOT_ANCHOR_FILE));
usr.sbin/unbound/smallapp/unbound-host.c
467
check_ub_res(ub_ctx_resolvconf(ctx, "/etc/resolv.conf"));
usr.sbin/unbound/smallapp/unbound-host.c
476
check_ub_res(ub_ctx_add_ta(ctx, optarg));
usr.sbin/unbound/smallapp/unbound-host.c
479
check_ub_res(ub_ctx_add_ta_file(ctx, optarg));
usr.sbin/unbound/smallapp/unbound-host.c
482
check_ub_res(ub_ctx_trustedkeys(ctx, optarg));
usr.sbin/unbound/smallapp/unbound-host.c
487
ub_ctx_delete(ctx);
usr.sbin/unbound/smallapp/unbound-host.c
492
check_ub_res(ub_ctx_debuglevel(ctx, debuglevel));
usr.sbin/unbound/smallapp/unbound-host.c
493
if(ub_ctx_get_option(ctx, "use-syslog", &use_syslog) == 0) {
usr.sbin/unbound/smallapp/unbound-host.c
495
check_ub_res(ub_ctx_set_option(ctx,
usr.sbin/unbound/smallapp/unbound-host.c
506
ub_ctx_delete(ctx);
usr.sbin/unbound/smallapp/unbound-host.c
538
lookup(ctx, argv[0], qtype, qclass);
usr.sbin/unbound/testcode/asynclook.c
178
struct ub_ctx* ctx;
usr.sbin/unbound/testcode/asynclook.c
318
r = ub_resolve_async(inf->ctx,
usr.sbin/unbound/testcode/asynclook.c
325
r = ub_cancel(inf->ctx, async_ids[i-100].id);
usr.sbin/unbound/testcode/asynclook.c
334
r = ub_resolve_async(inf->ctx,
usr.sbin/unbound/testcode/asynclook.c
340
r = ub_resolve(inf->ctx, inf->argv[i%inf->argc],
usr.sbin/unbound/testcode/asynclook.c
347
r = ub_wait(inf->ctx);
usr.sbin/unbound/testcode/asynclook.c
359
ext_test(struct ub_ctx* ctx, int argc, char** argv)
usr.sbin/unbound/testcode/asynclook.c
369
inf[i].ctx = ctx;
usr.sbin/unbound/testcode/asynclook.c
391
ub_ctx_delete(ctx);
usr.sbin/unbound/testcode/asynclook.c
405
struct ub_ctx* ctx;
usr.sbin/unbound/testcode/asynclook.c
415
ctx = ub_ctx_create();
usr.sbin/unbound/testcode/asynclook.c
416
if(!ctx) {
usr.sbin/unbound/testcode/asynclook.c
428
r = ub_ctx_debuglevel(ctx, 3);
usr.sbin/unbound/testcode/asynclook.c
432
r = ub_ctx_async(ctx, 1);
usr.sbin/unbound/testcode/asynclook.c
442
r = ub_ctx_resolvconf(ctx, optarg);
usr.sbin/unbound/testcode/asynclook.c
452
r = ub_ctx_hosts(ctx, optarg);
usr.sbin/unbound/testcode/asynclook.c
462
r = ub_ctx_set_fwd(ctx, optarg);
usr.sbin/unbound/testcode/asynclook.c
501
return ext_test(ctx, argc, argv);
usr.sbin/unbound/testcode/asynclook.c
517
r = ub_resolve(ctx, argv[i], LDNS_RR_TYPE_A,
usr.sbin/unbound/testcode/asynclook.c
522
r = ub_resolve_async(ctx, argv[i], LDNS_RR_TYPE_A,
usr.sbin/unbound/testcode/asynclook.c
533
r = ub_cancel(ctx, lookups[i].async_id);
usr.sbin/unbound/testcode/asynclook.c
545
r = ub_process(ctx);
usr.sbin/unbound/testcode/asynclook.c
562
ub_ctx_delete(ctx);
usr.sbin/unbound/testcode/dohclient.c
501
SSL_CTX* ctx = NULL;
usr.sbin/unbound/testcode/dohclient.c
510
ctx = connect_sslctx_create(NULL, NULL, NULL, 0);
usr.sbin/unbound/testcode/dohclient.c
511
if(!ctx) fatal_exit("cannot create ssl ctx");
usr.sbin/unbound/testcode/dohclient.c
513
SSL_CTX_set_alpn_protos(ctx, (const unsigned char *)"\x02h2", 3);
usr.sbin/unbound/testcode/dohclient.c
515
ssl = outgoing_ssl_fd(ctx, fd);
usr.sbin/unbound/testcode/dohclient.c
558
if(ctx) {
usr.sbin/unbound/testcode/dohclient.c
559
SSL_CTX_free(ctx);
usr.sbin/unbound/testcode/doqclient.c
110
SSL_CTX* ctx;
usr.sbin/unbound/testcode/doqclient.c
1356
SSL_CTX* ctx = SSL_CTX_new(TLS_client_method());
usr.sbin/unbound/testcode/doqclient.c
1357
if(!ctx) {
usr.sbin/unbound/testcode/doqclient.c
1361
SSL_CTX_set_min_proto_version(ctx, TLS1_3_VERSION);
usr.sbin/unbound/testcode/doqclient.c
1362
SSL_CTX_set_max_proto_version(ctx, TLS1_3_VERSION);
usr.sbin/unbound/testcode/doqclient.c
1363
SSL_CTX_set_default_verify_paths(ctx);
usr.sbin/unbound/testcode/doqclient.c
1365
if(ngtcp2_crypto_quictls_configure_client_context(ctx) != 0) {
usr.sbin/unbound/testcode/doqclient.c
1375
SSL_CTX_set_quic_method(ctx, &quic_method);
usr.sbin/unbound/testcode/doqclient.c
1377
return ctx;
usr.sbin/unbound/testcode/doqclient.c
1388
SSL* ssl = SSL_new(data->ctx);
usr.sbin/unbound/testcode/doqclient.c
2289
data->ctx = ctx_client_setup();
usr.sbin/unbound/testcode/doqclient.c
2291
SSL_CTX_set_session_cache_mode(data->ctx,
usr.sbin/unbound/testcode/doqclient.c
2294
SSL_CTX_sess_set_new_cb(data->ctx, new_session_cb);
usr.sbin/unbound/testcode/doqclient.c
2359
SSL_CTX_free(data->ctx);
usr.sbin/unbound/testcode/petal.c
238
SSL_CTX* ctx = SSL_CTX_new(SSLv23_server_method());
usr.sbin/unbound/testcode/petal.c
239
if(!ctx) print_exit("out of memory");
usr.sbin/unbound/testcode/petal.c
241
(void)SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
usr.sbin/unbound/testcode/petal.c
243
(void)SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3);
usr.sbin/unbound/testcode/petal.c
245
SSL_CTX_set_security_level(ctx, 0); /* for keys in tests */
usr.sbin/unbound/testcode/petal.c
247
if(!SSL_CTX_use_certificate_chain_file(ctx, cert)) {
usr.sbin/unbound/testcode/petal.c
252
if(!SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM))
usr.sbin/unbound/testcode/petal.c
254
if(!SSL_CTX_check_private_key(ctx))
usr.sbin/unbound/testcode/petal.c
257
if (!SSL_CTX_set_ecdh_auto(ctx,1))
usr.sbin/unbound/testcode/petal.c
265
if (1 != SSL_CTX_set_tmp_ecdh (ctx, ecdh)) {
usr.sbin/unbound/testcode/petal.c
272
if(!SSL_CTX_load_verify_locations(ctx, cert, NULL))
usr.sbin/unbound/testcode/petal.c
274
return ctx;
usr.sbin/unbound/testcode/petal.c
310
setup_ssl(int s, SSL_CTX* ctx)
usr.sbin/unbound/testcode/petal.c
312
SSL* ssl = SSL_new(ctx);
usr.sbin/unbound/testcode/streamtcp.c
446
SSL_CTX* ctx = NULL;
usr.sbin/unbound/testcode/streamtcp.c
457
ctx = connect_sslctx_create(NULL, NULL, NULL, 0);
usr.sbin/unbound/testcode/streamtcp.c
458
if(!ctx) fatal_exit("cannot create ssl ctx");
usr.sbin/unbound/testcode/streamtcp.c
459
ssl = outgoing_ssl_fd(ctx, fd);
usr.sbin/unbound/testcode/streamtcp.c
534
SSL_CTX_free(ctx);
usr.sbin/unbound/testcode/unitverify.c
524
EVP_MD_CTX* ctx;
usr.sbin/unbound/testcode/unitverify.c
567
ctx = EVP_MD_CTX_new();
usr.sbin/unbound/testcode/unitverify.c
569
ctx = (EVP_MD_CTX*)malloc(sizeof(*ctx));
usr.sbin/unbound/testcode/unitverify.c
570
if(ctx) EVP_MD_CTX_init(ctx);
usr.sbin/unbound/testcode/unitverify.c
572
if(!ctx) return 0;
usr.sbin/unbound/testcode/unitverify.c
577
EVP_MD_CTX_destroy(ctx);
usr.sbin/unbound/testcode/unitverify.c
579
EVP_MD_CTX_cleanup(ctx);
usr.sbin/unbound/testcode/unitverify.c
580
free(ctx);
usr.sbin/unbound/testcode/unitverify.c
587
if(EVP_DigestInit(ctx, EVP_sha1()) == 0)
usr.sbin/unbound/testcode/unitverify.c
589
if(EVP_DigestVerifyInit(ctx, NULL, EVP_sha1(), NULL, evp_key) == 0)
usr.sbin/unbound/testcode/unitverify.c
600
EVP_MD_CTX_destroy(ctx);
usr.sbin/unbound/testcode/unitverify.c
602
EVP_MD_CTX_cleanup(ctx);
usr.sbin/unbound/testcode/unitverify.c
603
free(ctx);
usr.sbin/unbound/testcode/unitverify.c
612
EVP_MD_CTX_destroy(ctx);
usr.sbin/unbound/testcode/unitverify.c
614
EVP_MD_CTX_cleanup(ctx);
usr.sbin/unbound/testcode/unitverify.c
615
free(ctx);
usr.sbin/unbound/testcode/unitverify.c
621
EVP_MD_CTX_destroy(ctx);
usr.sbin/unbound/testcode/unitverify.c
623
EVP_MD_CTX_cleanup(ctx);
usr.sbin/unbound/testcode/unitverify.c
624
free(ctx);
usr.sbin/unbound/util/net_help.c
1232
SSL_CTX* ctx = (SSL_CTX*)ctxt;
usr.sbin/unbound/util/net_help.c
1235
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2)
usr.sbin/unbound/util/net_help.c
1241
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)
usr.sbin/unbound/util/net_help.c
1248
if((SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1) & SSL_OP_NO_TLSv1)
usr.sbin/unbound/util/net_help.c
1256
if((SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_1) & SSL_OP_NO_TLSv1_1)
usr.sbin/unbound/util/net_help.c
1264
if((SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_2) & SSL_OP_NO_TLSv1_2)
usr.sbin/unbound/util/net_help.c
1272
if((SSL_CTX_set_options(ctx, SSL_OP_NO_RENEGOTIATION) &
usr.sbin/unbound/util/net_help.c
1282
if(!SSL_CTX_set_cipher_list(ctx, "TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-256-GCM-SHA384:TLS13-AES-128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256"))
usr.sbin/unbound/util/net_help.c
1290
if((SSL_CTX_set_options(ctx, SSL_OP_IGNORE_UNEXPECTED_EOF) &
usr.sbin/unbound/util/net_help.c
1297
if((SSL_CTX_set_options(ctx, SSL_OP_CIPHER_SERVER_PREFERENCE) &
usr.sbin/unbound/util/net_help.c
1305
SSL_CTX_set_security_level(ctx, 0);
usr.sbin/unbound/util/net_help.c
1317
SSL_CTX* ctx = (SSL_CTX*)ctxt;
usr.sbin/unbound/util/net_help.c
1318
(void)ctx;
usr.sbin/unbound/util/net_help.c
1320
if(!SSL_CTX_set_ecdh_auto(ctx,1)) {
usr.sbin/unbound/util/net_help.c
1329
if (1 != SSL_CTX_set_tmp_ecdh (ctx, ecdh)) {
usr.sbin/unbound/util/net_help.c
1347
SSL_CTX* ctx = SSL_CTX_new(SSLv23_server_method());
usr.sbin/unbound/util/net_help.c
1348
if(!ctx) {
usr.sbin/unbound/util/net_help.c
1354
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1359
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1362
if(!listen_sslctx_setup(ctx)) {
usr.sbin/unbound/util/net_help.c
1363
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1366
if(!SSL_CTX_use_certificate_chain_file(ctx, pem)) {
usr.sbin/unbound/util/net_help.c
1369
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1372
if(!SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM)) {
usr.sbin/unbound/util/net_help.c
1375
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1378
if(!SSL_CTX_check_private_key(ctx)) {
usr.sbin/unbound/util/net_help.c
1381
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1384
listen_sslctx_setup_2(ctx);
usr.sbin/unbound/util/net_help.c
1386
if(!SSL_CTX_load_verify_locations(ctx, verifypem, NULL)) {
usr.sbin/unbound/util/net_help.c
1388
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1391
SSL_CTX_set_client_CA_list(ctx, SSL_load_client_CA_file(
usr.sbin/unbound/util/net_help.c
1393
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT, NULL);
usr.sbin/unbound/util/net_help.c
1396
if (!SSL_CTX_set_cipher_list(ctx, tls_ciphers)) {
usr.sbin/unbound/util/net_help.c
1400
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1406
if (!SSL_CTX_set_ciphersuites(ctx, tls_ciphersuites)) {
usr.sbin/unbound/util/net_help.c
1410
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1418
if(!setup_ticket_keys_cb(ctx)) {
usr.sbin/unbound/util/net_help.c
1420
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1427
SSL_CTX_set_alpn_select_cb(ctx, dot_alpn_select_cb, NULL);
usr.sbin/unbound/util/net_help.c
1430
SSL_CTX_set_alpn_select_cb(ctx, doh_alpn_select_cb, NULL);
usr.sbin/unbound/util/net_help.c
1434
return ctx;
usr.sbin/unbound/util/net_help.c
1538
SSL_CTX* ctx = SSL_CTX_new(SSLv23_client_method());
usr.sbin/unbound/util/net_help.c
1539
if(!ctx) {
usr.sbin/unbound/util/net_help.c
1544
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2) & SSL_OP_NO_SSLv2)
usr.sbin/unbound/util/net_help.c
1547
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1551
if((SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv3) & SSL_OP_NO_SSLv3)
usr.sbin/unbound/util/net_help.c
1554
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1559
if((SSL_CTX_set_options(ctx, SSL_OP_NO_RENEGOTIATION) &
usr.sbin/unbound/util/net_help.c
1562
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1570
if((SSL_CTX_set_options(ctx, SSL_OP_IGNORE_UNEXPECTED_EOF) &
usr.sbin/unbound/util/net_help.c
1573
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1578
if(!SSL_CTX_use_certificate_chain_file(ctx, pem)) {
usr.sbin/unbound/util/net_help.c
1581
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1584
if(!SSL_CTX_use_PrivateKey_file(ctx, key, SSL_FILETYPE_PEM)) {
usr.sbin/unbound/util/net_help.c
1587
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1590
if(!SSL_CTX_check_private_key(ctx)) {
usr.sbin/unbound/util/net_help.c
1593
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1599
if(!SSL_CTX_load_verify_locations(ctx, verifypem, NULL)) {
usr.sbin/unbound/util/net_help.c
1601
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1607
if(!add_WIN_cacerts_to_openssl_store(ctx)) {
usr.sbin/unbound/util/net_help.c
1609
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1615
if(!SSL_CTX_set_default_verify_paths(ctx)) {
usr.sbin/unbound/util/net_help.c
1617
SSL_CTX_free(ctx);
usr.sbin/unbound/util/net_help.c
1622
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL);
usr.sbin/unbound/util/net_help.c
1624
return ctx;
usr.sbin/unbound/util/netevent.c
2742
doq_socket->ctx = (SSL_CTX*)quic_sslctx;
usr.sbin/unbound/util/netevent.h
1068
void* ctx;
usr.sbin/unbound/util/random.c
177
struct yarrow256_ctx ctx;
usr.sbin/unbound/util/random.c
190
yarrow256_init(&s->ctx, 0, NULL);
usr.sbin/unbound/util/random.c
194
yarrow256_seed(&s->ctx, YARROW256_SEED_FILE_SIZE, buf);
usr.sbin/unbound/util/random.c
195
s->seeded = yarrow256_is_seeded(&s->ctx);
usr.sbin/unbound/util/random.c
213
yarrow256_random(&s->ctx, sizeof(x), (uint8_t *)&x);
usr.sbin/unbound/validator/val_secalgo.c
1509
struct sha1_ctx ctx;
usr.sbin/unbound/validator/val_secalgo.c
1510
sha1_init(&ctx);
usr.sbin/unbound/validator/val_secalgo.c
1511
sha1_update(&ctx, len, buf);
usr.sbin/unbound/validator/val_secalgo.c
1512
sha1_digest(&ctx, SHA1_DIGEST_SIZE, res);
usr.sbin/unbound/validator/val_secalgo.c
1517
struct sha256_ctx ctx;
usr.sbin/unbound/validator/val_secalgo.c
1518
sha256_init(&ctx);
usr.sbin/unbound/validator/val_secalgo.c
1519
sha256_update(&ctx, len, buf);
usr.sbin/unbound/validator/val_secalgo.c
1520
sha256_digest(&ctx, SHA256_DIGEST_SIZE, res);
usr.sbin/unbound/validator/val_secalgo.c
1525
struct sha384_ctx ctx;
usr.sbin/unbound/validator/val_secalgo.c
1526
sha384_init(&ctx);
usr.sbin/unbound/validator/val_secalgo.c
1527
sha384_update(&ctx, len, buf);
usr.sbin/unbound/validator/val_secalgo.c
1528
sha384_digest(&ctx, SHA384_DIGEST_SIZE, res);
usr.sbin/unbound/validator/val_secalgo.c
1533
struct sha512_ctx ctx;
usr.sbin/unbound/validator/val_secalgo.c
1534
sha512_init(&ctx);
usr.sbin/unbound/validator/val_secalgo.c
1535
sha512_update(&ctx, len, buf);
usr.sbin/unbound/validator/val_secalgo.c
1536
sha512_digest(&ctx, SHA512_DIGEST_SIZE, res);
usr.sbin/unbound/validator/val_secalgo.c
164
EVP_MD_CTX* ctx;
usr.sbin/unbound/validator/val_secalgo.c
176
h->ctx = EVP_MD_CTX_create();
usr.sbin/unbound/validator/val_secalgo.c
177
if(!h->ctx) {
usr.sbin/unbound/validator/val_secalgo.c
181
if(!EVP_DigestInit_ex(h->ctx, md, NULL)) {
usr.sbin/unbound/validator/val_secalgo.c
182
EVP_MD_CTX_destroy(h->ctx);
usr.sbin/unbound/validator/val_secalgo.c
201
return EVP_DigestUpdate(hash->ctx, (unsigned char*)data,
usr.sbin/unbound/validator/val_secalgo.c
208
if(EVP_MD_CTX_size(hash->ctx) > (int)maxlen) {
usr.sbin/unbound/validator/val_secalgo.c
213
*resultlen = EVP_MD_CTX_size(hash->ctx);
usr.sbin/unbound/validator/val_secalgo.c
214
return EVP_DigestFinal_ex(hash->ctx, result, NULL);
usr.sbin/unbound/validator/val_secalgo.c
220
EVP_MD_CTX_destroy(hash->ctx);
usr.sbin/unbound/validator/val_secalgo.c
691
digest_ctx_free(EVP_MD_CTX* ctx, EVP_PKEY *evp_key,
usr.sbin/unbound/validator/val_secalgo.c
695
EVP_MD_CTX_destroy(ctx);
usr.sbin/unbound/validator/val_secalgo.c
697
EVP_MD_CTX_cleanup(ctx);
usr.sbin/unbound/validator/val_secalgo.c
698
free(ctx);
usr.sbin/unbound/validator/val_secalgo.c
740
EVP_MD_CTX* ctx;
usr.sbin/unbound/validator/val_secalgo.c
790
ctx = EVP_MD_CTX_new();
usr.sbin/unbound/validator/val_secalgo.c
792
ctx = (EVP_MD_CTX*)malloc(sizeof(*ctx));
usr.sbin/unbound/validator/val_secalgo.c
793
if(ctx) EVP_MD_CTX_init(ctx);
usr.sbin/unbound/validator/val_secalgo.c
795
if(!ctx) {
usr.sbin/unbound/validator/val_secalgo.c
803
if(EVP_DigestInit(ctx, digest_type) == 0) {
usr.sbin/unbound/validator/val_secalgo.c
806
digest_ctx_free(ctx, evp_key, sigblock,
usr.sbin/unbound/validator/val_secalgo.c
810
if(EVP_DigestUpdate(ctx, (unsigned char*)sldns_buffer_begin(buf),
usr.sbin/unbound/validator/val_secalgo.c
814
digest_ctx_free(ctx, evp_key, sigblock,
usr.sbin/unbound/validator/val_secalgo.c
819
res = EVP_VerifyFinal(ctx, sigblock, sigblock_len, evp_key);
usr.sbin/unbound/validator/val_secalgo.c
821
if(EVP_DigestVerifyInit(ctx, NULL, digest_type, NULL, evp_key) == 0) {
usr.sbin/unbound/validator/val_secalgo.c
824
digest_ctx_free(ctx, evp_key, sigblock,
usr.sbin/unbound/validator/val_secalgo.c
828
res = EVP_DigestVerify(ctx, sigblock, sigblock_len,
usr.sbin/unbound/validator/val_secalgo.c
832
digest_ctx_free(ctx, evp_key, sigblock,
usr.sbin/unbound/validator/val_secalgo.c
894
HASHContext* ctx;
usr.sbin/unbound/validator/val_secalgo.c
903
h->ctx = HASH_Create(tp);
usr.sbin/unbound/validator/val_secalgo.c
904
if(!h->ctx) {
usr.sbin/unbound/validator/val_secalgo.c
923
HASH_Update(hash->ctx, (unsigned char*)data, (unsigned int)len);
usr.sbin/unbound/validator/val_secalgo.c
931
if(HASH_ResultLenContext(hash->ctx) > (unsigned int)maxlen) {
usr.sbin/unbound/validator/val_secalgo.c
936
HASH_End(hash->ctx, (unsigned char*)result, &reslen,
usr.sbin/unbound/validator/val_secalgo.c
945
HASH_Destroy(hash->ctx);
usr.sbin/vmd/vm_agentx.c
266
static struct agentx_context *ctx;
usr.sbin/vmd/vm_agentx.c
283
ctx = NULL;
usr.sbin/vmd/vm_agentx.c
294
ctx = NULL;
usr.sbin/vmd/vm_agentx.c
314
agentx_context_free(ctx);
usr.sbin/vmd/vm_agentx.c
317
if ((ctx = agentx_context(sess, context)) == NULL)
usr.sbin/vmd/vm_agentx.c
326
if ((vmMIB = agentx_region(ctx, AGENTX_OID(VMMIB), 1)) == NULL)