diff options
| -rw-r--r-- | kernel/gsp_phys_booter.c | 53 | ||||
| -rw-r--r-- | tools/guest-diag/params-r1624.txt | 1 |
2 files changed, 53 insertions, 1 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 13aedf9..395b026 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -19225,7 +19225,8 @@ static u32 gsp_phys_gr_vs_score(const u8 *p) static u32 gsp_phys_gr_vs_scan(const struct gsp_phys_gr_submit *req, u64 *base_va, u32 *off_out) { - u32 i, off, best = 0; + const u8 *best_p = NULL; + u32 best_off = 0, i, off, best = 0; if (!req || !req->n_data || !req->data) return 0; @@ -19257,6 +19258,8 @@ static u32 gsp_phys_gr_vs_scan(const struct gsp_phys_gr_submit *req, * MME-CARRY-ABORT rc=-42). */ best = sc; + best_p = p + off; + best_off = off; *base_va = va + off; *off_out = off; } @@ -19265,6 +19268,27 @@ static u32 gsp_phys_gr_vs_scan(const struct gsp_phys_gr_submit *req, if (best >= 8u) { pr_info("vgsp-gr: VS-SCAN base=0x%llx off=0x%x score=%u (24x20 B float2)\n", (unsigned long long)*base_va, *off_out, best); + if (best_p) { + pr_info("vgsp-gr: VS-BLOB w0..15=%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\n", + get_unaligned_le32(best_p), + get_unaligned_le32(best_p + 4), + get_unaligned_le32(best_p + 8), + get_unaligned_le32(best_p + 12), + get_unaligned_le32(best_p + 16), + get_unaligned_le32(best_p + 20), + get_unaligned_le32(best_p + 24), + get_unaligned_le32(best_p + 28), + get_unaligned_le32(best_p + 32), + get_unaligned_le32(best_p + 36), + get_unaligned_le32(best_p + 40), + get_unaligned_le32(best_p + 44), + get_unaligned_le32(best_p + 48), + get_unaligned_le32(best_p + 52), + get_unaligned_le32(best_p + 56), + get_unaligned_le32(best_p + 60)); + pr_info("vgsp-gr: VS-DRAW range=%u..%u bytes (starts 0,3,..,21 * stride 20)\n", + 0u, 21u * 20u + 8u); + } return 1; } pr_info("vgsp-gr: VS-SCAN no candidate (best=%u)\n", best); @@ -28375,6 +28399,14 @@ static u64 gsp_phys_gr_wit_va[GSP_PHYS_GR_WIT_MAX]; static u64 gsp_phys_gr_wit_csum[GSP_PHYS_GR_WIT_MAX]; static u64 gsp_phys_gr_wit_first8[GSP_PHYS_GR_WIT_MAX]; static u32 gsp_phys_gr_wit_n; +/* eng74: surface alias pages (guest VA + HPA) for the GUEST-WIT. The + * surface alias scan maps the RT once per boot; the launch WIT capture + * re-notes these pages so an RT store is visible on every launch. */ +#define GSP_PHYS_GR_SURF_WIT_MAX 2048u +static u64 gsp_phys_gr_surf_wit_va[GSP_PHYS_GR_SURF_WIT_MAX]; +static u64 gsp_phys_gr_surf_wit_pa[GSP_PHYS_GR_SURF_WIT_MAX]; +static u32 gsp_phys_gr_surf_wit_n; + static u32 gsp_phys_gr_wit_rep_log; /* @@ -28457,6 +28489,15 @@ static void gsp_phys_gr_wit_capture(const struct gsp_phys_gr_submit *req) gsp_phys_gr_wit_note(ava, ahpa); } } + /* eng74: the big-surface alias pages recorded at map time */ + { + u32 si, sn = READ_ONCE(gsp_phys_gr_surf_wit_n); + + for (si = 0; si < sn && si < GSP_PHYS_GR_SURF_WIT_MAX; si++) + gsp_phys_gr_wit_note( + READ_ONCE(gsp_phys_gr_surf_wit_va[si]), + READ_ONCE(gsp_phys_gr_surf_wit_pa[si])); + } for (k = 0; k < gsp_phys_gr_gap_n; k++) gsp_phys_gr_wit_note(gsp_phys_gr_gap[k].va, gsp_phys_gr_gap[k].hpa); @@ -30385,6 +30426,16 @@ static bool gsp_phys_gr_surface_alias_locked(const struct gsp_phys_gr_submit *re lip + j) * 8); + /* eng74: keep the RT pages for the WIT */ + if (k < npages && + gsp_phys_gr_surf_wit_n < + GSP_PHYS_GR_SURF_WIT_MAX) { + gsp_phys_gr_surf_wit_va[gsp_phys_gr_surf_wit_n] = + pv; + gsp_phys_gr_surf_wit_pa[gsp_phys_gr_surf_wit_n] = + hpa; + gsp_phys_gr_surf_wit_n++; + } } dma_wmb(); } diff --git a/tools/guest-diag/params-r1624.txt b/tools/guest-diag/params-r1624.txt index accec65..3311100 100644 --- a/tools/guest-diag/params-r1624.txt +++ b/tools/guest-diag/params-r1624.txt @@ -9,3 +9,4 @@ sema_gl_mme_pack_carry=1 sema_gl_mme_pack_carry_ms=100 sema_gl_mme_pack_release= sema_gl_sph_stage_disable=0x04 sema_gl_viewport=1 sema_gl_vs_autobind=2 + sema_gl_wit_shown=40 |
