From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Badal Nilawar <badal.nilawar@intel.com>,
<intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>, <rodrigo.vivi@intel.com>,
<alexander.usyskin@intel.com>, <michael.j.ruhl@intel.com>
Subject: Re: [RFC PATCH 2/4] drm/xe/xe_late_bind_fw: Add support to load Ocode firmware on CRI
Date: Thu, 5 Mar 2026 15:38:53 -0800 [thread overview]
Message-ID: <de92b0f6-cee9-49ce-a1e2-3a4fc7ac3b7a@intel.com> (raw)
In-Reply-To: <20260305104441.2857181-8-badal.nilawar@intel.com>
On 3/5/2026 2:44 AM, Badal Nilawar wrote:
> Ocode is the OOBMSM telemetry/manageability firmware, and on CRI it is
> loaded through late binding flow.
>
> Signed-off-by: Badal Nilawar <badal.nilawar@intel.com>
> ---
> drivers/gpu/drm/xe/xe_late_bind_fw.c | 49 +++++++++++++++++-----
> drivers/gpu/drm/xe/xe_late_bind_fw_types.h | 2 +
> 2 files changed, 40 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_late_bind_fw.c b/drivers/gpu/drm/xe/xe_late_bind_fw.c
> index 5ca25186dc0cc..d3ef2926517bd 100644
> --- a/drivers/gpu/drm/xe/xe_late_bind_fw.c
> +++ b/drivers/gpu/drm/xe/xe_late_bind_fw.c
> @@ -33,10 +33,12 @@
>
> static const u32 fw_id_to_type[] = {
> [XE_LB_FW_FAN_CONTROL] = INTEL_LB_TYPE_FAN_CONTROL,
> + [XE_LB_FW_OCODE] = INTEL_LB_TYPE_OCODE,
> };
>
> static const char * const fw_id_to_name[] = {
> [XE_LB_FW_FAN_CONTROL] = "fan_control",
> + [XE_LB_FW_OCODE] = "ocode",
> };
>
> static struct xe_device *
> @@ -179,6 +181,34 @@ static const char *xe_late_bind_parse_status(uint32_t status)
> return "Invalid Payload";
> case INTEL_LB_STATUS_TIMEOUT:
> return "Timeout";
> + case INTEL_LB_STATUS_INTERNAL_ERROR:
> + return "Internal Error";
> + case INTEL_LB_STATUS_INVALID_FPT_TABLE:
> + return "Invalid FPT Table";
> + case INTEL_LB_STATUS_SIGNED_PAYLOAD_VERIFICATION_ERROR:
> + return "Signed Payload Verification Error";
> + case INTEL_LB_STATUS_SIGNED_PAYLOAD_INVALID_CPD:
> + return "Signed Payload Invalid CPD";
> + case INTEL_LB_STATUS_SIGNED_PAYLOAD_FW_VERSION_MISMATCH:
> + return "Signed Payload FW Version Mismatch";
> + case INTEL_LB_STATUS_SIGNED_PAYLOAD_INVALID_MANIFEST:
> + return "Signed Payload Invalid Manifest";
> + case INTEL_LB_STATUS_SIGNED_PAYLOAD_INVALID_HASH:
> + return "Signed Payload Invalid Hash";
> + case INTEL_LB_STATUS_SIGNED_PAYLOAD_BINDING_TYPE_MISMATCH:
> + return "Signed Payload Binding type Mismatch";
> + case INTEL_LB_STATUS_SIGNED_PAYLOAD_HANDLE_SVN_FAILED:
> + return "Signed Payload Handle SVN Failed";
> + case INTEL_LB_STATUS_DESTINATION_MBOX_FAILURE:
> + return "Destination MBOX Failure";
> + case INTEL_LB_STATUS_MISSING_LOADING_PATCH:
> + return "Missing Loading Patch";
> + case INTEL_LB_STATUS_INVALID_COMMAND:
> + return "Invalid Command";
> + case INTEL_LB_STATUS_INVALID_HECI_HEADER:
> + return "Invalid HECI Header";
> + case INTEL_LB_STATUS_IP_ERROR_START:
> + return "IP Error Start";
> default:
> return "Unknown error";
> }
> @@ -264,7 +294,6 @@ static void xe_late_bind_work(struct work_struct *work)
> /* Do not re-attempt fw load */
> drmm_kfree(&xe->drm, (void *)lbfw->payload);
> lbfw->payload = NULL;
> -
I think it'd better to keep an empty line before the "out" label.
> out:
> xe_pm_runtime_put(xe);
> }
> @@ -314,9 +343,14 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id)
> return 0;
> }
>
> - snprintf(lb_fw->blob_path, sizeof(lb_fw->blob_path), "xe/%s_8086_%04x_%04x_%04x.bin",
> - fw_id_to_name[lb_fw->id], pdev->device,
> - pdev->subsystem_vendor, pdev->subsystem_device);
> + if (lb_fw->type == INTEL_LB_TYPE_OCODE) {
> + snprintf(lb_fw->blob_path, sizeof(lb_fw->blob_path), "xe/%s_8086_%04x.bin",
> + fw_id_to_name[lb_fw->id], pdev->device);
Are we expecting different ocodes for each PCI id? if not, we could name
this like the other fw binaries as <platform>_ocode.bin (e.g.,
cri_ocode.bin)
> + } else {
> + snprintf(lb_fw->blob_path, sizeof(lb_fw->blob_path), "xe/%s_8086_%04x_%04x_%04x.bin",
> + fw_id_to_name[lb_fw->id], pdev->device,
> + pdev->subsystem_vendor, pdev->subsystem_device);
> + }
>
> drm_dbg(&xe->drm, "Request late binding firmware %s\n", lb_fw->blob_path);
> ret = firmware_request_nowarn(&fw, lb_fw->blob_path, xe->drm.dev);
> @@ -326,13 +360,6 @@ static int __xe_late_bind_fw_init(struct xe_late_bind *late_bind, u32 fw_id)
> return 0;
> }
>
> - if (fw->size > XE_LB_MAX_PAYLOAD_SIZE) {
> - drm_err(&xe->drm, "Firmware %s size %zu is larger than max pay load size %u\n",
> - lb_fw->blob_path, fw->size, XE_LB_MAX_PAYLOAD_SIZE);
> - release_firmware(fw);
> - return -ENODATA;
> - }
Why is this check being removed? is MEI/CSC now going to accept bigger
payloads?
> -
> ret = parse_lb_layout(lb_fw, fw->data, fw->size, "LTES");
> if (ret)
> return ret;
> diff --git a/drivers/gpu/drm/xe/xe_late_bind_fw_types.h b/drivers/gpu/drm/xe/xe_late_bind_fw_types.h
> index 2a8a985c37e71..a128e3f638a6c 100644
> --- a/drivers/gpu/drm/xe/xe_late_bind_fw_types.h
> +++ b/drivers/gpu/drm/xe/xe_late_bind_fw_types.h
> @@ -20,6 +20,8 @@
> enum xe_late_bind_fw_id {
> /** @XE_LB_FW_FAN_CONTROL: Fan control */
> XE_LB_FW_FAN_CONTROL = 0,
> + /** @XE_LB_FW_OCODE: Ocode firmware */
> + XE_LB_FW_OCODE,
This will now automatically look for ocode for bmg as well. not an
issue, but potentially noise in dmesg. Maybe we could change
has_late_bind to be a mask of supported fw types? that way we can set it
to BIT(XE_LB_FW_FAN_CONTROL) on BMG and BIT(XE_LB_FW_OCODE) on CRI and
skip the FW type if not set in the mask. Not a blocker.
Daniele
> /** @XE_LB_FW_MAX_ID: Number of IDs */
> XE_LB_FW_MAX_ID
> };
next prev parent reply other threads:[~2026-03-05 23:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 10:44 [RFC PATCH 0/4] Add ocode late binding support for CRI Badal Nilawar
2026-03-05 10:44 ` [RFC PATCH 1/4] drm/xe/xe_late_bind_fw: Refactor pm flow Badal Nilawar
2026-03-05 14:20 ` Rodrigo Vivi
2026-03-05 10:44 ` [RFC PATCH 2/4] drm/xe/xe_late_bind_fw: Add support to load Ocode firmware on CRI Badal Nilawar
2026-03-05 23:38 ` Daniele Ceraolo Spurio [this message]
2026-03-05 10:44 ` [RFC PATCH 3/4] drm/xe/xe_late_bind_fw: Track firmware load status Badal Nilawar
2026-03-05 23:52 ` Daniele Ceraolo Spurio
2026-03-05 10:44 ` [RFC PATCH 4/4] drm/xe/xe_late_bind_fw: Enable late binding support for CRI Badal Nilawar
2026-03-06 11:26 ` ✗ CI.KUnit: failure for Add ocode " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=de92b0f6-cee9-49ce-a1e2-3a4fc7ac3b7a@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=alexander.usyskin@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=michael.j.ruhl@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox