Lines Matching full:pxp
21 is_fw_err_platform_config(struct intel_pxp *pxp, u32 type) in is_fw_err_platform_config() argument
27 pxp->platform_cfg_is_bad = true; in is_fw_err_platform_config()
53 gsccs_send_message(struct intel_pxp *pxp, in gsccs_send_message() argument
59 struct intel_gt *gt = pxp->ctrl_gt; in gsccs_send_message()
61 struct gsccs_session_resources *exec_res = &pxp->gsccs_res; in gsccs_send_message()
81 mutex_lock(&pxp->tee_mutex); in gsccs_send_message()
117 drm_err(&i915->drm, "failed to send gsc PXP msg (%d)\n", ret); in gsccs_send_message()
123 drm_err(&i915->drm, "gsc PXP reply with invalid validity marker\n"); in gsccs_send_message()
128 drm_dbg(&i915->drm, "gsc PXP reply status has error = 0x%08x\n", in gsccs_send_message()
134 drm_dbg(&i915->drm, "gsc PXP reply is busy\n"); in gsccs_send_message()
148 drm_warn(&i915->drm, "caller with insufficient PXP reply size %u (%zu)\n", in gsccs_send_message()
160 mutex_unlock(&pxp->tee_mutex); in gsccs_send_message()
165 gsccs_send_message_retry_complete(struct intel_pxp *pxp, in gsccs_send_message_retry_complete() argument
179 ret = gsccs_send_message(pxp, msg_in, msg_in_size, msg_out, msg_out_size_max, in gsccs_send_message_retry_complete()
191 bool intel_pxp_gsccs_is_ready_for_sessions(struct intel_pxp *pxp) in intel_pxp_gsccs_is_ready_for_sessions() argument
196 * must all occur first before we can start requesting for PXP in intel_pxp_gsccs_is_ready_for_sessions()
201 if (intel_huc_is_authenticated(&pxp->ctrl_gt->uc.huc, INTEL_HUC_AUTH_BY_GSC) && in intel_pxp_gsccs_is_ready_for_sessions()
202 intel_gsc_uc_fw_proxy_init_done(&pxp->ctrl_gt->uc.gsc, true)) in intel_pxp_gsccs_is_ready_for_sessions()
208 int intel_pxp_gsccs_create_session(struct intel_pxp *pxp, in intel_pxp_gsccs_create_session() argument
211 struct drm_i915_private *i915 = pxp->ctrl_gt->i915; in intel_pxp_gsccs_create_session()
224 ret = gsccs_send_message_retry_complete(pxp, in intel_pxp_gsccs_create_session()
230 if (is_fw_err_platform_config(pxp, msg_out.header.status)) { in intel_pxp_gsccs_create_session()
232 "PXP init-session-%d failed due to BIOS/SOC:0x%08x:%s\n", in intel_pxp_gsccs_create_session()
236 drm_dbg(&i915->drm, "PXP init-session-%d failed 0x%08x:%st:\n", in intel_pxp_gsccs_create_session()
247 void intel_pxp_gsccs_end_arb_fw_session(struct intel_pxp *pxp, u32 session_id) in intel_pxp_gsccs_end_arb_fw_session() argument
249 struct drm_i915_private *i915 = pxp->ctrl_gt->i915; in intel_pxp_gsccs_end_arb_fw_session()
266 ret = gsccs_send_message_retry_complete(pxp, in intel_pxp_gsccs_end_arb_fw_session()
273 if (is_fw_err_platform_config(pxp, msg_out.header.status)) { in intel_pxp_gsccs_end_arb_fw_session()
275 "PXP inv-stream-key-%u failed due to BIOS/SOC :0x%08x:%s\n", in intel_pxp_gsccs_end_arb_fw_session()
279 drm_dbg(&i915->drm, "PXP inv-stream-key-%u failed 0x%08x:%s:\n", in intel_pxp_gsccs_end_arb_fw_session()
289 gsccs_cleanup_fw_host_session_handle(struct intel_pxp *pxp) in gsccs_cleanup_fw_host_session_handle() argument
291 struct drm_i915_private *i915 = pxp->ctrl_gt->i915; in gsccs_cleanup_fw_host_session_handle()
294 ret = gsccs_send_message_retry_complete(pxp, NULL, 0, NULL, 0, NULL); in gsccs_cleanup_fw_host_session_handle()
301 gsccs_destroy_execution_resource(struct intel_pxp *pxp) in gsccs_destroy_execution_resource() argument
303 struct gsccs_session_resources *exec_res = &pxp->gsccs_res; in gsccs_destroy_execution_resource()
306 gsccs_cleanup_fw_host_session_handle(pxp); in gsccs_destroy_execution_resource()
348 /* all PXP sessions commands are treated as non-privileged */ in gsccs_create_buffer()
369 gsccs_allocate_execution_resource(struct intel_pxp *pxp) in gsccs_allocate_execution_resource() argument
371 struct intel_gt *gt = pxp->ctrl_gt; in gsccs_allocate_execution_resource()
372 struct gsccs_session_resources *exec_res = &pxp->gsccs_res; in gsccs_allocate_execution_resource()
389 err = gsccs_create_buffer(pxp->ctrl_gt, "Heci Packet", in gsccs_allocate_execution_resource()
395 err = gsccs_create_buffer(pxp->ctrl_gt, "Batch Buffer", PAGE_SIZE, in gsccs_allocate_execution_resource()
409 ce->vm = i915_vm_get(pxp->ctrl_gt->vm); in gsccs_allocate_execution_resource()
412 /* initialize host-session-handle (for all i915-to-gsc-firmware PXP cmds) */ in gsccs_allocate_execution_resource()
426 void intel_pxp_gsccs_fini(struct intel_pxp *pxp) in intel_pxp_gsccs_fini() argument
430 gsccs_destroy_execution_resource(pxp); in intel_pxp_gsccs_fini()
431 with_intel_runtime_pm(&pxp->ctrl_gt->i915->runtime_pm, wakeref) in intel_pxp_gsccs_fini()
432 intel_pxp_fini_hw(pxp); in intel_pxp_gsccs_fini()
435 int intel_pxp_gsccs_init(struct intel_pxp *pxp) in intel_pxp_gsccs_init() argument
440 ret = gsccs_allocate_execution_resource(pxp); in intel_pxp_gsccs_init()
442 with_intel_runtime_pm(&pxp->ctrl_gt->i915->runtime_pm, wakeref) in intel_pxp_gsccs_init()
443 intel_pxp_init_hw(pxp); in intel_pxp_gsccs_init()