Hi everyone!
Can I enable IOMMU for the GPU on Jetson Xavier NX Dev Kit?
I added an “iommus” property in the device tree (tegra194-soc-base.dtsi) like below.
(According to the docs in mainline kernel and nvidia,gv11b.txt in jetson-specific kernel, it is allowed to optionally add “iommus” property.)
tegra_gv11b: gv11b {
compatible = "nvidia,gv11b";
#cooling-cells = <2>;
reg = <0x0 0x17000000 0x0 0x1000000
0x0 0x18000000 0x0 0x1000000
0x0 0x03b41000 0x0 0x00001000>;
interrupts = <0 70 0x04
0 71 0x04>;
dma-noncontig;
interrupt-names = "stall", "nonstall";
nvidia,host1x = <&host1x>;
access-vpr-phys;
power-domains = <&bpmp TEGRA194_POWER_DOMAIN_GPU>;
clocks = <&bpmp_clks TEGRA194_CLK_GPCCLK>,
<&bpmp_clks TEGRA194_CLK_GPU_PWR>,
<&bpmp_clks TEGRA194_CLK_FUSE>;
clock-names = "gpu", "pwr", "fuse";
resets = <&bpmp_resets TEGRA194_RESET_GPU>;
dma-coherent;
status = "disabled";
iommus = <&smmu TEGRA194_SID_GPU>; # <----------
};
The GPU device appears in /sys/kernel/iommu_groups/, but the NVGPU driver fails to boot the device with the error message below.
[ 93.431824] nvgpu: 17000000.gv11b nvgpu_timeout_expired_msg_cpu:112 [ERR] Timeout detected @ 00000000ed17fdb5
[ 93.432203] nvgpu: 17000000.gv11b nvgpu_pmu_wait_fw_ready:156 [ERR] PMU is not ready yet
[ 93.432494] nvgpu: 17000000.gv11b lsfm_int_wpr_region:64 [ERR] PMU not ready to process requests
[ 93.432778] nvgpu: 17000000.gv11b nvgpu_pmu_lsfm_bootstrap_ls_falcon:106 [ERR] LSF init WPR region failed
[ 93.433044] nvgpu: 17000000.gv11b nvgpu_pmu_lsfm_bootstrap_ls_falcon:127 [ERR] LSF Load failed
[ 93.433265] nvgpu: 17000000.gv11b nvgpu_gr_falcon_load_secure_ctxsw_ucode:707 [ERR] Unable to recover GR falcon
[ 93.433525] nvgpu: 17000000.gv11b nvgpu_gr_falcon_init_ctxsw:152 [ERR] fail
[ 93.433725] nvgpu: 17000000.gv11b nvgpu_finalize_poweron:951 [ERR] Failed initialization for: g->ops.gr.gr_init_support
[ 93.439122] nvgpu: 17000000.gv11b gk20a_power_write:127 [ERR] power_node_write failed at busy
Thanks!