Lines Matching refs:proxy
29 * GSC proxy:
33 * GSC to CSME and back. The proxy flow must be manually started after the GSC
37 * The proxy flow is as follow:
39 * 2 - GSC replies with the proxy header + payload for CSME
40 * 3 - Xe sends the reply from GSC as-is to CSME via the mei proxy component
41 * 4 - CSME replies with the proxy header + payload for GSC
113 struct i915_gsc_proxy_component *comp = gsc->proxy.component;
116 ret = comp->ops->send(comp->mei_dev, gsc->proxy.to_csme, size);
118 xe_gt_err(gt, "Failed to send CSME proxy message\n");
122 ret = comp->ops->recv(comp->mei_dev, gsc->proxy.from_csme, GSC_PROXY_BUFFER_SIZE);
124 xe_gt_err(gt, "Failed to receive CSME proxy message\n");
134 u64 addr_in = xe_bo_ggtt_addr(gsc->proxy.bo);
138 /* the message must contain at least the gsc and proxy headers */
140 xe_gt_err(gt, "Invalid GSC proxy message size: %u\n", size);
147 xe_gt_err(gt, "Failed to submit gsc proxy rq (%pe)\n", ERR_PTR(err));
193 "GSC proxy error: s=0x%x[0x%x], d=0x%x[0x%x], t=%u, l=0x%x, st=0x%x\n",
225 struct xe_gsc_proxy_header *to_csme_hdr = gsc->proxy.to_csme;
226 void *to_csme_payload = gsc->proxy.to_csme + PROXY_HDR_SIZE;
232 wr_offset = xe_gsc_emit_header(xe, &gsc->proxy.to_gsc, 0,
234 wr_offset = emit_proxy_header(xe, &gsc->proxy.to_gsc, wr_offset);
243 xe_gsc_poison_header(xe, &gsc->proxy.from_gsc, 0);
245 /* send proxy message to GSC */
251 ret = xe_gsc_read_out_header(xe, &gsc->proxy.from_gsc, 0,
254 xe_gt_err(gt, "Invalid gsc header in proxy reply (%pe)\n",
259 /* copy the proxy header reply from GSC */
260 xe_map_memcpy_from(xe, to_csme_hdr, &gsc->proxy.from_gsc,
272 /* make sure the GSC-to-CSME proxy header is sane */
278 xe_gt_err(gt, "invalid GSC to CSME proxy header! (%pe)\n",
285 xe_map_memcpy_from(xe, to_csme_payload, &gsc->proxy.from_gsc,
293 /* reply size from CSME, including the proxy header */
296 xe_gt_err(gt, "CSME to GSC proxy msg too small: 0x%x\n", size);
301 /* make sure the CSME-to-GSC proxy header is sane */
302 ret = validate_proxy_header(gt, gsc->proxy.from_csme,
307 xe_gt_err(gt, "invalid CSME to GSC proxy header! %d\n", ret);
312 wr_offset = xe_gsc_emit_header(xe, &gsc->proxy.to_gsc, 0,
316 xe_map_memcpy_to(xe, &gsc->proxy.to_gsc, wr_offset, gsc->proxy.from_csme, size);
331 if (!gsc->proxy.component_added)
336 if (gsc->proxy.component)
342 mutex_lock(&gsc->proxy.mutex);
343 if (!gsc->proxy.component) {
344 xe_gt_err(gt, "GSC proxy component not bound!\n");
348 * clear the pending interrupt and allow new proxy requests to
354 mutex_unlock(&gsc->proxy.mutex);
365 if (!gsc->proxy.component) {
366 xe_gt_err(gt, "GSC proxy irq received without the component being bound!\n");
384 mutex_lock(&gsc->proxy.mutex);
385 gsc->proxy.component = data;
386 gsc->proxy.component->mei_dev = mei_kdev;
387 mutex_unlock(&gsc->proxy.mutex);
401 mutex_lock(&gsc->proxy.mutex);
402 gsc->proxy.component = NULL;
403 mutex_unlock(&gsc->proxy.mutex);
429 gsc->proxy.bo = bo;
430 gsc->proxy.to_gsc = IOSYS_MAP_INIT_OFFSET(&bo->vmap, 0);
431 gsc->proxy.from_gsc = IOSYS_MAP_INIT_OFFSET(&bo->vmap, GSC_PROXY_BUFFER_SIZE);
432 gsc->proxy.to_csme = csme;
433 gsc->proxy.from_csme = csme + GSC_PROXY_BUFFER_SIZE;
445 if (!gsc->proxy.component_added)
463 gsc->proxy.component_added = false;
467 * xe_gsc_proxy_init() - init objects and MEI component required by GSC proxy
479 mutex_init(&gsc->proxy.mutex);
482 xe_gt_info(gt, "can't init GSC proxy due to missing mei component\n");
488 xe_gt_err(gt, "unexpected GSC proxy init on tile %u\n", tile->id);
503 gsc->proxy.component_added = true;
509 * xe_gsc_proxy_start() - start the proxy by submitting the first request
512 * Return: 0 if the proxy are now enabled, a negative errno otherwise.
518 /* enable the proxy interrupt in the GSC shim layer */
522 * The handling of the first proxy request must be manually triggered to
523 * notify the GSC that we're ready to support the proxy flow.
530 xe_gt_err(gsc_to_gt(gsc), "GSC FW reports proxy init not completed\n");