diff options
Diffstat (limited to 'kernel/gsp_phys_booter.c')
| -rw-r--r-- | kernel/gsp_phys_booter.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 8a27edf..af91968 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -9183,7 +9183,8 @@ static int gsp_phys_rmcall_srv_ctx_commit(void __iomem *bar0) * PA-only. */ if (!boot_stage.rmcall_srv_ctxva || - boot_stage.rmcall_srv_ctxva_client) { + (boot_stage.rmcall_srv_ctxva_client && + gsp_phys_srv_ctxcommit_mode() != 2)) { ic = kvzalloc(sizeof(*ic), GFP_KERNEL); if (!ic) return -ENOMEM; @@ -9259,6 +9260,25 @@ static int gsp_phys_rmcall_srv_ctx_commit(void __iomem *bar0) if (boot_stage.rmcall_srv_ctxva) { u32 n = 0; + if (boot_stage.rmcall_srv_ctxva_client && + gsp_phys_srv_ctxcommit_mode() == 2) { + /* + * V6 client variant: one combined PA+VA MAIN entry with + * bInitialize=1 and bNonmapped=0 (the init half plus the + * promote half of kgrobjPromoteContext) and no separate + * INITIALIZE_CTX, so the first ctxsw initializes the + * context from the golden image instead of restoring the + * zeroed client image. + */ + gsp_phys_rmcall_promote_entry_fill(p, n++, 0, + main_pa, boot_stage.rmcall_ctx_va, + main_size, pa_attr, 1, 0); + p->entry_count = cpu_to_le32(n); + pr_info("vgsp-boot: rm-call: V6 client combined MAIN entry: pa=0x%llx va=0x%llx size=0x%llx attr=0x%x bInitialize=1 bNonmapped=0\n", + main_pa, boot_stage.rmcall_ctx_va, + main_size, pa_attr); + goto gr_promote_send; + } if (boot_stage.rmcall_srv_patch_valid) gsp_phys_rmcall_promote_entry_fill(p, n++, 2, 0, GSP_PHYS_RMCALL_VA_GR_PATCH, @@ -9280,6 +9300,7 @@ static int gsp_phys_rmcall_srv_ctx_commit(void __iomem *bar0) main_pa, 0, main_size, pa_attr, 1, 1); p->entry_count = cpu_to_le32(1); } +gr_promote_send: rpc_result = 0; status = 0; ret = gsp_phys_rmcall_control(bar0, boot_stage.rmcall_subdevice, |
