From: Alexander Usyskin <alexander.usyskin@intel.com>
To: "Miquel Raynal" <miquel.raynal@bootlin.com>,
"Richard Weinberger" <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
Menachem Adin <menachem.adin@intel.com>,
Alexander Usyskin <alexander.usyskin@intel.com>
Subject: [PATCH v3 2/2] drm/xe/nvm: define survivabilty partition
Date: Wed, 30 Sep 2026 17:14:47 +0300 [thread overview]
Message-ID: <20260930-cri_surviv-v3-2-357aeed5fc60@intel.com> (raw)
In-Reply-To: <20260930-cri_surviv-v3-0-357aeed5fc60@intel.com>
Define 8M survivability partition for CRI when
storage is open for write override.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
---
drivers/gpu/drm/xe/xe_nvm.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_nvm.c b/drivers/gpu/drm/xe/xe_nvm.c
index 51a1a431ad85..783c3103a8a4 100644
--- a/drivers/gpu/drm/xe/xe_nvm.c
+++ b/drivers/gpu/drm/xe/xe_nvm.c
@@ -56,10 +56,11 @@ static bool xe_nvm_non_posted_erase(struct xe_device *xe)
}
}
-static bool xe_nvm_writable_override(struct xe_device *xe)
+static bool xe_nvm_writable_override(struct xe_device *xe, size_t *survivability_size)
{
struct xe_mmio *mmio = xe_root_tile_mmio(xe);
bool writable_override;
+ size_t s_size = 0;
struct xe_reg reg;
u32 test_bit, test_val;
@@ -68,6 +69,7 @@ static bool xe_nvm_writable_override(struct xe_device *xe)
reg = PCODE_SCRATCH(0);
test_bit = FDO_MODE;
test_val = FDO_MODE;
+ s_size = SZ_8M;
break;
case XE_BATTLEMAGE:
reg = HECI_FWSTS2(DG2_GSC_HECI2_BASE);
@@ -91,12 +93,17 @@ static bool xe_nvm_writable_override(struct xe_device *xe)
break;
default:
drm_err(&xe->drm, "Unknown platform\n");
+ *survivability_size = 0;
return true;
}
writable_override = (xe_mmio_read32(mmio, reg) & test_bit) == test_val;
- if (writable_override)
+ if (writable_override) {
drm_info(&xe->drm, "NVM access overridden by jumper\n");
+ *survivability_size = s_size;
+ } else {
+ *survivability_size = 0;
+ }
return writable_override;
}
@@ -143,7 +150,7 @@ int xe_nvm_init(struct xe_device *xe)
if (!nvm)
return -ENOMEM;
- nvm->writable_override = xe_nvm_writable_override(xe);
+ nvm->writable_override = xe_nvm_writable_override(xe, &nvm->survivability_size);
nvm->non_posted_erase = xe_nvm_non_posted_erase(xe);
nvm->bar.parent = &pdev->resource[0];
nvm->bar.start = GEN12_GUNIT_NVM_BASE + pdev->resource[0].start;
--
2.53.0
prev parent reply other threads:[~2026-09-30 14:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 14:14 [PATCH v3 0/2] drm/xe/nvm: add survivabilty partiton Alexander Usyskin
2026-09-30 14:14 ` [PATCH v3 1/2] mtd: mtd_intel_dg: add survivability partition Alexander Usyskin
2026-09-30 14:14 ` Alexander Usyskin [this message]
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=20260930-cri_surviv-v3-2-357aeed5fc60@intel.com \
--to=alexander.usyskin@intel.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=matthew.brost@intel.com \
--cc=menachem.adin@intel.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@linux.intel.com \
--cc=vigneshr@ti.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
all inboxes | Powered by JetHome®