summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_phys_booter.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index 53932d4..8cc09e4 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -16164,12 +16164,14 @@ static void gsp_phys_gr_rewrite_data_vars(u32 *w, u32 n_words,
if (!req->n_data_wins)
return;
- for (k = 0; k + 1 < n_words; k += 2) {
+ /* Scan every 4-byte boundary: the demo's bank-4 base pointer sits at
+ * a 4-aligned (not 8-aligned) offset, which an 8-stride scan misses. */
+ for (k = 0; k + 1 < n_words; k++) {
u64 v = (u64)w[k] | ((u64)w[k + 1] << 32);
u64 wb;
u32 x;
- if (v < 0x10000000ULL || v >= (1ULL << 47) || (v & 7))
+ if (v < 0x10000000ULL || v >= (1ULL << 47) || (v & 3))
continue;
wb = v & ~0x1fffffULL;
for (x = 0; x < req->n_data_wins; x++) {
@@ -16574,6 +16576,16 @@ int gsp_phys_backend_guest_gr_submit(const struct gsp_phys_gr_submit *req,
w[6], w[7], w[8], w[9], w[10], w[11],
w[12], w[13], w[14], w[15]);
}
+ if (pg->hpa && pg->qmd_word > 32u && pg->qmd_word <= 46u &&
+ !(pg->qmd_word & 1)) {
+ const u32 *w = (const u32 *)sh_page;
+
+ pr_info("vgsp-gr: bank%u page: %08x %08x %08x %08x %08x %08x %08x %08x | %08x %08x %08x %08x %08x %08x %08x %08x\n",
+ (pg->qmd_word - 32u) / 2u,
+ w[0], w[1], w[2], w[3], w[4], w[5],
+ w[6], w[7], w[8], w[9], w[10], w[11],
+ w[12], w[13], w[14], w[15]);
+ }
for (j = 0; j < req->n_inl; j++) {
const struct gsp_phys_gr_inline *inl =
&req->inl[j];