Lines Matching full:proxy
20 * GSC proxy:
24 * and back. i915 must manually start the proxy flow after the GSC is loaded to
28 * The proxy flow is as follow:
30 * 2 - GSC replies with the proxy header + payload for CSME
31 * 3 - i915 sends the reply from GSC as-is to CSME via the mei proxy component
32 * 4 - CSME replies with the proxy header + payload for GSC
49 /* FW-defined proxy header */
53 * Bits 0-7: type of the proxy message (see enum intel_gsc_proxy_type)
55 * Bits 16-31: length in bytes of the payload following the proxy header
61 u32 source; /* Source of the Proxy message */
62 u32 destination; /* Destination of the Proxy message */
70 /* FW-defined proxy types */
87 struct i915_gsc_proxy_component *comp = gsc->proxy.component; in proxy_send_to_csme()
89 void *in = gsc->proxy.to_csme; in proxy_send_to_csme()
90 void *out = gsc->proxy.to_gsc; in proxy_send_to_csme()
94 /* CSME msg only includes the proxy */ in proxy_send_to_csme()
101 /* the message must contain at least the proxy header */ in proxy_send_to_csme()
126 u32 *marker = gsc->proxy.to_csme; /* first dw of the reply header */ in proxy_send_to_gsc()
127 u64 addr_in = i915_ggtt_offset(gsc->proxy.vma); in proxy_send_to_gsc()
129 u32 size = ((struct gsc_proxy_msg *)gsc->proxy.to_gsc)->header.message_size; in proxy_send_to_gsc()
132 /* the message must contain at least the gsc and proxy headers */ in proxy_send_to_gsc()
134 gt_err(gt, "Invalid GSC proxy message size: %u\n", size); in proxy_send_to_gsc()
152 gt_err(gt, "Failed to get a proxy reply from gsc\n"); in proxy_send_to_gsc()
189 struct gsc_proxy_msg *to_gsc = gsc->proxy.to_gsc; in proxy_query()
190 struct gsc_proxy_msg *to_csme = gsc->proxy.to_csme; in proxy_query()
208 memset(gsc->proxy.to_csme, 0, sizeof(struct gsc_proxy_msg)); in proxy_query()
210 /* send proxy message to GSC */ in proxy_query()
213 gt_err(gt, "failed to send proxy message to GSC! %d\n", ret); in proxy_query()
222 /* make sure the GSC-to-CSME proxy header is sane */ in proxy_query()
227 gt_err(gt, "invalid GSC to CSME proxy header! %d\n", ret); in proxy_query()
234 gt_err(gt, "failed to send proxy message to CSME! %d\n", ret); in proxy_query()
241 /* make sure the CSME-to-GSC proxy header is sane */ in proxy_query()
246 gt_err(gt, "invalid CSME to GSC proxy header! %d\n", ret); in proxy_query()
260 if (!gsc->proxy.component_added) in intel_gsc_proxy_request_handler()
266 err = wait_for(gsc->proxy.component, GSC_PROXY_INIT_TIMEOUT_MS); in intel_gsc_proxy_request_handler()
268 gt_err(gt, "GSC proxy component didn't bind within the expected timeout\n"); in intel_gsc_proxy_request_handler()
272 mutex_lock(&gsc->proxy.mutex); in intel_gsc_proxy_request_handler()
273 if (!gsc->proxy.component) { in intel_gsc_proxy_request_handler()
274 gt_err(gt, "GSC proxy worker called without the component being bound!\n"); in intel_gsc_proxy_request_handler()
278 * write the status bit to clear it and allow new proxy in intel_gsc_proxy_request_handler()
286 mutex_unlock(&gsc->proxy.mutex); in intel_gsc_proxy_request_handler()
299 if (!gsc->proxy.component) { in intel_gsc_proxy_irq_handler()
300 gt_err(gt, "GSC proxy irq received without the component being bound!\n"); in intel_gsc_proxy_irq_handler()
321 mutex_lock(&gsc->proxy.mutex); in i915_gsc_proxy_component_bind()
322 gsc->proxy.component = data; in i915_gsc_proxy_component_bind()
323 gsc->proxy.component->mei_dev = mei_kdev; in i915_gsc_proxy_component_bind()
324 mutex_unlock(&gsc->proxy.mutex); in i915_gsc_proxy_component_bind()
325 gt_dbg(gt, "GSC proxy mei component bound\n"); in i915_gsc_proxy_component_bind()
338 mutex_lock(&gsc->proxy.mutex); in i915_gsc_proxy_component_unbind()
339 gsc->proxy.component = NULL; in i915_gsc_proxy_component_unbind()
340 mutex_unlock(&gsc->proxy.mutex); in i915_gsc_proxy_component_unbind()
346 gt_dbg(gt, "GSC proxy mei component unbound\n"); in i915_gsc_proxy_component_unbind()
366 gsc->proxy.vma = vma; in proxy_channel_alloc()
367 gsc->proxy.to_gsc = vaddr; in proxy_channel_alloc()
368 gsc->proxy.to_csme = vaddr + GSC_PROXY_BUFFER_SIZE; in proxy_channel_alloc()
375 if (!gsc->proxy.vma) in proxy_channel_free()
378 gsc->proxy.to_gsc = NULL; in proxy_channel_free()
379 gsc->proxy.to_csme = NULL; in proxy_channel_free()
380 i915_vma_unpin_and_release(&gsc->proxy.vma, I915_VMA_RELEASE_MAP); in proxy_channel_free()
388 if (fetch_and_zero(&gsc->proxy.component_added)) in intel_gsc_proxy_fini()
400 mutex_init(&gsc->proxy.mutex); in intel_gsc_proxy_init()
403 gt_info(gt, "can't init GSC proxy due to missing mei component\n"); in intel_gsc_proxy_init()
418 gsc->proxy.component_added = true; in intel_gsc_proxy_init()