summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/gsp_phys_booter.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index b5ec52b..920ccdb 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -236,7 +236,14 @@ bool gsp_phys_boot_requested(void)
#define GSP_PHYS_RMCALL_VAS_FLAG_IS_EXTERNALLY_OWNED BIT(3)
#define GSP_PHYS_RMCALL_VAS_FLAG_ALLOW_ZERO_ADDRESS BIT(8)
#define GSP_PHYS_RMCALL_VAS_SIZE 0x10000000ULL
-#define GSP_PHYS_RMCALL_PDB_NUM_ENTRIES 256u
+/*
+ * Turing/TU104 uses the GP10X GMMU root format: the root level has 2 index
+ * bits, i.e. exactly 4 entries covering 2^47 bytes each, and the server caps
+ * the external root at vaLimitMax = 2^49-1 with vaLimitNew =
+ * (numEntries << 47) - 1, so numEntries must not exceed 4. The 4 KB zeroed,
+ * page-aligned VASPDB chunk backs the 4 x 8 B = 32 B root PDB.
+ */
+#define GSP_PHYS_RMCALL_PDB_NUM_ENTRIES 4u
#define GSP_PHYS_RMCALL_PDB_FLAG_APERTURE_SYSMEM_NONCOH BIT(1)
#define GSP_PHYS_RMCALL_PDB_FLAG_ALL_CHANNELS BIT(3)
#define GSP_PHYS_RMCALL_PDB_SUBDEVICE_ID 1u
@@ -4876,8 +4883,9 @@ static int gsp_phys_rmcall_stage3(void __iomem *bar0)
&pdb, sizeof(pdb), 16, NULL, 0,
&pdb_rpc, "DMA_SET_PAGE_DIRECTORY");
if (ret) {
- pr_err("gsp-phys-boot: rm-call: stage 3 aborted: DMA_SET_PAGE_DIRECTORY on hVas=0x%x failed (rpc_result=0x%x); the VAS has no page-directory base\n",
- boot_stage.rmcall_vas, pdb_rpc);
+ pr_err("gsp-phys-boot: rm-call: stage 3 aborted: DMA_SET_PAGE_DIRECTORY on hVas=0x%x numEntries=%u failed (rpc_result=0x%x); the VAS has no page-directory base\n",
+ boot_stage.rmcall_vas, le32_to_cpu(pdb.num_entries),
+ pdb_rpc);
return ret;
}